Context
First app leaf of #21061. It answers the community question the epic describes: navigation that follows the signed-in account's permissions, with one store, one filter and no component per permission. Windows and drag and drop are sibling leaves built on this one.
The Problem
No app in apps/ shows navigation that depends on who signed in. The pattern needs a home a stranger can run, read in a few files, and copy.
The Architectural Reality
Design authority: n/a — a new app; it calls no existing behavior wrong.
- App gate (
AGENTS.md authoring gate): data UI binds a data.Store of data.Model records, providers stay at view roots, styles stay in SCSS. Siblings: apps/email (ViewportStateProvider), apps/workstation (app-owned theme files under resources/scss/theme-neo-*/apps/workstation/).
state.Provider#onDataPropertyChange(key, value, oldValue) (src/state/Provider.mjs:812-814) is the subclass hook where the provider writes the granted keys into the permission filter.
collection.Filter: operator: 'included' keeps a record whose permission is in value (src/collection/Filter.mjs:374-376); with the default includeEmptyValues: true an empty value makes the filter ineffective (src/collection/Filter.mjs:114-120, 243-245), so the app sets it to false.
data.TreeStore#filter() keeps the ancestors of kept nodes (src/data/TreeStore.mjs:588-713): a group without a permission shows exactly when one of its apps does.
list.Base re-renders on its store's filter event (src/list/Base.mjs:402-414); menu.List cascades over a TreeStore, and its levels honor the filter once #21062 lands.
The Fix
New app apps/webdesktop/ (namespace WebDesktop):
app.mjs, index.html, neo-config.json (themes neo-theme-neo-dark, neo-theme-neo-light), README.md.
model/App.mjs (a TreeModel: id, text, iconCls, permission, description), model/Account.mjs.
store/Apps.mjs (the TreeStore: catalog plus the permission filter), store/Accounts.mjs (url → resources/data/accounts.json).
view/Viewport.mjs, view/ViewportStateProvider.mjs (account, permissions, stores), view/ViewportController.mjs (sign in and out).
view/SignIn.mjs (account cards from the accounts store), view/Desktop.mjs, view/Launcher.mjs (list.Base subclass: group rows as section headers, apps as icons), view/Taskbar.mjs (start button → menu.List over the apps store; account button → Sign out), view/PermissionsPanel.mjs (live permission toggles).
- SCSS:
resources/scss/src/apps/webdesktop/ plus resources/scss/theme-neo-dark/apps/webdesktop/ and theme-neo-light/apps/webdesktop/.
- Portal: an entry in
apps/portal/resources/data/examples.json naming what the demo proves.
Acceptance Criteria
Out of Scope
- Windows and the taskbar window list (sibling leaf), drag and drop (sibling leaf).
- Authentication with credentials.
Related
- Parent: #21061. Blocked by #21062 (submenus honor the filter).
Origin Session ID: f1b70a0d-406f-4b7d-a69c-20d35c843303
Retrieval Hint: "web desktop permission shell provider filter includeEmptyValues launcher start menu"
Context
First app leaf of #21061. It answers the community question the epic describes: navigation that follows the signed-in account's permissions, with one store, one filter and no component per permission. Windows and drag and drop are sibling leaves built on this one.
The Problem
No app in
apps/shows navigation that depends on who signed in. The pattern needs a home a stranger can run, read in a few files, and copy.The Architectural Reality
Design authority: n/a — a new app; it calls no existing behavior wrong.
AGENTS.mdauthoring gate): data UI binds adata.Storeofdata.Modelrecords, providers stay at view roots, styles stay in SCSS. Siblings:apps/email(ViewportStateProvider),apps/workstation(app-owned theme files underresources/scss/theme-neo-*/apps/workstation/).state.Provider#onDataPropertyChange(key, value, oldValue)(src/state/Provider.mjs:812-814) is the subclass hook where the provider writes the granted keys into the permission filter.collection.Filter:operator: 'included'keeps a record whosepermissionis invalue(src/collection/Filter.mjs:374-376); with the defaultincludeEmptyValues: truean emptyvaluemakes the filter ineffective (src/collection/Filter.mjs:114-120,243-245), so the app sets it tofalse.data.TreeStore#filter()keeps the ancestors of kept nodes (src/data/TreeStore.mjs:588-713): a group without a permission shows exactly when one of its apps does.list.Basere-renders on its store'sfilterevent (src/list/Base.mjs:402-414);menu.Listcascades over a TreeStore, and its levels honor the filter once #21062 lands.The Fix
New app
apps/webdesktop/(namespaceWebDesktop):app.mjs,index.html,neo-config.json(themesneo-theme-neo-dark,neo-theme-neo-light),README.md.model/App.mjs(a TreeModel:id,text,iconCls,permission,description),model/Account.mjs.store/Apps.mjs(the TreeStore: catalog plus the permission filter),store/Accounts.mjs(url→resources/data/accounts.json).view/Viewport.mjs,view/ViewportStateProvider.mjs(account, permissions, stores),view/ViewportController.mjs(sign in and out).view/SignIn.mjs(account cards from the accounts store),view/Desktop.mjs,view/Launcher.mjs(list.Basesubclass: group rows as section headers, apps as icons),view/Taskbar.mjs(start button →menu.Listover the apps store; account button → Sign out),view/PermissionsPanel.mjs(live permission toggles).resources/scss/src/apps/webdesktop/plusresources/scss/theme-neo-dark/apps/webdesktop/andtheme-neo-light/apps/webdesktop/.apps/portal/resources/data/examples.jsonnaming what the demo proves.Acceptance Criteria
apps/webdesktop/index.htmlboots ondevin both neo themes (dark by default) without console errors.resources/data/accounts.jsonthrough a storeurl; choosing one signs in.includeEmptyValues: truewould have shown every app.featureandlookForname the proof.npm run test-unit.Out of Scope
Related
Origin Session ID: f1b70a0d-406f-4b7d-a69c-20d35c843303 Retrieval Hint: "web desktop permission shell provider filter includeEmptyValues launcher start menu"