Skip to content

feat(app-shell): workbench home app Dock under the greeting replaces the My apps rail - #39955

Draft
objectstack-fleet[bot] wants to merge 5 commits into
mainfrom
claude/issue-39941-workbench-app-dock
Draft

objectstack-fleet[bot] wants to merge 5 commits into
mainfrom
claude/issue-39941-workbench-app-dock

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #39941

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:所有成员打开工作台首页,问候语下方多了一排无标题的应用 Dock(大图标加名字,最多 8 个业务应用,最后是「全部应用」),原来右侧的「我的应用」栏没了,今日、最近访问和活动动态改为通栏。
  • 为什么做:属于工作台改版,替新用户解决「窄屏时应用列表掉到页面最底下、找不到应用」的问题,按维护者确认的 Dock 效果图实现。
  • 出错会怎样:最坏是 Dock 里少显示或多显示几个应用,或「全部应用」打开的列表不够直观;只动前端展示,直接撤回这个改动即可恢复原样。
  • 要你做什么:无

What changes

  • New WorkbenchAppDock (in console/workbench/WorkbenchAppDock.tsx), mounted under the greeting and the ask-AI slot, above 「Today」. A nav named 「应用」 / "Apps" with no heading.
    • Content: the launcher's apps (useLauncherApps) filtered by isProductApp, so the workbench, Setup, Studio and every other com.objectstack.* app never appear. Account is hidden and was never in the launcher list.

    • Order: the switcher's order, which is /meta/app's order through filterActiveApps and the /me/apps hide. No app carries a sort key, so in effect this is install order. The code comment says so. No new ordering rule.

    • Count: measured on the row itself. dockAppCapacity(width) is a pure function the tests pin. A ResizeObserver plus a layout-effect read feeds it the row's own width, so the measurement happens before paint and again on resize. Capacity is capped at 8. A row that has not been laid out (width 0) gets the cap. Tiles are shrink-0 and nothing wraps.

    • Tiles: reuse LauncherAppIcon (now exported from HomeAppsStrip.tsx, with boxClassName / glyphClassName props) and TILE_CLASSES / ICON_BOX_CLASSES through new DOCK_TILE_CLASSES / DOCK_ICON_BOX_CLASSES in launcherTile.ts. Size chosen: a 112 px tile with a 56 px icon does not fit 8 apps plus 「All apps」 in a 1280 px window's main column (1280 minus the 256 px sidebar minus 64 px page padding = 960 px; 9 tiles plus gaps plus divider = 1057 px). The Dock tile is 96 px wide with a 48 px icon, so 8 apps plus the divider plus 「All apps」 take 909 px. Each tile links to its app's one address (appAddressSegment). The name is on one line, truncated, and the full name is the tile's title.

    • 「All apps」 tile: a grid icon after a thin divider, always last. Target chosen: it opens the command palette (openCommandPalette, the idempotent ADR-0054 C1 open). Its 「Switch app」 group lists every app the person may open, Setup and Studio included, and it is searchable. What I measured before choosing:

      • /home redirects to the landing app (the workbench) whenever one exists (RootLandingRedirect), so a link there would bounce back.
      • The desktop switcher is the sidebar app menu's dropdown. It has no address and no open seam outside SidebarAppMenu.tsx.
      • The marketplace lists installable packages and is admin-only.

      The 全部应用 panel itself is Workbench home: the 全部应用 panel (search, a platform group, admin add entries), and 「从模板开始」 retired everywhere as a duplicate of the marketplace #39942, which will replace this target. The tile is drawn only where a palette provider is mounted (objectui#11912), which is every /apps/APP page.

  • Empty states:
    • A viewer with no product app who may not add apps, and is not an admin without the authoring capability (a plain member), sees a dashed box in the Dock: 「管理员还没有为你开通应用」 / "No apps have been set up for you yet". 「All apps」 stays at the end. The main column's block no longer repeats this for them.
    • A viewer who may add apps and has none keeps the existing WorkbenchAddApps doors where they were. The Dock shows only 「All apps」.
    • An admin who may not author keeps the reason text (objectstack#8270).
    • One predicate, useWorkbenchAddAppsKind, decides both the block and the box.
  • Rail removed: WorkbenchAppsRail.tsx is deleted, and WorkbenchAddApps moved into WorkbenchAppDock.tsx. The xl:grid-cols-4 split is gone, so 「Today」, 「Recently accessed」 and the activity feed take the full width.
  • Dead read dropped: HomeAppsStrip no longer sorts app:-prefixed favourites first and no longer draws the star badge. That id's only writer (AppCard's star) is mounted nowhere. The Dock does not read ui.favorites.
  • i18n: workbench.dock.label / allApps / empty are added to every locale pack, because all-locales-key-parity requires every pack to define every en key. The rail's now-unread workbench.apps.title and workbench.noApps.member are removed from every pack.

