LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 16, 2026, 12:57 AM
updatedAtNov 16, 2026, 3:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/21061
authorneo-opus-grace
commentsCount2
parentIssuenull
subIssues
21062 A tree-store menu shows records the store''s filters hide
21063 Web desktop: sign-in, launcher and start menu follow permissions
21064 Web desktop: a double-click opens an app window out of its icon
21065 Web desktop: launcher icons reorder by drag and drop
21071 A dialog can only animate out of a component, not out of any node
21075 Web desktop: the desktop works on phones and touch screens
21076 A tree collapse empties a menu level and closes its open submenu
21078 list.SortZone: reorder a list''s records by drag and drop
21090 Resizable pins a resize to its start size when the boundary is no ancestor
21095 The Portal''s Web Desktop card shows a placeholder, not the desktop
21097 A click''s event data omits the pointer type that produced it
21100 Signing out with open windows logs an insertNodeBatch error per window
21112 The role-based navigation post still says the windows PR is in review
subIssuesCompleted13
subIssuesTotal13
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 16, 2026, 3:23 PM

Web desktop demo app: permissions, windows and drag and drop

Closed v14.0.0/archive-v14-0-0-chunk-2 epicdeveloper-experiencedesignai
neo-opus-grace
neo-opus-grace commented on Nov 16, 2026, 12:57 AM

Terminal predicate: a stranger opens apps/webdesktop, signs in as each demo account, and finds that the desktop icons, the start menu and its submenus offer exactly the apps that account may use; double-clicking an icon opens that app's window animated out of the icon; icons rearrange by drag and drop; and the Portal lists the demo with what it proves.

Context

A community question on Slack asked for "the proper way" to build navigation that follows backend permissions: a user signs in, the backend returns permission flags (can_view_X, …), a menu offers only the allowed items, and a sub menu does the same. The proposed design was a service whose methods check the flags and return the components each menu may render. The attached mock-up is a desktop: a drop-down menu and rows of launcher icons, all gated by permissions.

The operator (@tobiu) read it as an indirect request for a web desktop demo with a polished design for Engine 14, and set what makes it real: drag and drop, and a double-click on an icon that opens a dialog animated out of that icon (animateTargetId).

The Problem

  1. No example shows the pattern. Permission-driven navigation is the first thing most business apps need after sign-in. Without an example, developers reach for the imperative shape: a service that builds component lists per permission for each menu. In Neo that copies state into every menu, puts authorization rules into view code, and re-creates components whenever permissions change.
  2. The engine cannot yet express the declarative answer for submenus. A Neo.menu.List cascade driven by a Neo.data.TreeStore ignores that store's filters (reproduced on dev @ 9e0c8f8f72; its own leaf).
  3. A desktop is more than a launcher. Windows that open from their icon, a taskbar that lists them, and icons that move by drag and drop are separable deliverables, each with its own review.

Why an epic: the outcome needs several one-PR leaves that build on each other (engine fix → permission shell → windows, drag and drop) and finish the same sentence.

Intended Solution Shape

Permissions are state, navigation is data, visibility is one filter.

  • State. The signed-in account and its permission keys live in the app's root state.Provider. Signing in loads the account from a JSON resource through a store url, the way an app reads its backend.
  • Data. Every launchable app and every group is a record in one Neo.data.TreeStore (parentId hierarchy, a permission key on apps). Groups carry no permission: TreeStore filtering keeps a group when one of its children is kept, so a submenu appears exactly when it has something to offer.
  • One filter. {property: 'permission', operator: 'included', value: <granted keys>, includeEmptyValues: false}. The provider writes the granted keys into value; every bound view follows. includeEmptyValues: false is load-bearing: by default an empty value disables a filter (collection.Filter#effective), so an account with no permissions would see every app.
  • Views bind, never derive. The launcher (a list.Base over the tree store's visible projection: groups render as section headers, apps as icons) and the start menu (a menu.List cascade over the same store) read the one filtered store. No view holds a copy of the rule; no component exists per permission.
  • Windows are dialog.Base instances opened with animateTargetId set to the launcher icon; a store of window records drives the taskbar.
  • Drag and drop writes record fields; the launcher re-renders from the records, never from moved DOM.
  • Design: an app-owned palette in neo-theme-neo-dark / neo-theme-neo-light, following apps/workstation's theme files.

The README states the boundary: hiding UI is not authorization; the backend enforces every permission on its own endpoints.

Out of Scope

  • Authentication: demo accounts are picked, not signed in with credentials.
  • Moving a window into its own browser window (apps/shareddialog already proves dialogs cross windows); a follow-up once the single-window desktop exists.
  • A window manager in src/: the demo composes existing primitives; promoting any part into the engine is a later decision.

Avoided Traps

  • A service that returns components per permission: copies state into each menu and re-creates components on change.
  • bind: {hidden: data => …} on every item: fine for one or two fixed buttons; for navigation it still creates every item and hard-codes permission keys into view configs.
  • A filter per menu, or a store per submenu: splits one rule across stores that can disagree.

Related

  • Roadmap: beside the Engine 14 gate; its Portal entry feeds #20498 ("every example names what it proves").
  • Precedents: apps/workstation (app theme palette), apps/email (ViewportStateProvider, dialog), apps/shareddialog.
  • Prior art: #17839 (menu cascades over a TreeStore; its Out of Scope names "ancestor-aware filtering" as adopted).

Structure map: N/A — app and engine-component work; no ai/, Agent OS or substrate placement. Live latest-open + closed sweep: latest 20 open + open/closed search ("menu TreeStore filter", "menu filter submenu", "web desktop", "permission menu", "launcher desktop icons"; #17839 Out of Scope / Avoided Traps read) at 2026-11-15T23:54Z; no equivalent or prior exclusion found. Backlog: 51 open (red); no owning ticket or epic to fold into. MC sweep: "submenu shows items that the tree store filter hides", "no example shows navigation menus that follow user permissions", 12 results, no prior decision found. Own-assignment sweep: 4 open, none overlapping. Epic sweep: 7 open predicates + closed search ("demo app desktop") read; #20498 is the examples overview this demo joins, not the same terminal predicate. A2A claim sweep: last 30 messages, no overlapping claim.

Origin Session ID: f1b70a0d-406f-4b7d-a69c-20d35c843303 Retrieval Hint: "web desktop demo permission-driven menus tree store filter includeEmptyValues"