Context
Leaf of #21198. The demo's launcher (apps/webdesktop/view/Launcher.mjs, 190 lines), its tree (model/App.mjs, store/Apps.mjs) and the arrangement persistence in its controller (readArrangement(), getArrangementKey(), onAppsRowsChange()) are what any web desktop needs; only the permission field and filter are the demo's.
The Problem
A consumer copies the launcher and loses its fixes. The persistence is tangled into the demo's sign-in: the arrangement must be restored before the new account's filter renders, and of two quick sign-ins the later one wins.
The Architectural Reality
- Design authority: n/a — moves and generalizes existing behavior; calls none of it wrong.
- The launcher is a
list.Base with draggable.list.SortZone (horizontal, within a group), keys Enter and Ctrl/Cmd+Shift+Left/Right, dblclick to open, and a single tap on touch devices (Neo.config.hasTouchEvents).
store/Apps.mjs is a TreeStore sorted by order, with arrange(arrangement) and getArrangement(), and a per-instance copy of its catalog. Its included filter on permission is the demo's.
- Persistence today:
Neo.main.addon.LocalStorage, keyed per account, written on rowsChange except while restoring.
- Styles:
resources/css/src/apps/webdesktop/Launcher.css, which reads the demo's --webdesktop-* values (resources/css/theme-neo-*/apps/webdesktop/Viewport.css). The theme sources are plain CSS since #21225.
The Fix
src/desktop/model/App.mjs (Neo.desktop.model.App, TreeModel): id, text, iconCls, color, description, order, handler, isHeader. The demo subclasses it and adds permission.
src/desktop/store/Apps.mjs (Neo.desktop.store.Apps, TreeStore): the order sorter, arrange() and getArrangement() over the catalog it records from its data, the root level included, with no filter. The demo subclasses it with its data and its permission filter.
src/desktop/Launcher.mjs (Neo.desktop.Launcher, list.Base): icons, group headers, drag and keyboard reordering, an openApp event on Enter, double-click or a touch tap.
- Persistence behind
Launcher#arrangementKey: null saves nothing; a key restores its arrangement and saves on each new order. While a key's arrangement is read, the launcher holds its render, so a consumer sets the key before the grants it belongs to.
resources/css/src/desktop/Launcher.css, with its neo-dark and neo-light values (the demo's) in resources/css/theme-neo-*/desktop/Launcher.css; the demo's launcher styles go. The other three themes are #21205.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Neo.desktop.model.App fields |
the demo's model/App.mjs |
Generic fields only; consumers subclass |
— |
JSDoc |
unit |
Neo.desktop.store.Apps#arrange(), #getArrangement() |
the demo's store/Apps.mjs |
Arrange as one batch; apps it does not name keep their catalog place |
An unknown key is ignored |
JSDoc |
unit |
Neo.desktop.Launcher event openApp, config arrangementKey |
the demo's launcher and controller |
As the demo behaves today; the render waits for a key's arrangement |
A failed or unreadable read gives the catalog order |
JSDoc |
unit + e2e |
Acceptance Criteria
Out of Scope
The window manager (#21199), the taskbar, the app window and the container (#21201); the cyberpunk, dark and light themes (#21205); the permission recipe's guide (#21202).
Related
Parent #21198 · into Engine 14 as far as review carries it (#21198's Timing) · #21065 (the demo's reordering) · #21068 (the TreeStore work the filter relies on).
Sweeps: as #21198 at 2026-11-16T23:59Z; no equivalent for launcher. Revised 2026-11-17 after Mnemosyne's epic review on #21198 (themes split into #21205). Revised 2026-11-18 at intake: the theme paths after #21225, the render hold, and the root level of an arrangement.
Origin Session ID: 99757ce4-c1d9-4801-83f2-e2f545246917
Retrieval Hint: "desktop Launcher src apps TreeStore arrange getArrangement arrangementKey localStorage reorder"
Context
Leaf of #21198. The demo's launcher (
apps/webdesktop/view/Launcher.mjs, 190 lines), its tree (model/App.mjs,store/Apps.mjs) and the arrangement persistence in its controller (readArrangement(),getArrangementKey(),onAppsRowsChange()) are what any web desktop needs; only thepermissionfield and filter are the demo's.The Problem
A consumer copies the launcher and loses its fixes. The persistence is tangled into the demo's sign-in: the arrangement must be restored before the new account's filter renders, and of two quick sign-ins the later one wins.
The Architectural Reality
list.Basewithdraggable.list.SortZone(horizontal, within a group), keys Enter and Ctrl/Cmd+Shift+Left/Right,dblclickto open, and a single tap on touch devices (Neo.config.hasTouchEvents).store/Apps.mjsis aTreeStoresorted byorder, witharrange(arrangement)andgetArrangement(), and a per-instance copy of its catalog. Itsincludedfilter onpermissionis the demo's.Neo.main.addon.LocalStorage, keyed per account, written onrowsChangeexcept while restoring.resources/css/src/apps/webdesktop/Launcher.css, which reads the demo's--webdesktop-*values (resources/css/theme-neo-*/apps/webdesktop/Viewport.css). The theme sources are plain CSS since #21225.The Fix
src/desktop/model/App.mjs(Neo.desktop.model.App,TreeModel):id,text,iconCls,color,description,order,handler,isHeader. The demo subclasses it and addspermission.src/desktop/store/Apps.mjs(Neo.desktop.store.Apps,TreeStore): theordersorter,arrange()andgetArrangement()over the catalog it records from its data, the root level included, with no filter. The demo subclasses it with its data and its permission filter.src/desktop/Launcher.mjs(Neo.desktop.Launcher,list.Base): icons, group headers, drag and keyboard reordering, anopenAppevent on Enter, double-click or a touch tap.Launcher#arrangementKey:nullsaves nothing; a key restores its arrangement and saves on each new order. While a key's arrangement is read, the launcher holds its render, so a consumer sets the key before the grants it belongs to.resources/css/src/desktop/Launcher.css, with its neo-dark and neo-light values (the demo's) inresources/css/theme-neo-*/desktop/Launcher.css; the demo's launcher styles go. The other three themes are #21205.Contract Ledger
Neo.desktop.model.Appfieldsmodel/App.mjsNeo.desktop.store.Apps#arrange(),#getArrangement()store/Apps.mjsNeo.desktop.LaunchereventopenApp, configarrangementKeyAcceptance Criteria
src/desktop/with@summaryJSDoc. The demo uses them through subclasses;permissionand its filter exist only in the demo.arrange()andgetArrangement()round-trip; apps an arrangement omits keep their catalog place; a filter change leavesorderuntouched.arrangementKeyrestores before the launcher renders the store's next filter; of two quick key changes the later one wins; a failed read gives the catalog order; a restore saves nothing, and a reorder saves once.resources/css/src/desktop/with their neo-dark and neo-light values, and the demo keeps none of them.test/playwright/e2e/webdesktop/PhoneAndTouch.spec.mjsand the demo's unit specs pass.Out of Scope
The window manager (#21199), the taskbar, the app window and the container (#21201); the cyberpunk, dark and light themes (#21205); the permission recipe's guide (#21202).
Related
Parent #21198 · into Engine 14 as far as review carries it (#21198's Timing) · #21065 (the demo's reordering) · #21068 (the TreeStore work the filter relies on).
Sweeps: as #21198 at 2026-11-16T23:59Z; no equivalent for
launcher. Revised 2026-11-17 after Mnemosyne's epic review on #21198 (themes split into #21205). Revised 2026-11-18 at intake: the theme paths after #21225, the render hold, and the root level of an arrangement.Origin Session ID: 99757ce4-c1d9-4801-83f2-e2f545246917 Retrieval Hint: "desktop Launcher src apps TreeStore arrange getArrangement arrangementKey localStorage reorder"