Skip to content

fix(app-shell): a collapsed console sidebar hides fully, and its menu floats out from the left edge - #35187

Merged
objectstack-fleet[bot] merged 13 commits into
mainfrom
claude/issue-35062-sidebar-hidden-collapse
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 13 commits into
mainfrom
claude/issue-35062-sidebar-hidden-collapse

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #35062
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:控制台侧栏在 768 px 以上收起后完全隐藏,不再留一列没有文字的图标,列表和记录页拿到这部分宽度;鼠标在窗口最左边停约 0.2 秒(或在那里点一下),带文字和分组的完整菜单以浮层浮出,移开、选中一项、按 Esc 或点页面即收回,收起状态不变,刷新后仍是收起。
  • 为什么改:裁决 6973617688(选项 A):768 px 以上只有一种收起样子,窄窗口(低于 1416 px)自动收起时也不留图标列,左边缘悬停或点顶栏按钮浮出完整菜单。
  • 风险与回滚:只动 @object-ui/app-shell 里控制台自己的侧栏行为;@object-ui/components 的侧栏原语、展开状态的侧栏、手机端底部菜单栏都没改。回滚即 revert 本 PR,图标列回来。
  • 先看:① ui/packages/app-shell/src/layout/consoleSidebarRail.ts 的 useConsoleSidebarRailPanel(浮出 / 收回、焦点去向、浮出时不写入"宽窗口选择"和 cookie);② UnifiedSidebar.tsx 的 collapsible 与左边缘条;③ UnifiedSidebar.railOverlay-27593.test.tsx 中按裁决改掉的 "hover alone does not expand" 断言。
  • 两分钟验证:1600×900 打开 CRM,点顶栏左侧的切换按钮收起 → 左边没有图标列、列表占满宽度;鼠标移到窗口最左边停一下 → 完整菜单浮出;点 Accounts → 跳到客户列表、菜单收回、侧栏仍收起;刷新 → 仍收起。
  • 需要你做的:无,席位落地。

What changes

Ruling 6973617688 (option A) on #35062: from 768 px up there is one collapsed look, the hidden one, for both the hand collapse and the #27593 fold below 1416 px.

Precedents for the two numbers the ruling left open:

  • Hover timings 200 ms / 150 ms: the components package's NavigationMenu, the one menu there that opens on hover. It is Radix's navigation menu with no override (delayDuration 200, close timer 150).
  • Strip width 8 px: the strip the primitive's own SidebarRail leaves inside the viewport beside a collapsed offcanvas sidebar. That rail is w-4, moved -right-2 past the panel's edge.

Both are cited at the constants in consoleSidebarRail.ts.

Public surface. @object-ui/app-shell is private: true. The renamed and removed constants (RAIL_OVERLAY_FRAME_KEEPS_GAP became RAIL_OVERLAY_FRAME_NO_GAP; RAIL_CONTROL was removed) and the new ones (SIDEBAR_FLOAT_OPEN_DELAY_MS, SIDEBAR_FLOAT_CLOSE_DELAY_MS, SIDEBAR_EDGE_ZONE, useConsoleSidebarRailPanel) are module exports of layout/consoleSidebarRail.ts, which the package entry does not re-export. No prop was added to UnifiedSidebar or to any @object-ui/components export.

Tests

  • New: UnifiedSidebar.hiddenCollapse-35062.test.tsx (16 tests). It covers:
    • hand collapse at 1600 px is hidden: gap token, inert, no icon column; the trigger re-expands it;
    • fold at 1280 px is hidden;
    • the edge strip is placed below the top bar; there is no strip at 700 px; "Keep sidebar open" turns the fold off;
    • hover: nothing at 199 ms, a float at 200 ms with labels and groups; a pointer inside keeps it; away 150 ms folds it; leaving the edge early floats nothing; a press floats it until a press outside;
    • a float at 1600 px writes neither the wide-window choice nor the cookie, and a reload is collapsed;
    • choosing an entry navigates, folds the menu, stays collapsed, and stays collapsed after a reload;
    • resizing under a float, both ways;
    • the trigger at 1280 px floats the menu and moves focus in; Esc folds it and focus goes back to the trigger;
    • ⌘B floats it; an entry chosen from the keyboard gives focus back to the trigger; Ctrl+B collapsing with focus inside moves focus to the trigger.
  • Updated: UnifiedSidebar.railOverlay-27593.test.tsx (22 tests). Folded now means hidden. The "hover alone does not expand" pin became "resting the pointer on the window's left edge floats it", and the changed assertion cites ruling 6973617688. The Console sidebar in icon-rail mode: entries of a collapsed nav group (Account → Developer, Setup → Advanced) are not reachable at all #32156 collapsed-group cases now run in the float.
  • Updated: consoleSidebarRail.width-27593.test.tsx. At 1280 and 1366 px the hidden sidebar leaves the list its columns beside the record drawer.

Local runs (the verify lock's VERDICT lines), at head 875190b8b:

App-shell layout folder, useResponsiveSidebar, and the components and layout sidebar tests: 157 files / 1156 tests passed
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/hooks/__tests__/useResponsiveSidebar.test.tsx packages/app-shell/src/layout/ (+ 14 components/layout sidebar test files)
 Test Files  157 passed (157)
      Tests  1156 passed (1156)
os-verify-lock: VERDICT command-exit 0

Earlier, wider runs:

  • 238 test files / 2068 tests passed at b13e21c8c: the app-shell layout folder; the console, AppContent and studio tests that import the changed modules; the components and layout sidebar tests.
  • @object-ui/app-shell type-check (tsc --noEmit and tsconfig.test.json, which compiles the tests) exited 0 at 875190b8b.

ESLint on the six changed source and test files reports the same 8 warnings as on base, all in pre-existing UnifiedSidebar.tsx code, and no new ones.

Ablation (one-shot, nothing kept). At 875190b8b, node scripts/ablation-replace.mjs replaced collapsible: enabled ? 'offcanvas' : 'icon', with collapsible: 'icon',. Anchor 1 to 0, blob 0fba4212c986 to dfd56823bf9e. Under the mutation, the 35062 and 27593 files went red: 31 failed and 7 passed of 38 (35062: 14 of 16 failed; 27593: 17 of 22 failed). The tool's own trap restored the file: the blob equals HEAD's 0fba4212c986, and git diff HEAD is empty. The tests import the source through relative paths, so no dist was involved.

Acceptance notes

  • Browser pass. A real browser checked the card's three acceptance lines. The setup was the CRM example on objectstack dev, the console's Vite dev server proxied to it, and headless Chromium, at 1600×900 and 1280×800.
    • At 1600 px, collapsing with the trigger leaves the gap 0 px wide and the panel at x = -256. The list's main grows from x = 256 / 1344 px wide to x = 0 / 1600 px. The edge strip is 8 px wide at y = 48, below the top bar.
    • Resting the pointer on the edge floats the panel at x = 0 over the content (main stays 1600 px), showing Leads, Accounts, Contacts, Opportunities, Activities and Pipeline under their groups. Moving away folds it.
    • Clicking Accounts in the float navigates to the accounts list. The menu folds, the sidebar stays collapsed, and the cookie and wide-window choice stay false. A reload is still collapsed.
    • At 1280 px the fold is hidden the same way. Enter on the trigger floats the menu with focus on the Accounts entry; Tab walks to Contacts; Esc folds it, with focus back on the trigger. Hover floats and folds the same way.
    • At 700 px there is no desktop sidebar and no edge strip.
    • The servers were stopped afterwards, and the screenshots stayed out of the tree.
  • Seen in the browser, harmless. While the trigger floats the folded menu at 1280 px, the primitive's cookie reads true. This was so before this change, too: the fold's float goes through the provider. A reload at that width still starts folded, because primeConsoleSidebarOpen rewrites the cookie before the provider mounts (Console sidebar at 1280 px: the first frame draws the full 256 px sidebar over the content, then animates to the 48 px rail #28077).
  • Not verified. NavigationRenderer (@object-ui/layout, outside this card's file surface) lists a group's entries open while the sidebar's state is collapsed (Console sidebar in icon-rail mode: entries of a collapsed nav group (Account → Developer, Setup → Advanced) are not reachable at all #32156, meant for the icon rail). In the hidden collapse the panel is off-screen and inert, so this is invisible. During the 200 ms slide-out of a float, a closed group may show its entries open. This was not observed frame by frame.
  • Stale, outside the file surface, not edited:
    • The doc comment of hooks/useResponsiveSidebar.ts still says the fold collapses the sidebar "to its icon rail".
    • docs/qa/platform-checklist/areas/platform-core.json step 665 still says that below 1416 px the console folds the sidebar "to its icon rail", and tells the walker to unfold it with the trigger before expanding groups. Its instruction still works: the trigger floats the full menu, and its groups expand there. But the float folds after each chosen entry, so a walk re-opens it per destination.
    • Both are reported to the seat.
  • The ui/packages/cli generator template was left as it is (see What changes).

Verification

  • Gates derived with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on this diff (39 commands), all run locally at 875190b8b:
39 derived gate commands, each exited 0 (reconciled: 39 derived, 39 run, 0 NOT-MEASURED, a derived zero)
  • node scripts/check-adr-0087-registration.mjs (--base origin/main and --self-test), check-changeset-no-major.mjs --base origin/main, check-closing-keyword-parity.mjs (and --self-test), check-comment-mask-corpus.mjs, check-empty-changeset.mjs (--base origin/main and --self-test), check-sdui-manifest.mjs (and --self-test), ci/snapshot-next.mjs --self-test, pm/check-governed-queue-guard.mjs --self-test, pm/release-rehearsal-clone.mjs --self-test, release-pending-publish.mjs --self-test: exit 0 each.
  • pnpm --filter @objectstack/spec run check:duration-unit-keys and pnpm check: adr-anchors, changeset-gate-self-tests, closed-ceremony-text, cross-package-test-inputs, dispatcher-error-vocabulary, driver-memory-census, engine-double-contract, error-status-conformance, gitlink-declared, nul-bytes, published-files, query-options-erasure, refd-timer-probe, registry-log-declared, rest-log-spy-declared, skill-identifier-liveness, test-source-alias, tier-file-adoption, type-check-coverage, type-check-debt, undeclared-dep-imports, watch-hint-literal, where-matcher: exit 0 each.
  • pnpm --dir ui exec vitest run scripts/: 171 files passed, 2 skipped / 5092 tests passed, 2 skipped; VERDICT command-exit 0. Its first run was killed by the kernel for memory (SIGKILL, exit 1) while this card's browser pass held a backend and a Vite server; it was rerun after they were stopped, and that rerun is the reading.
  • node scripts/pm/overlap-check.mjs before each push: VERDICT clean exit 0.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0, with 0 anchored files in the change set.
  • A self-scan for control bytes over the changed files found no hits.

Generated by Claude Code

…enu from the left edge

Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
Co-authored-by: Claude <noreply@anthropic.com>
…ds a float in render

The panel hook no longer returns the sidebar's ref (the compiler read the
whole panel object as a ref during render), and a window that turns wide or
narrow ends a float over a hand-collapsed sidebar during render, then hands
the sidebar the reader's own state for the new width. Pinned.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 18, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Final green head for L1: 875190b8b140f31153e9408a09f31a8505dba8a1 · 2026-11-18T11:37Z

Check-runs on this head: 39 success, 13 skipped, 0 failed, 0 pending (Test UI 1–16, Build & E2E UI, Live E2E UI, Type Check UI and Lint UI all success; Core lanes skipped by path filter). Size +956 −143, 7 files, not governed. Dev report: #35062 comment 6977064034 (browser pass at 1600×900, 1280×800 and 700 px on the CRM example).
L1 requested from L1-a. No L2 face (Clause-②: no, Metadata-protocol: none; @object-ui/app-shell is private, no @object-ui/components export or prop added).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 review (#35062) · 2026-11-18T11:39Z

L1: ACCEPT
Head-sha: 875190b
Read: the full diff at this head against merge base a6cf988 (7 files, +956/−143), with ruling 6973617688, claim 6973692164 and the seat's orders in it, and os-dev report 6977064034 (including its browser pass).

Fixes vs Part of. The PR body's first line is Fixes #35062. The card is ruling A, and this PR delivers all of it, so Fixes is right.

Claim file surface. All 7 paths are inside the claim: UnifiedSidebar.tsx, consoleSidebarRail.ts, LocalizedSidebarTrigger.tsx (doc comment only), the two #27593 rail tests under layout/__tests__/, the new file named for the card, and .changeset/. ConsoleLayout.tsx, components/src/ui/sidebar.tsx and the locales were allowed but not touched.

The seat's orders against the diff.

  • Both collapsed states hide, with no icon column, from 768 px up. With railOverlay on, collapsible is offcanvas: the primitive's gap is w-0 and its panel sits at left: −sidebar-width. The hidden panel gets inert, which React 19.3 renders as a boolean. desktop gates all of it above the phone breakpoint. With railOverlay off, the sidebar stays icon as before.
  • Reuse the overlay. The float is the same fixed panel, with RAIL_OVERLAY_PANEL, and the frame class now holds the gap at 0 (RAIL_OVERLAY_FRAME_NO_GAP), so the content does not move.
  • Hover precedent, else about 200 ms and 8 px. The constants cite the precedents. SIDEBAR_FLOAT_OPEN_DELAY_MS 200 and CLOSE 150 come from NavigationMenu, which is Radix with no override. SIDEBAR_EDGE_ZONE w-2 comes from the primitive's SidebarRail strip beside a collapsed offcanvas sidebar.
  • keepOpen keeps its meaning. railMode is still narrow && !keepOpen. The preference's doc adds that it changes when the sidebar folds, never how a folded sidebar looks. A pin covers this at 1280 px.
  • The Console shell: the sidebar auto-collapses to an icon rail on narrow windows and expands as an overlay on click, so a 1280 px window keeps room for the split record pane #27593 pin is updated and cites the ruling. The "hover alone does not expand" case is now the left-edge float, with the ruling cited at the changed assertion and in the file header.

Each changeset sentence against the diff. The changeset is new, and main has no .changeset/*35062*. It bumps @object-ui/app-shell at patch.

  • Hidden, takes no width, nothing focusable or announced: offcanvas plus inert.
  • Both ways of collapsing look the same: the collapsible switch is on enabled, not on railMode.
  • Rest the pointer on the edge, or press there: onEdgeEnter arms a 200 ms timer, which skips touch. onEdgeLeave clears it, and a press floats at once.
  • Folds on pointer away, a choice, Esc or a page click: close('away') runs only for a hover float and not while a layer is shown. close('pointer'/'navigate') runs on a link, close('escape') keeps the Console sidebar overlay at 1280 px: the first Esc is swallowed by a hidden nav-item tooltip and does not fold the overlay #28078 hidden-tooltip rule, and close('outside') runs on an outside press.
  • A reload still finds it collapsed: a float over a hand collapse sets holdWideWindowChoice, so writeWideWindowOpen keeps nothing. floatMenu also rewrites the cookie false after the provider's setter wrote it true.
  • The trigger and ⌘B as before on a hand collapse, and float plus focus while folded: the 'command' branch moves focus to the active entry, else the first one. Esc, or a keyboard choice, returns focus to the opener or the trigger.
  • The phone keeps its bar and drawer: desktop is false there, and no edge is drawn.

Tests. The new file has 16 cases: hidden at 1600 and 1280 px, the edge's place, no edge below 768 px, keepOpen, hover delay and leave, press, the reader's choice and reload, navigation, width changes under a float, the trigger and ⌘B focus walk, and keyboard collapse. The 27593 file's cases are rewritten to the hidden collapse and keep their group and count assertions. The width file now reads 0 px reserved. There is one ablation, on the collapsible switch: it turned 31 of 38 cases red and was restored to the HEAD blob.

Clause-②: no. This is console behaviour, with no authorable key and no prop added to an @object-ui/components export. No TIER_DEFAULT record is owed.

Governance. check-governed-merges.mjs --pr 35187: NOT governed, 0 of 7 paths on the register, 1099 changed lines, under the human-merge threshold.

CI at this head, from check-runs: 39 success and 13 skipped, with none failed or in progress. The PR is mergeable clean. The branch is 11 commits behind main, with no conflict.

Must-fix

None.

Should-fix

None.

Notes

  • N1, the trigger on a hand collapse. The ruling's second bullet says the menu floats "on the top-bar trigger (and its shortcut)". Here the trigger floats it only while the sidebar is folded, and on a sidebar collapsed by hand it expands it beside the page, as before. I read that as within the ruling, for two reasons. The option Warren read ties the trigger float to the narrow fold (「窄窗口自动收起时……点顶栏按钮浮出完整菜单」). And the trigger is the only way to undo a hand collapse. The PR body and changeset both say it plainly. I am recording it so the seat can see it; this is the seat's call.
  • N2, the edge strip. While the sidebar is hidden, the strip covers the leftmost 8 px of the page below the top bar, so a press there floats the menu instead of reaching the page. That is the ruling's mechanism, and I add no ask.
  • N3, ablation coverage. The one ablation is on the collapsible switch. The wide-window hold and the cookie rewrite have no ablation of their own, but the reload cases (hand collapse at 1600 px, and choosing an entry) read both. I add no ask.
  • N4, the dev's out-of-scope notes. docs/qa/platform-checklist/areas/platform-core.json:665 (the "icon rail" step) and useResponsiveSidebar.ts's doc comment are now false. Claim amendment 6977477409 brings both into this PR, so the coming text-only delta is read against that amendment. The NavIconRailContext open-group frames during the 200 ms slide-out are unverified and remain the seat's to carry.

… and the fold hook's comment

platform-core.builtin-apps-nav-render steps[2] (revision 17) and the
useResponsiveSidebar doc comment still described the fold as an icon rail.
Under ruling 6973617688 the folded sidebar is hidden and its full menu
floats from the toggle or the window's left edge, folding back after each
chosen entry. Text only.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…ed sidebar too; "Keep sidebar open" docks it

Ruling 6973617688 names the top-bar trigger and its shortcut beside the left
edge, with no carve-out for a hand collapse. Collapsed by hand, the reader's
toggle now floats the full menu as on the fold, moves focus into it, and
changes neither the wide-window choice nor the cookie. "Keep sidebar open",
at the foot of any float, docks the sidebar as the reader's choice (kept as
the wide-window choice on a wide window, in the cookie, and on the fold as
"keep open"), so a reload keeps it docked. While the menu floats the cookie
says collapsed. Pinned.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…er's open

A browser runs a microtask checkpoint after each event listener, so React
can render the capture phase's note before the trigger's own handler (or
the provider's ⌘B listener) opens the sidebar. The note now waits for that
open and turns it into the float in the same render. Pinned with a render
forced between the two phases.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…as a browser does

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…ture phase, then toggles the provider

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…e window keeps focus in the docked menu

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…s focus to the trigger as the fold hides the sidebar

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
…en "Keep sidebar open" is pressed

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

PR body, round 2 (supersedes the body text above for review). It covers fix round 1: the icon-rail text under claim amendment 6977477409 on #35062, and the seat's 12:00Z order that the trigger and ⌘B float the menu in both collapsed states, with "Keep sidebar open" as the way back to docked. post-stamped refuses a body whose first line is Fixes #35062 rather than the signature, so the round-2 body is posted here and the PR body keeps its round-0 text. Head e8f0df44e8ec8a3fcaaabde8142fe77eb3388a61.


Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:控制台侧栏在 768 px 以上收起后完全隐藏,不再留一列没有文字的图标,列表和记录页拿到这部分宽度;鼠标在窗口最左边停约 0.2 秒(或在那里点一下),带文字和分组的完整菜单以浮层浮出,移开、选中一项、按 Esc 或点页面即收回,收起状态不变,刷新后仍是收起。无论是手动收起还是窄窗口自动收起,点顶栏按钮或按 ⌘B 也是浮出完整菜单(不再直接展开);浮出菜单底部的「Keep sidebar open」把侧栏放回页面旁,刷新后保持。
  • 为什么改:裁决 6973617688(选项 A):768 px 以上只有一种收起样子,窄窗口(低于 1416 px)自动收起时也不留图标列,左边缘悬停或点顶栏按钮浮出完整菜单;席位 2026-11-18 的指令把「顶栏按钮浮出」用于两种收起状态。
  • 风险与回滚:只动 @object-ui/app-shell 里控制台自己的侧栏行为;@object-ui/components 的侧栏原语、展开状态的侧栏、手机端底部菜单栏都没改。回滚即 revert 本 PR,图标列回来。
  • 先看:① ui/packages/app-shell/src/layout/consoleSidebarRail.ts 的 useConsoleSidebarRailPanel(手动收起时按钮与 ⌘B 在捕获阶段记一笔、等 provider 打开后才算浮出;dock / undock 与焦点去向;浮出时不写入"宽窗口选择"和 cookie);② UnifiedSidebar.tsx 的 collapsible、左边缘条与底部「Keep sidebar open」;③ UnifiedSidebar.railOverlay-27593.test.tsx 中按裁决改掉的 "hover alone does not expand" 断言。
  • 两分钟验证:1600×900 打开 CRM,点顶栏左侧的切换按钮收起 → 左边没有图标列、列表占满宽度;再点一次 → 完整菜单浮出、底部有「Keep sidebar open」;点 Accounts → 跳到客户列表、菜单收回、侧栏仍收起;再浮出并点「Keep sidebar open」→ 侧栏回到页面旁,刷新后仍展开。
  • 需要你做的:无,席位落地。

What changes

Ruling 6973617688 (option A) on #35062: from 768 px up there is one collapsed look, the hidden one, for both the hand collapse and the #27593 fold below 1416 px.

  • Hidden collapse. With railOverlay on (the console), UnifiedSidebar draws the primitive's collapsible="offcanvas" instead of "icon". Collapsed, its gap is 0 wide, its panel sits off-screen and is inert (nothing in it is focusable or announced). The icon rail's click-to-expand (RAIL_CONTROL) is gone with the icon column. With railOverlay off, the provider's icon rail is drawn as before.
  • The left edge. While hidden, an 8 px strip at the window's left edge (below the top bar) floats the full menu, with labels and groups, over the content. A mouse pointer resting on it floats the menu after 200 ms, and a press floats it at once. Touch never starts the hover timer.
  • Folding back. A float the pointer opened folds after the pointer has been away from it for 150 ms. It does not fold while a menu or dialog layer is open over the page. Any float folds on a press outside it, on Esc, and on any navigation (an entry chosen in it, the command palette, Back). For Esc, the Console sidebar overlay at 1280 px: the first Esc is swallowed by a hidden nav-item tooltip and does not fold the overlay #28078 hidden-tooltip rule is kept: an Esc already handled by a layer does not fold it, unless the only thing that handled it was a hidden tooltip.
  • Nothing the reader chose changes. Floating over a sidebar collapsed by hand writes neither the wide-window choice (Console sidebar: toggling "Keep sidebar open" on a narrow window overwrites the wide-window collapsed/expanded choice #28079) nor the primitive's sidebar_state cookie. A reload therefore comes back collapsed. A window that turns wide or narrow under such a float ends it, and the sidebar takes the reader's state for the new width.
  • Trigger and ⌘B. In both collapsed states, by hand and the fold (below 1416 px, "Keep sidebar open" off), they float the menu instead of expanding it, and move focus to the entry of the page in view, or else to the first entry. Ruling 6973617688 names the trigger beside the edge with no carve-out for a hand collapse; the seat's order of 2026-11-18 on this PR applies it to both states. The collapsed state is not changed: a float over a hand collapse writes neither the wide-window choice nor the sidebar_state cookie. On a hand collapse the trigger's click and ⌘B are noted in the capture phase, and the float is taken only once the provider's own toggle has opened the sidebar, so a render between the two (a browser runs a microtask checkpoint after each listener) cannot drop it. When the menu folds:
    • Esc, or an entry chosen from the keyboard, gives focus back to the trigger (or to wherever it came from).
    • A pointer close does not move focus anywhere else; it only drops focus from the hidden menu.
  • "Keep sidebar open" is the way back to docked. It is the existing control and string (sidebar.keepOpen, "Keep sidebar open"); no i18n key was added. It now sits at the foot of every float:
    • On a hand collapse it puts the sidebar back beside the page, remembered as an expand always was (wide-window choice and cookie true), so a reload keeps it docked.
    • On the fold it turns the fold off (console.sidebar.keepOpen, as before) and stays at the foot of the docked sidebar, pressed, to turn the fold on again.
    • From the keyboard: docking on a wide window keeps focus in the menu, on the entry of the page in view; turning it off on the fold gives focus to the trigger (before, focus fell to the page body when the control went away).
    • A sidebar kept open and then collapsed by hand is hidden like any other.
  • Unchanged:

Precedents for the two numbers the ruling left open:

  • Hover timings 200 ms / 150 ms: the components package's NavigationMenu, the one menu there that opens on hover. It is Radix's navigation menu with no override (delayDuration 200, close timer 150).
  • Strip width 8 px: the strip the primitive's own SidebarRail leaves inside the viewport beside a collapsed offcanvas sidebar. That rail is w-4, moved -right-2 past the panel's edge.

Both are cited at the constants in consoleSidebarRail.ts.

Public surface. @object-ui/app-shell is private: true. The renamed and removed constants (RAIL_OVERLAY_FRAME_KEEPS_GAP became RAIL_OVERLAY_FRAME_NO_GAP; RAIL_CONTROL was removed) and the new ones (SIDEBAR_FLOAT_OPEN_DELAY_MS, SIDEBAR_FLOAT_CLOSE_DELAY_MS, SIDEBAR_EDGE_ZONE, useConsoleSidebarRailPanel) are module exports of layout/consoleSidebarRail.ts, which the package entry does not re-export. No prop was added to UnifiedSidebar or to any @object-ui/components export.

Tests

  • New: UnifiedSidebar.hiddenCollapse-35062.test.tsx (22 tests). It covers:
    • hand collapse at 1600 px is hidden: gap token, inert, no icon column; the trigger floats it (wide-window choice and cookie stay false); "Keep sidebar open" in the float docks it, writes both as true, and a reload is docked;
    • fold at 1280 px is hidden;
    • the edge strip is placed below the top bar; there is no strip at 700 px;
    • "Keep sidebar open" still turns the fold off; kept open and collapsed by hand at 1280 px, the trigger floats it and "Keep sidebar open" docks it again, after a reload too; in the fold's float it docks the sidebar and turns the fold off, after a reload too;
    • hover: nothing at 199 ms, a float at 200 ms with labels and groups; a pointer inside keeps it; away 150 ms folds it; leaving the edge early floats nothing; a press floats it until a press outside;
    • a float at 1600 px writes neither the wide-window choice nor the cookie, and a reload is collapsed;
    • choosing an entry navigates, folds the menu, stays collapsed, and stays collapsed after a reload;
    • resizing under a float, both ways;
    • the trigger, on a hand collapse at 1600 px and on the fold at 1280 px, floats the menu and moves focus in; Esc folds it and focus goes back to the trigger;
    • on a hand collapse, a click stopped after its capture phase and rendered (act), with the provider's toggle coming after on its own, still floats it;
    • ⌘B floats and folds it on a hand collapse and on the fold; an entry chosen from the keyboard gives focus back to the trigger; Ctrl+B collapsing with focus inside moves focus to the trigger;
    • "Keep sidebar open" from the keyboard: docking at 1600 px keeps focus in the menu; turning it off at 1280 px gives focus to the trigger.
  • Updated: UnifiedSidebar.railOverlay-27593.test.tsx (22 tests). Folded now means hidden. The "hover alone does not expand" pin became "resting the pointer on the window's left edge floats it", and the changed assertion cites ruling 6973617688. The Console sidebar in icon-rail mode: entries of a collapsed nav group (Account → Developer, Setup → Advanced) are not reachable at all #32156 collapsed-group cases now run in the float.
  • Updated: consoleSidebarRail.width-27593.test.tsx. At 1280 and 1366 px the hidden sidebar leaves the list its columns beside the record drawer.

Local runs (the verify lock's VERDICT lines), at head e8f0df44e (origin/main merged in at c787255a4):

App-shell layout folder, useResponsiveSidebar, and the components and layout sidebar tests: 157 files / 1162 tests passed
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/hooks/__tests__/useResponsiveSidebar.test.tsx packages/app-shell/src/layout/ (+ 14 components/layout sidebar test files)
 Test Files  157 passed (157)
      Tests  1162 passed (1162)
os-verify-lock: VERDICT command-exit 0

Earlier, wider runs:

  • 238 test files / 2068 tests passed at b13e21c8c: the app-shell layout folder; the console, AppContent and studio tests that import the changed modules; the components and layout sidebar tests.
  • @object-ui/app-shell type-check (tsc --noEmit and tsconfig.test.json, which compiles the tests) exited 0 at e8f0df44e.

ESLint on the seven changed source and test files reports the same 8 warnings as on base, all in pre-existing UnifiedSidebar.tsx code, and no new ones.

Ablation (one-shot, nothing kept). At 875190b8b, node scripts/ablation-replace.mjs replaced collapsible: enabled ? 'offcanvas' : 'icon', with collapsible: 'icon',. Anchor 1 to 0, blob 0fba4212c986 to dfd56823bf9e. Under the mutation, the 35062 and 27593 files went red: 31 failed and 7 passed of 38 (35062: 14 of 16 failed; 27593: 17 of 22 failed). The tool's own trap restored the file: the blob equals HEAD's 0fba4212c986, and git diff HEAD is empty. The tests import the source through relative paths, so no dist was involved.

Ablations of this round (one-shot, nothing kept; each restore proven by blob == HEAD and an empty git diff HEAD):

  • The float on a hand collapse, at 71380c8c0: if (!hiddenByHand) return undefined; became if (!hiddenByHand || hiddenByHand) return undefined; (blob e93a889c1900 to bb1bfb2116a9). 4 failed, 15 passed of 19: the hand-collapse trigger float and dock, the keep-open case at 1280 px, the trigger focus case, and ⌘B.
  • The dock remembered across a reload, at 71380c8c0: if (widthRef.current === 'wide') writeWideWindowOpen(true); deleted (blob e93a889c1900 to 33297711560e). 1 failed, 18 passed of 19: the hand-collapse case at its reload.
  • The float waits for the provider's open, at 9598e5f4d: if (toggleFloats !== null && open) { became if (toggleFloats !== null) { (blob 2307b222fe19 to 3269af93d790). 1 failed, 19 passed of 20: the render-between case. The first two versions of that pin (at 6d9643782 and 010eef9f6, forcing a render with flushSync inside the click) stayed green under the same mutation, which had landed; they did not discriminate, so the pin was rebuilt to stop the click after its capture phase and toggle the provider after, and this run is the reading.
  • Focus after docking from the keyboard, at c8bcf0dc8: if (closer === 'dock' && lost) floatFocusTarget(root)?.focus({ preventScroll: true }); deleted (blob 901826f2347a to 9a009202f454). 1 failed, 21 passed of 22: the 1600 px dock-focus case.
  • Focus after turning "Keep sidebar open" off, at c8bcf0dc8: if (undid && lost) { became if (false && undid && lost) { (blob 901826f2347a to 1230b8f78812). 1 failed, 21 passed of 22: the 1280 px undock-focus case.

Acceptance notes

  • Browser pass. A real browser checked the card's three acceptance lines. The setup was the CRM example on objectstack dev, the console's Vite dev server proxied to it, and headless Chromium, at 1600×900 and 1280×800.
    • At 1600 px, collapsing with the trigger leaves the gap 0 px wide and the panel at x = -256. The list's main grows from x = 256 / 1344 px wide to x = 0 / 1600 px. The edge strip is 8 px wide at y = 48, below the top bar.
    • Resting the pointer on the edge floats the panel at x = 0 over the content (main stays 1600 px), showing Leads, Accounts, Contacts, Opportunities, Activities and Pipeline under their groups. Moving away folds it.
    • Clicking Accounts in the float navigates to the accounts list. The menu folds, the sidebar stays collapsed, and the cookie and wide-window choice stay false. A reload is still collapsed.
    • At 1280 px the fold is hidden the same way. Enter on the trigger floats the menu with focus on the Accounts entry; Tab walks to Contacts; Esc folds it, with focus back on the trigger. Hover floats and folds the same way.
    • At 700 px there is no desktop sidebar and no edge strip.
    • The servers were stopped afterwards, and the screenshots stayed out of the tree.
  • Browser pass of this round, same setup, at the code of 8a78cd371:
    • 1600×900: the trigger collapses it (hidden, panel x = -256, cookie and wide-window choice false). The trigger again floats it (panel x = 0, data-console-rail="overlay") with focus on the Leads entry and "Keep sidebar open" visible at its foot, unpressed; cookie and choice stay false. Esc folds it, with focus on the trigger. Ctrl+B floats it and Ctrl+B again folds it, the same way.
    • Enter on the trigger floats it, and Enter on "Keep sidebar open" docks it: no rail attribute, cookie and choice true, focus on the Leads entry. A reload is docked.
    • 1280×800: folded and hidden. The trigger floats it; "Keep sidebar open" docks it and stays at the foot, pressed; a reload is docked with it pressed. Enter on it again folds the sidebar, hidden, with focus on the trigger.
  • Cookie during a float. Any float now writes the primitive's cookie back to false as it opens, so the cookie reads false while the menu floats, on a hand collapse and on the fold alike (measured at 1600 and 1280 px). A reload on the fold still starts folded through primeConsoleSidebarOpen (Console sidebar at 1280 px: the first frame draws the full 256 px sidebar over the content, then animates to the 48 px rail #28077).
  • Icon-rail text fixed in this round. The doc comment of hooks/useResponsiveSidebar.ts and step 3 of platform-core.builtin-apps-nav-render in docs/qa/platform-checklist/areas/platform-core.json (revision 16 to 17, history entry citing ruling 6973617688 and this PR) no longer say the fold leaves an icon rail: folded, the sidebar is hidden, and the trigger (Ctrl/⌘+B) or the left edge floats the full menu, which folds back after each chosen entry. The walk is unchanged in substance.
  • The ui/packages/cli generator template was left as it is (see What changes).

Verification

  • Gates derived with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on this diff (46 commands), all run locally at e8f0df44e:
46 derived gate commands: 45 exited 0, `check:platform-checklist` exited 1 on an item this PR does not touch (reconciled: 46 derived, 46 run, 0 NOT-MEASURED, a derived zero)
  • node scripts/check-adr-0087-registration.mjs (--base origin/main and --self-test), check-adr-links.mjs (and --self-test), check-changeset-no-major.mjs --base origin/main, check-closing-keyword-parity.mjs (and --self-test), check-comment-mask-corpus.mjs, check-empty-changeset.mjs (--base origin/main and --self-test), check-sdui-manifest.mjs (and --self-test), ci/plan-test-core-shards.mjs --self-test, ci/snapshot-next.mjs --self-test, pm/check-governed-queue-guard.mjs --self-test, pm/release-rehearsal-clone.mjs --self-test, release-pending-publish.mjs --self-test: exit 0 each.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions, pnpm --filter @objectstack/spec run check:duration-unit-keys, and pnpm check: adr-anchors, changeset-gate-self-tests, ci-filter-parity, closed-ceremony-text, cross-package-test-inputs, dispatcher-error-vocabulary, doc-authoring, driver-memory-census, engine-double-contract, error-status-conformance, gitlink-declared, nul-bytes, published-files, query-options-erasure, refd-timer-probe, registry-log-declared, rest-log-spy-declared, skill-identifier-liveness, test-source-alias, tier-file-adoption, type-check-coverage, type-check-debt, undeclared-dep-imports, watch-hint-literal, where-matcher: exit 0 each.
  • pnpm --dir ui exec vitest run scripts/: 171 files passed, 2 skipped / 5092 tests passed, 2 skipped; VERDICT command-exit 0.
  • pnpm check:platform-checklist: exit 1, on platform-core.seed-mode-matrix: VARIANTS STALE only (SeedMode read as 0 members against 5). The same gate exits 1 on the same item with origin/main's own platform-core.json in place (blob 1251cd4d4798), so it is not this change; the item this PR edits (platform-core.builtin-apps-nav-render) raises nothing. The gate is off per-PR CI by standing maintainer decision.
  • node scripts/pm/overlap-check.mjs before the push of e8f0df44e: VERDICT overlap exit 1. origin/main merges cleanly. fix(settings)!: offer the knowledge settings only where the knowledge service is mounted #34223 (draft) conflicts on docs/qa/platform-checklist/areas/platform-core.json: it bumps the same item, platform-core.builtin-apps-nav-render, from revision 15 to 16, which main already carries as 16, and it also conflicts with main on its own (packages/cli/test/connect-agent-both-halves-wire.pin.test.ts). Whichever lands second takes the next revision. The push was a fast-forward, not forced.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main (round 1, when an app-shell export was renamed): exit 0, with 0 anchored files. This round renamed or removed no export.
  • CI at e8f0df44e: 55 check-runs, 44 success and 11 skipped, none failing (Test UI, Test Core, Type Check UI, Lint UI, Lint · ESLint, Check Changeset, PR-body guards and the rest).
  • A self-scan for control bytes over the changed files found no hits.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Final green head for the L1 delta: e8f0df44e8ec8a3fcaaabde8142fe77eb3388a61 · 2026-11-18T13:10Z

Check-runs on this head: 44 success, 11 skipped, 0 failed, 0 pending. Mergeable: clean. Size +1198 −154, 9 files, not governed. Delta since the L1 ACCEPT at 875190b8 (6977508021):

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 delta review (#35062) · 2026-11-18T13:12Z

L1: ACCEPT
Head-sha: e8f0df4
Delta read: 875190b (my ACCEPT 6977508021, stamped 2026-11-18T11:39Z) → e8f0df4. I read it with claim amendment 6977477409, the round-2 body 6979517326, which carries the seat's order of 2026-11-18 that the trigger and ⌘B float the menu in both collapsed states, and dev report 6979463016.

  • What the delta holds. Seven commits of the PR's own (a99f4bc to c8bcf0d) and one merge of main, e8f0df4 (merging c787255).
  • The merge. main touched none of the PR's 9 files between a6cf988 and c787255, so the merge has no conflict and leaves the PR's patch as it was.
  • File list. It goes from 7 to 9 paths. The two new paths are the ones amendment 6977477409 adds.

Amendment 6977477409, text only.

  • platform-core.json builtin-apps-nav-render: revision 16 becomes 17, with a changelog entry. Step 2 now says the fold hides the sidebar. The walk floats the menu with the toggle or the left edge, and floats it again after each entry. No clause changed.
  • useResponsiveSidebar.ts: the doc comment and one code comment change. The code is unchanged.

The seat's order: the trigger and ⌘B float the menu in both states. This supersedes my N1 at 875190b.

  • The float on a hand collapse. While the sidebar is hidden by hand, capture-phase listeners note a trigger click (document click) or the provider's chord (b with meta or ctrl, matching SIDEBAR_KEYBOARD_SHORTCUT). They note it ahead of the provider's toggle. The render that sees open turns the note into floatOn.
  • A render between the two. The note waits for open, so a render in between does not drop it.
  • A toggle another listener swallowed. A 0 ms timeout drops the note and releases the wide-window hold, unless the menu now floats.
  • The cookie. A layout effect writes it false while the menu floats, which replaces the old write in floatMenu. A reload during a float therefore comes back collapsed.
  • "Keep sidebar open" in the float docks. It shows at the foot of the float. Pressing it releases the hold, turns the fold off on the fold (setKeepOpen(true)), clears floatOn and calls setOpen(true). The primitive's setter writes the cookie on every call, true here. On a wide window it also writes the wide-window choice true. The floatedOn effect now keeps open when a float ends at the same width on desktop, which only a dock does. So the dock survives a reload at both 1600 px and 1280 px (pins).
  • "Keep sidebar open" in a kept-open narrow sidebar. It is still pressed, and turns the fold back on.
  • The two focus fixes. After a keyboard dock, focus stays in the menu. After turning keep-open off from the keyboard, focus goes to the trigger as the fold hides the sidebar.

Changeset against the diff. The trigger sentence now says the trigger and ⌘B float the menu "however the sidebar was collapsed". It names "Keep sidebar open" as the way back to docked, kept after a reload and, on a narrow window, keeping the fold off. Both statements match the code above. The doc comments in consoleSidebarRail.ts, UnifiedSidebar.tsx and LocalizedSidebarTrigger.tsx say the same.

Tests and ablations. The 35062 file grows to 22 cases. They add the hand-collapse trigger float and its dock with a reload at 1600 px, the fold's float dock with a reload at 1280 px, a render between the capture phase and the provider's toggle, ⌘B, and the two keyboard focus cases. Five ablations each turned their case red and were restored to the HEAD blob, as 6979463016 and the round-2 body record. The render-between pin was rebuilt after its first two versions stayed green under the mutation. The rebuilt pin discriminates.

Governance. check-governed-merges.mjs --pr 35187: NOT governed, 9 paths, 1352 changed lines, under the human-merge threshold.

CI at this head, from check-runs: 44 success and 11 skipped, with none failed or in progress. The PR is mergeable clean. check:platform-checklist is red on main (seed-mode-matrix VARIANTS STALE). It is not a per-PR context, and this PR does not cause it.

Must-fix

None.

Should-fix

None.

Notes

  • N1, where the order is recorded. The seat's order on the trigger lives in the round-2 body comment 6979517326 on this PR. 应用侧栏:收起后完全隐藏,不再留一列没有文字的图标;鼠标移到左边缘时浮出完整菜单 #35062 has no comment for it. The landing record may cite 6979517326 so that the card shows why the trigger floats on a hand collapse.
  • N2, a cosmetic case. In a narrow window, with "Keep sidebar open" on and the sidebar collapsed by hand, the float shows "Keep sidebar open" unpressed, because keepOpenControl in a float is always pressed: false. Pressing it docks, which is the right action. I add no ask.
  • N3, the earlier notes. N2 to N4 of my 6977508021 stand as written there, except that the two "icon rail" texts of N4 are now fixed under amendment 6977477409.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm

Landing · head e8f0df44e8ec8a3fcaaabde8142fe77eb3388a61 · 2026-11-18T13:13Z

probe reading
L1 L1-a ACCEPT 6977508021 at 875190b8, delta ACCEPT 6979604376 at this head; no L2 owed (Clause-②: no; @object-ui/app-shell private, no @object-ui/components export or prop)
scope ruling 6973617688 (option A); claim 6973692164 with the seat's open-point orders; claim amendment 6977477409 (icon-rail text); the seat's order of 2026-11-18T12:00Z that the trigger and ⌘B float the menu in both collapsed states, with "Keep sidebar open" as the way back to docked (round-2 body 6979517326)
check-governed-merges.mjs --pr 35187 NOT governed; 1352 changed lines ≤ 3000
CI on head 44 success, 11 skipped, 0 failed; mergeable clean
K (first-parent commits on main since the merge of c787255a4) 1 (< 15)

The PR body keeps its round-0 text (post-stamped refuses a body that starts with Fixes); the round-2 body of record is comment 6979517326. Draft #34223 bumps the same checklist item's revision; whichever lands second takes the next revision.
Ready + auto-merge now; the area follows it to MERGED and closes out #35062.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 13:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 756aba2 Nov 18, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35062-sidebar-hidden-collapse branch November 18, 2026 13:33
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

Development

Successfully merging this pull request may close these issues.

应用侧栏:收起后完全隐藏,不再留一列没有文字的图标;鼠标移到左边缘时浮出完整菜单

2 participants