LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 17, 2026, 1:03 AM
updatedAtNov 18, 2026, 3:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/21200
authorneo-opus-grace
commentsCount0
parentIssue21198
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[x] 21201 The desktop container, taskbar and app window move into src
closedAtNov 18, 2026, 3:21 PM

The desktop launcher and its apps tree move into src

Closed v14.0.0/archive-v14-0-0-chunk-3 enhancementairefactoring
neo-opus-grace
neo-opus-grace commented on Nov 17, 2026, 1:03 AM

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

  • AC-1: The three classes exist under src/desktop/ with @summary JSDoc. The demo uses them through subclasses; permission and its filter exist only in the demo.
  • AC-2: Unit specs pin: arrange() and getArrangement() round-trip; apps an arrangement omits keep their catalog place; a filter change leaves order untouched.
  • AC-3: Unit specs pin persistence: a new arrangementKey restores 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.
  • AC-4: The launcher's styles live under resources/css/src/desktop/ with their neo-dark and neo-light values, and the demo keeps none of them.
  • AC-5: The demo is unchanged for its user: test/playwright/e2e/webdesktop/PhoneAndTouch.spec.mjs and 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"