Read first (by risk)

  1. ui/packages/app-shell/src/console/workbench/WorkbenchAppDock.tsx: the capacity arithmetic (DOCK_TAIL_PX, dockAppCapacity) must match the classes it assumes (gap-1, w-px mx-1, w-24). If either side changes alone, the cap is off by a tile.
  2. ui/packages/app-shell/src/console/workbench/WorkbenchHomePage.tsx: the grid split removal and where the Dock mounts.
  3. ui/packages/app-shell/src/console/home/HomeAppsStrip.tsx: the dropped favourites sort and LauncherAppIcon's new props, including the logo image's radius, now rounded-[inherit].

Two-minute verification

Open the workbench home at a 1280 px window with 8 or more product apps installed. One row of 8 app icons appears under the greeting, then a thin divider and 「全部应用」. Clicking it opens the command palette, which lists all apps. Narrow the window to 768 px and the row shows fewer icons on one line. No right rail appears at any width.

Tests

All runs below are at head aca9ecdec6.

Targeted vitest (workbench + HomeAppsStrip)

pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/console/workbench/ packages/app-shell/src/console/home/__tests__/HomeAppsStrip.* (three files): Test Files 6 passed (6), Tests 50 passed (50).

New pins in WorkbenchHomePage.test.tsx:

  • the product-app filter (Setup, Studio, workbench and hidden Account never listed; switcher order kept);
  • the tile address and hover title;
  • 「All apps」 last after the divider, opening the palette;
  • no 「All apps」 without a palette;
  • the width cap: 1120 px gives 8, 464 px gives 3;
  • dockAppCapacity at the 1280 / 1440 / 768 px main-column widths;
  • both empty states and the authoring-gate state;
  • no rail and no grid split.
Ablation

With the committed fix, I mutated the Dock on disk two ways: slice(0, DOCK_MAX_APPS) in place of the measured capacity, and a workbench-only filter in place of isProductApp. 4 tests went red: the product filter, the narrow-row cap, and both no-product-app states. I restored the file with git checkout HEAD --.

Wider suites
  • packages/app-shell/src/console/home/ + phase1-page-blocks.render + productBlocks-12197: Test Files 45 passed (45), Tests 301 passed (301).
  • packages/i18n/ (key parity across all packs included): Test Files 110 passed (110), Tests 1874 passed | 13 skipped.
  • pnpm --dir ui exec vitest run scripts/ + product-neutral-renderer.ratchet: Test Files 173 passed | 2 skipped.
  • pnpm --filter @object-ui/app-shell type-check: exit 0.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands: 42 commands derived. All 42 were run locally with exit 0. --ran reports: 42 derived, 42 run, 0 NOT-MEASURED (a derived zero).
  • ui: check:i18n-keys exit 0, check:i18n-drift exit 0 ("No en value changed"), check:new-line-citations exit 0 (0 new citations).

Acceptance notes


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N

席位核对

ACCEPT · head aca9ecde · read 2026-12-06T18:58Z

L1 of PR #39955 (Fixes #39941), read on the full diff at aca9ecdec6f1b03870e51e2bc00e829368e65faf.

…ts for the All apps panel

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmQSafnPd7PALMEwPEP

席位核对

ACCEPT · head b8424eac · read 2026-12-06T19:27Z

L1-b prose delta of PR #39955 (Fixes #39941) over the L1-a ACCEPT 7462950711 at aca9ecde, read at b8424eac5fb4c83a5de5677b6624a8dc0ec1335d. L1-a's full read and every other line of it stand.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants