Skip to content

feat(app-shell): the left sidebar resizes by its edge and floats as a card; a menu opened from the float keeps it out - #36655

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-9amm3d
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-9amm3d

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Fixes #36227
Fixes #36471
Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:电脑上左侧栏钉住时,拖右边缘可以调宽(200 到 350),双击回到默认宽度,刷新后宽度还在;侧栏收起后从屏幕最左边浮出来时,变成四周留边、圆角、带阴影的卡片,宽度和钉住时一样;从浮出的侧栏点应用名,菜单完整显示,侧栏不再缩回去把菜单切掉。
  • 为什么做:外壳专题里「左侧栏照 Attio 改」这一张,加上验收时发现的应用菜单被切掉的缺陷。
  • 出错会怎样:最坏是侧栏宽度或浮出样式不对、浮出的侧栏收回时机不对,菜单和页面内容都不受影响;可以直接撤回本次合并。
  • 要你做什么:无。

What changes

Resize (#36227) — ui/packages/app-shell/src/layout/SidebarWidthHandle.tsx (new), UnifiedSidebar.tsx, consoleSidebarRail.ts

  • From 768 px up, the docked sidebar's right edge is a role="separator" handle: a pointer drag resizes it between 200 and 350 px (Attio's range, the card's numbers), a double-click comes back to 256 (unchanged default), ← → move it 16 px, Home / End go to either end.
  • The width is a per-browser reader preference, console.sidebar.width (CONSOLE_SIDEBAR_WIDTH_PREFERENCE, stored {"width":N,"v":1}, read back clamped to the range). Kept on drag end, not mid-drag.
  • The width reaches the primitive by setting --sidebar-width on the console's display: contents frame around the sidebar, so the in-flow gap, the docked panel and the float all take it. While a drag runs the frame turns off the primitive's width transition so the panel follows the pointer. The phone drawer is untouched (it sets its own width), and so is @object-ui/components.
  • The float has no handle: the card asks for a resizable docked sidebar only.

The float is a card (#36227 items 2–4) — RAIL_OVERLAY_PANEL, RAIL_HIDDEN_PANEL in consoleSidebarRail.ts

A menu opened from the float keeps it out (#36471) — useConsoleSidebarRailPanel

  • Root cause, reproduced in a browser on this branch's base: the pointer moves onto the app name while the float is still sliding in, so for a moment it is past the panel's edge. That starts the 150 ms "pointer away" clock. The press on the app name opens the menu, but the clock was never stopped: it fires and folds the float, and the menu stays anchored to a trigger now off-screen (the card's second screenshot). The timer only checked "is a menu open" on later pointer moves, never when it fired.
  • Fix: a press in the float (the app name, the account, an entry's …, an entry) stops the clock; and when the clock fires it folds only if no menu or dialog is open and the pointer is not on the float. "On the float" includes the 8 px margin the card now keeps from the window edge, where the pointer that floated it rests.
  • After the menu closes (Esc, or a choice), the float folds by the usual rules: a move away, a navigation, a press outside.
  • Card item 2 (the account menu, the notification panel, an entry's …): the same press path, so the same fix. The account menu and an entry's … were checked in the browser (screenshots 6 and 7).

i18n — sidebar.resize ("Resize sidebar", the handle's accessible name) in all 11 locales.

Screenshots (1440 × 900, local showcase app, this branch)

Docked, default 256 Dragged to the widest, 350
docked 256 dragged 350
Collapsed, floated from the left edge: a card (kept width 321) Before: app name pressed while the float slid in, the float folded and the menu is cut off (same race, base code)
float card before
After: the same race, the menu is whole and the float stays The account menu from the float
after account
An entry's … menu from the float Side preview open, sidebar dragged wider: the preview keeps its place and width (left 972, width 460 before and after)
item menu preview

Tests

  • UnifiedSidebar.hiddenCollapse-35062.test.tsx (the shared harness, two new top-level describes, 10 tests):
  • Run at eb24661e2 (from ui/, pnpm exec vitest run packages/app-shell/src/layout/__tests__/): Test Files 155 passed (155), Tests 1276 passed (1276). tsc --noEmit of @object-ui/app-shell: exit 0; eslint on the changed files: clean. At eebb75006 the 30 dispatch-gates --commands families ran locally, all exit 0.
  • Ablation (one-off, scripts/ablation-replace.mjs, restored to the HEAD blob each time): removing both halves of the 侧栏收起时从滑出的侧栏点应用名:侧栏收回去,应用菜单留在屏幕最左边被切掉一截 #36471 fix turns the three press/keyboard tests red; removing only the press half turns "a press in the float stops the fold's clock" red; removing only the fire-time check turns the keyboard test red. Each half is pinned by its own test. Dropping the handle's unmount cleanup turns the mid-drag test red.
  • consoleSidebarRail.width-27593.test.tsx: comment only (the 256 it pins is now the default, not a fixed width).

Acceptance notes

  • The sidebar's background is the theme's translucent bg-sidebar with a backdrop blur (pre-existing). Over page content the card shows a blurred hint of what is under it near its edge (visible in screenshot 3). Attio's card is opaque; not changed here.
  • On a touch screen nothing new: the float still opens by the expand button or a press on the edge, the handle takes a drag.
  • The card's "what width folds automatically" stays out of scope, as the card says.

Verification

Read first, by risk: consoleSidebarRail.ts (the fold timer and pointerOnFloat), UnifiedSidebar.tsx (the frame's --sidebar-width), SidebarWidthHandle.tsx.

Two-minute check: at 1440 wide, drag the sidebar's right edge right, then double-click it; collapse with the sidebar's button, rest the mouse on the window's left edge, and as the card slides in click the app name: the app menu shows whole and the sidebar stays until you press Esc and move away.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: eebb750068c5d5a22372f46ee678f400be42da97
Local-runs: none
Scope: the full diff git diff $(git merge-base origin/main pr36655) pr36655 (17 files: .changeset/36227-sidebar-resize-float-card.md, ui/packages/app-shell/src/layout/SidebarWidthHandle.tsx, UnifiedSidebar.tsx, consoleSidebarRail.ts, __tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx, __tests__/consoleSidebarRail.width-27593.test.tsx, the 11 ui/packages/i18n/src/locales/*.ts) + cited at head: ui/packages/app-shell/package.json, ui/packages/app-shell/src/index.ts, ui/packages/app-shell/src/layout/index.ts, ui/packages/app-shell/src/utils/workspacePreference.ts, ui/packages/components/src/ui/sidebar.tsx (lines 236-290), ui/packages/plugin-detail/src/RecordPageColumns.tsx (the sibling handle), ui/packages/app-shell/src/context/FavoritesProvider.tsx (user-scoped keys, for comparison), scripts/check-changeset-no-major.mjs (header), scripts/pm/clause2-line.mjs (line regexes), AGENTS.md lines 1018-1040; PR #36655 body; cards #36227 and #36471 with their comments; head check runs (REST)
Security-touching: no
Rule-change-verified: none

① Derived judgments

  • Published surface is the one i18n key. sidebar.resize is added under sidebar in all 11 locale files (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant). Each is a real translation, none is English copied over.
  • No new public export. @object-ui/app-shell is "private": true, and its only exports entry is . -> dist/index.js. Neither src/index.ts nor src/layout/index.ts re-exports consoleSidebarRail.ts or SidebarWidthHandle.tsx. The new constants (CONSOLE_SIDEBAR_MIN_WIDTH, CONSOLE_SIDEBAR_MAX_WIDTH, clampConsoleSidebarWidth, CONSOLE_SIDEBAR_WIDTH_PREFERENCE, RAIL_HIDDEN_PANEL, SIDEBAR_RESIZING_FRAME, SIDEBAR_WIDTH_KEY_STEP) and the SidebarWidthHandle component are module exports inside the package only. @object-ui/components is untouched.
  • Declarations hold. Clause-②: yes (widening) is right for an added i18n key. Metadata-protocol: none is right: no spec, schema or authorable key moves. The width is a reader preference in localStorage, not metadata.
  • Note: the changeset's Clause-② gloss says the widening also includes "new exports from the app shell's sidebar module (the width range, its kept preference and the float's classes)". That contradicts the PR body and the claim amendment ("no spec, schema or published export change"), and it is not true of the published surface. It over-claims and changes nothing, but the text lands in the i18n CHANGELOG. Trim it to the one key.

② Semver level

  • Both moved packages (@object-ui/app-shell, @object-ui/i18n) have a patch entry. Metadata-protocol: none requires patch on every entry under the level axis of scripts/check-changeset-no-major.mjs. No major. No authorable-surface/ or authorable-defaults/ baseline moves.
  • Both declaration lines start at the beginning of a line in the PR body and in the changeset body. clause2-line.mjs reads the arm as a prefix, so the trailing gloss does not affect parsing. Check Changeset is green at head (2 of 2 runs).
  • Level: correct.

③ Boundary flags

  • Width store, per browser. The key is os:pref:console.sidebar.width (workspace preference, scope user, which means "this reader, across objects". It is not keyed by user id). Two people on one shared browser share the width. Favorites, recents and last-app use scopedKey(..., userId, orgId) because they hold user data. A pixel width is not sensitive, and the sibling console.sidebar.keepOpen and record-details width use the same unscoped store. Card 左侧栏:可以拖动调宽(双击复位);收起后的浮出样式照 Attio 改,鼠标移走就收回 #36227 asks for "记在浏览器里" (kept in the browser). Note only.
  • Clamping on read. The codec's fromRecord takes only a finite number and clamps it to 200..350. Anything else answers "no choice", which falls back to 256. A newer v or a malformed record also answers "no choice" (the module's contract). The test pins 9000 -> 350. Note: there is no test for a below-range value or a non-number value. The code covers both.
  • Below 768 px. docked needs desktop, and the frame's --sidebar-width style is set only when rail.desktop. The phone drawer keeps SIDEBAR_WIDTH_MOBILE. A test pins 700 px: no handle and no width. No other consumer reads --sidebar-width outside the frame. Note: at 768 px a 350 px sidebar leaves 418 px for content, and the 1280 px rail threshold in consoleSidebarRail.width-27593 is costed at 256. A reader who widens the sidebar pays up to 94 px more. This is the reader's own choice, and screenshot 8 shows the preview is unaffected.
  • Keyboard a11y. The handle has role="separator", aria-orientation="vertical", a translated aria-label, aria-valuenow/min/max, and tabIndex=0. Left and right arrows move it 16 px, Home and End go to the ends, and the focus-visible ring is drawn on the inner bar. Tests pin all keys and the ARIA values. Note: no aria-controls. This is optional, and the sibling RecordPageColumns handle omits it too.
  • 侧栏收起时从滑出的侧栏点应用名:侧栏收回去,应用菜单留在屏幕最左边被切掉一截 #36471 fix. A press in the float clears closeTimer. When the timer fires, it folds only if no menu or dialog is shown and the last away point is not now on the panel. Stuck-open check: when the fire-time check bails, it leaves closeTimer undefined. The next pointer move off the float restarts the clock, and a press outside, Esc, a navigation and Ctrl/Cmd+B still close or dock it. So the float stays open after a menu closes only until the next move, which is what the card asks for ("菜单关闭后再按平时的规则收回"). Test "once the menu closes, moving away folds the float as before" pins this. layerShown() is document-wide, so any open dialog anywhere holds the float. That was already true on the move path before this PR. The PR adds the same check at fire time, so it adds no new kind of hold. pointerOnFloat reads the panel's live box and allows the card's 8 px margin, which matches the card geometry.
  • Cleanup. Both closeTimer clears are in the effect cleanup, and the unmount effect still clears both timers. The handle adds no document listeners. Note: SidebarWidthHandle writes cursor and user-select on document.body and has no unmount cleanup. UnifiedSidebar never resets dragWidth when the handle goes away. If the handle unmounts mid-drag (Ctrl/Cmd+B pressed while the edge is held, or the window crossing 768 px mid-drag), body keeps user-select: none, the width stays at the drag value and the frame keeps transition-none until the next drag ends or the page reloads. The fix is small: a useEffect cleanup that calls end(false) when drag.current is set. Classed as a note, not should-fix, because a user only reaches it by unmounting the handle while holding a drag.
  • Tests. consoleSidebarRail.width-27593.test.tsx changes only a doc comment ("fixed at 256" becomes "default 256; the reader may drag it"). No assertion changed, and the 256 equality with the primitive is still pinned. This is justified. In UnifiedSidebar.hiddenCollapse-35062.test.tsx the changes are import additions plus 9 new tests, with no existing test edited. UnifiedSidebar.railOverlay-27593.test.tsx still asserts every RAIL_OVERLAY_PANEL token on the panel, and the token set got larger. No test is weakened. CI at head: Type Check, Lint, Check Changeset, Build & E2E UI and Live E2E UI are green. Test UI shards 3, 8 and 10 are green, and the other shards were still running when read.

④ Design judgment

  • 左侧栏:可以拖动调宽(双击复位);收起后的浮出样式照 Attio 改,鼠标移走就收回 #36227 item 1 (drag 200..350, double-click back to 256, kept and reloaded): implemented and pinned. The numbers match the card. The default stays 256, not Attio's 275, as the card says.
  • Items 2 and 4 (card float, kept width): the float is 8 px off the left, top and bottom edges, with rounded-lg, a border and shadow-xl. There is no backdrop and the gap stays 0, so nothing is dimmed or moved. The float takes --sidebar-width from the frame. The hidden panel is parked by its width plus 2 rem, so the shadow does not show at the edge. Item 3 (hover floats it, moving away folds it, the button docks it) was already on main and is unchanged. Note: the panel's translucent bg-sidebar with blur is pre-existing and differs from Attio's opaque card. The PR says this openly, and it is out of the card's scope.
  • The float has no handle. This is a reasonable reading: the card asks for resizing only while docked.
  • 侧栏收起时从滑出的侧栏点应用名:侧栏收回去,应用菜单留在屏幕最左边被切掉一截 #36471: the root cause is stated (the away clock started while the float was sliding in, and nothing checked it at fire time) and fixed at both halves. The PR body says an ablation pins each half. Item 2 (account menu, an entry's …) has browser screenshots. The notification panel is not shown, but it uses the same press path and the same layer check (a popover is role="dialog"). Note.
  • The shape follows the sibling RecordPageColumns handle (preview during a drag, commit when it ends). It is small and local, and it does not change @object-ui/components.

Open must-fix: none. Open should-fix: none. Notes: the changeset gloss over-claims the surface (①); no handle cleanup on unmount mid-drag (③); the width is per browser, not per user (③); no below-range or non-number read test (③); the 768 px and 1280 px cost at 350 (③); no aria-controls (③); translucent card and notification panel not shown (④).

Implemented-by: claude/project-thread-9amm3d
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

… a cancel; the changeset names only the i18n key (#36227)

The width handle unmounts mid-drag when ⌘/Ctrl+B folds the sidebar or the
window narrows past 768 px. Its unmount now ends the drag as a pointer-cancel
does: body cursor and user-select are restored and the preview width is
dropped, so the sidebar goes back to the width it had. A test pins both paths.

The changeset's Clause-② gloss claimed new exports from the app shell's
sidebar module; app-shell is private and re-exports neither, so it now names
the one i18n key, as the PR body does.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbWjfzbfpWXFKqr1sFF

Test UI (2/16) failed at eebb75006 on one test, plugin-form/src/__tests__/lineItemsPrintRowCap-11958.test.tsx: "draws the cap's rows…" fails with expected +0 to be 2. The failure isn't this PR's:

Once #36656 lands, merging main clears it. No change for it here.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: eb24661e2b81dc53b47d6657569cdfbbf1ea0bc6
Local-runs: none
Scope: round 2 delta git diff eebb7500..eb24661e (3 files: .changeset/36227-sidebar-resize-float-card.md, ui/packages/app-shell/src/layout/SidebarWidthHandle.tsx, ui/packages/app-shell/src/layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx, plus its resizeTo and commandB helpers at head) + round 1: the full diff git diff $(git merge-base origin/main pr36655) pr36655 (17 files: .changeset/36227-sidebar-resize-float-card.md, ui/packages/app-shell/src/layout/SidebarWidthHandle.tsx, UnifiedSidebar.tsx, consoleSidebarRail.ts, __tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx, __tests__/consoleSidebarRail.width-27593.test.tsx, the 11 ui/packages/i18n/src/locales/*.ts) + cited at head: ui/packages/app-shell/package.json, ui/packages/app-shell/src/index.ts, ui/packages/app-shell/src/layout/index.ts, ui/packages/app-shell/src/utils/workspacePreference.ts, ui/packages/components/src/ui/sidebar.tsx (lines 236-290), ui/packages/plugin-detail/src/RecordPageColumns.tsx (the sibling handle), ui/packages/app-shell/src/context/FavoritesProvider.tsx (user-scoped keys, for comparison), scripts/check-changeset-no-major.mjs (header), scripts/pm/clause2-line.mjs (line regexes), AGENTS.md lines 1018-1040; PR #36655 body; cards #36227 and #36471 with their comments; head check runs (REST)
Security-touching: no
Rule-change-verified: none

Round 2

The delta is one commit, eb24661, on top of eebb750. It touches 3 files and nothing else moved (git diff --stat eebb7500 eb24661e).

  • Unmount cleanup in SidebarWidthHandle.tsx. An effect with empty deps runs on unmount. It acts only when drag.current is set, so only while a drag is in flight. It then clears drag.current, removes cursor and user-select from document.body, and calls the latest onPreview(null) through a ref that an effect updates after every render. It commits nothing. This matches the pointer-cancel path: end(false) does the same. The parent's dragWidth goes back to null, so the width falls back to the kept value and SIDEBAR_RESIZING_FRAME comes off. The handle never added document listeners, so there are none to remove. This closes the round-1 note.
  • StrictMode. React's dev double-run mounts, unmounts and remounts on first mount. At that point drag.current is null, so the guard returns and nothing happens. Safe.
  • Someone else's cursor. The cleanup removes cursor and user-select only when this handle's own drag is in flight. Pointer-down already overwrote both values when the drag began. The normal pointer-up and cancel path has always removed them unconditionally. So the cleanup adds no new way to clear another owner's value. Note: neither path restores a value that was on body before the drag. This was already true in round 1, and nothing else in ui/ sets these on body during a sidebar drag, so it stays a note only.
  • The test would fail without the cleanup. After Cmd+B mid-drag it asserts user-select is '', but without the cleanup it would stay none. It also asserts the frame width is back to 300px, but without the cleanup dragWidth 340 would still be on the frame while desktop. The narrowing half (resizeTo(700), then back to 1440) also asserts the body is cleared and no drag width or transition-none is left behind. It uses the file's existing resizeTo and commandB helpers. No existing assertion is edited.
  • Changeset. The Clause-② gloss now reads "one new @object-ui/i18n key (sidebar.resize) in all 11 locales; no spec, schema, server or published export change". It matches the PR body and the published surface. This closes the round-1 ① note. The declaration tokens and the patch levels are unchanged.
  • CI at eb24661 when read: 7 success, 15 skipped, 16 in progress, 0 failed.

① Derived judgments (carried from round 1)

  • Published surface is the one i18n key. sidebar.resize is added under sidebar in all 11 locale files (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant). Each is a real translation, none is English copied over.
  • No new public export. @object-ui/app-shell is "private": true, and its only exports entry is . -> dist/index.js. Neither src/index.ts nor src/layout/index.ts re-exports consoleSidebarRail.ts or SidebarWidthHandle.tsx. The new constants (CONSOLE_SIDEBAR_MIN_WIDTH, CONSOLE_SIDEBAR_MAX_WIDTH, clampConsoleSidebarWidth, CONSOLE_SIDEBAR_WIDTH_PREFERENCE, RAIL_HIDDEN_PANEL, SIDEBAR_RESIZING_FRAME, SIDEBAR_WIDTH_KEY_STEP) and the SidebarWidthHandle component are module exports inside the package only. @object-ui/components is untouched.
  • Declarations hold. Clause-②: yes (widening) is right for an added i18n key. Metadata-protocol: none is right: no spec, schema or authorable key moves. The width is a reader preference in localStorage, not metadata.
  • Closed in round 2. In round 1 the changeset's Clause-② gloss said the widening also includes "new exports from the app shell's sidebar module (the width range, its kept preference and the float's classes)". That contradicts the PR body and the claim amendment ("no spec, schema or published export change"), and it is not true of the published surface. It over-claims and changes nothing, but the text lands in the i18n CHANGELOG. Trim it to the one key.

② Semver level (carried)

  • Both moved packages (@object-ui/app-shell, @object-ui/i18n) have a patch entry. Metadata-protocol: none requires patch on every entry under the level axis of scripts/check-changeset-no-major.mjs. No major. No authorable-surface/ or authorable-defaults/ baseline moves.
  • Both declaration lines start at the beginning of a line in the PR body and in the changeset body. clause2-line.mjs reads the arm as a prefix, so the trailing gloss does not affect parsing. Check Changeset is green at head (2 of 2 runs).
  • Level: correct.

③ Boundary flags (carried)

  • Width store, per browser. The key is os:pref:console.sidebar.width (workspace preference, scope user, which means "this reader, across objects". It is not keyed by user id). Two people on one shared browser share the width. Favorites, recents and last-app use scopedKey(..., userId, orgId) because they hold user data. A pixel width is not sensitive, and the sibling console.sidebar.keepOpen and record-details width use the same unscoped store. Card 左侧栏:可以拖动调宽(双击复位);收起后的浮出样式照 Attio 改,鼠标移走就收回 #36227 asks for "记在浏览器里" (kept in the browser). Note only.
  • Clamping on read. The codec's fromRecord takes only a finite number and clamps it to 200..350. Anything else answers "no choice", which falls back to 256. A newer v or a malformed record also answers "no choice" (the module's contract). The test pins 9000 -> 350. Note: there is no test for a below-range value or a non-number value. The code covers both.
  • Below 768 px. docked needs desktop, and the frame's --sidebar-width style is set only when rail.desktop. The phone drawer keeps SIDEBAR_WIDTH_MOBILE. A test pins 700 px: no handle and no width. No other consumer reads --sidebar-width outside the frame. Note: at 768 px a 350 px sidebar leaves 418 px for content, and the 1280 px rail threshold in consoleSidebarRail.width-27593 is costed at 256. A reader who widens the sidebar pays up to 94 px more. This is the reader's own choice, and screenshot 8 shows the preview is unaffected.
  • Keyboard a11y. The handle has role="separator", aria-orientation="vertical", a translated aria-label, aria-valuenow/min/max, and tabIndex=0. Left and right arrows move it 16 px, Home and End go to the ends, and the focus-visible ring is drawn on the inner bar. Tests pin all keys and the ARIA values. Note: no aria-controls. This is optional, and the sibling RecordPageColumns handle omits it too.
  • 侧栏收起时从滑出的侧栏点应用名:侧栏收回去,应用菜单留在屏幕最左边被切掉一截 #36471 fix. A press in the float clears closeTimer. When the timer fires, it folds only if no menu or dialog is shown and the last away point is not now on the panel. Stuck-open check: when the fire-time check bails, it leaves closeTimer undefined. The next pointer move off the float restarts the clock, and a press outside, Esc, a navigation and Ctrl/Cmd+B still close or dock it. So the float stays open after a menu closes only until the next move, which is what the card asks for ("菜单关闭后再按平时的规则收回"). Test "once the menu closes, moving away folds the float as before" pins this. layerShown() is document-wide, so any open dialog anywhere holds the float. That was already true on the move path before this PR. The PR adds the same check at fire time, so it adds no new kind of hold. pointerOnFloat reads the panel's live box and allows the card's 8 px margin, which matches the card geometry.
  • Cleanup (the round-1 note below is closed in round 2). Both closeTimer clears are in the effect cleanup, and the unmount effect still clears both timers. The handle adds no document listeners. Note: SidebarWidthHandle writes cursor and user-select on document.body and has no unmount cleanup. UnifiedSidebar never resets dragWidth when the handle goes away. If the handle unmounts mid-drag (Ctrl/Cmd+B pressed while the edge is held, or the window crossing 768 px mid-drag), body keeps user-select: none, the width stays at the drag value and the frame keeps transition-none until the next drag ends or the page reloads. The fix is small: a useEffect cleanup that calls end(false) when drag.current is set. Classed as a note, not should-fix, because a user only reaches it by unmounting the handle while holding a drag.
  • Tests. consoleSidebarRail.width-27593.test.tsx changes only a doc comment ("fixed at 256" becomes "default 256; the reader may drag it"). No assertion changed, and the 256 equality with the primitive is still pinned. This is justified. In UnifiedSidebar.hiddenCollapse-35062.test.tsx the changes are import additions plus 9 new tests, with no existing test edited. UnifiedSidebar.railOverlay-27593.test.tsx still asserts every RAIL_OVERLAY_PANEL token on the panel, and the token set got larger. No test is weakened. CI at head: Type Check, Lint, Check Changeset, Build & E2E UI and Live E2E UI are green. Test UI shards 3, 8 and 10 are green, and the other shards were still running when read.

④ Design judgment (carried)

  • 左侧栏:可以拖动调宽(双击复位);收起后的浮出样式照 Attio 改,鼠标移走就收回 #36227 item 1 (drag 200..350, double-click back to 256, kept and reloaded): implemented and pinned. The numbers match the card. The default stays 256, not Attio's 275, as the card says.
  • Items 2 and 4 (card float, kept width): the float is 8 px off the left, top and bottom edges, with rounded-lg, a border and shadow-xl. There is no backdrop and the gap stays 0, so nothing is dimmed or moved. The float takes --sidebar-width from the frame. The hidden panel is parked by its width plus 2 rem, so the shadow does not show at the edge. Item 3 (hover floats it, moving away folds it, the button docks it) was already on main and is unchanged. Note: the panel's translucent bg-sidebar with blur is pre-existing and differs from Attio's opaque card. The PR says this openly, and it is out of the card's scope.
  • The float has no handle. This is a reasonable reading: the card asks for resizing only while docked.
  • 侧栏收起时从滑出的侧栏点应用名:侧栏收回去,应用菜单留在屏幕最左边被切掉一截 #36471: the root cause is stated (the away clock started while the float was sliding in, and nothing checked it at fire time) and fixed at both halves. The PR body says an ablation pins each half. Item 2 (account menu, an entry's …) has browser screenshots. The notification panel is not shown, but it uses the same press path and the same layer check (a popover is role="dialog"). Note.
  • The shape follows the sibling RecordPageColumns handle (preview during a drag, commit when it ends). It is small and local, and it does not change @object-ui/components.

Open must-fix: none. Open should-fix: none. Notes still open: no restore of a body cursor value from before the drag (round 2); the width is per browser, not per user (③); no below-range or non-number read test (③); the 768 px and 1280 px cost at 350 (③); no aria-controls (③); translucent card and notification panel not shown (④).

Implemented-by: claude/project-thread-9amm3d
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

左侧栏现在可以拖动右边缘调宽(200 到 350 像素),双击恢复默认,宽度记在这台浏览器里。收起后的浮出侧栏改成卡片样式,鼠标移走就收回。
之前从浮出侧栏点应用名时,菜单会被切掉一截(#36471):现在只要菜单开着,侧栏就不会收回。
复核两轮通过,CI 全绿,非受管面,席位落地。
要你做的:无。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head eb24661e · 2026-11-23T10:17Z

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 10:18
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
objectstack-ai#36657)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ89Betg8QPoUPD5NhDenSfS2)_
Fixes objectstack-ai#36364
Clause-②: yes (widening) — three new `@object-ui/i18n` keys
(`designMode.menu.newReport`, `designMode.menu.newReportLeft`,
`report.builder.addsToMenu`) in all 11 locales; no spec, schema or
public export change
Metadata-protocol: none

repo:objectstack#1 · os-warren · session_01JQwxbXq2Dxb31zZNmSqCtz

## 维护者速读

- 用户能看到什么变化:管理员在设计模式里「添加菜单项 →
报表」,第一行是「新建报表…」,点了会占好菜单位置并打开报表搭建页;选好数据来源和指标、保存后,新报表出现在占好的位置,设计模式里的其他改动一起保存。
- 为什么做:设计模式专题卡的报表这一半,按席位定的方案:报表必须先有数据来源和指标,所以从搭建页新建,而不是只填名字。
-
出错会怎样:菜单保存失败时,刚建的报表会被删掉,设计模式和搭建页都保持打开;中途关闭搭建页或离开它,什么都不写、占位消失;可以直接撤回本次合并。
- 要你做什么:不用做什么。

## What changes

The report half of objectstack-ai#36364, on top of the report builder (objectstack-ai#36644), per
the seat's ruling (option A, comment 7090058961): a report needs
`dataset` and `values`, so 「New report…」 opens the builder, and the
report and its menu entry are written only when the builder saves.

- **Picker** (`DesignModeMenu.tsx`): the Reports list starts with 「New
report…」. It holds the place (the dashed row now reads 「New report…」),
offers a slot, and navigates to the app's `reports/new`. Nothing is
written.
- **The slot** (`designModeReportSlot.ts`, new): the menu lives in the
sidebar and the builder in the page, with no shared tree, so a
module-level store holds one slot `{ path, save, cancel }`. It is keyed
by the builder's address, not the app's name, because the console
addresses an app by its route segment (the showcase app is
`/apps/com.example.showcase`, its name `showcase_app`). This was found
on the live run, and a page test pins it. The menu withdraws the slot
when the place is dropped and when it unmounts (the design mode ended).
Without a slot the builder is the plain new-report page, as before.
- **The builder page** (`ReportNewPage.tsx`): when a slot waits on its
address, it says 「Saving creates this report and adds it to the menu
where you placed it, with your other design changes.」. Its Save hands
`(name, label, body)` to the slot and writes nothing itself. A refused
save keeps the builder open. Its Close cancels the place and goes back.
- **The save** (`designModeMenuCreate.ts`): `NewMenuItem` gains a
`report` arm carrying the builder's body. `saveAppMenuWithNewItem` runs
the dashboard half's order unchanged: every menu-save check first, then
the report saved and published in the menu's own package
(`saveAndPublishInPackage`, the package-bound door
`saveDashboardInPlace` now shares), then the menu written with the entry
in the held place and every other staged edit (`saveWith`). On a refused
menu the report is removed again.
- **Leaving the builder another way** (a menu link, Back) drops the held
place too, so no row waits for a builder that is gone.
- **The entry's label**: a report entry with no `label` shows its
machine name (only object, view and dashboard entries inherit their
target's label, per the cloud#2021 ruling), so the new entry carries the
report's label. The live run first showed `hui_kuan_fenxi` in the menu,
and this fixes it.

## Tests

- `pnpm --dir ui exec vitest run packages/app-shell/src/layout
packages/app-shell/src/views/ReportNewPage` at `f3021225`: `Test Files
157 passed (157)`, `Tests 1284 passed (1284)`.
`DesignModeMenu-36363.test.tsx` was rerun at head `ecbe0f66` after the
label change: `38 passed`. Earlier at `f7737e36`, `packages/i18n` gave
`1978 passed`, with the de quote-pairing count raised 128 → 129 for
`newReportLeft`'s „{{name}}“.
- New pins:
- `designModeMenuCreate-36364.test.ts`: 4 report cases. They cover the
body, the package write order (ensure → save/publish report →
save/publish app), a refused menu resetting the report, and an unlisted
package creating nothing.
- `DesignModeMenu-36363.test.tsx`: 5 report cases. They cover the picker
row holding the place and writing nothing; the builder's Save writing
the report, then the menu with the labelled entry and the other staged
edit, then leaving the mode; a refused menu; the builder's Close; and
leaving the builder.
- `ReportNewPage.menuSlot-36364.test.tsx`: 5 cases. They cover Save
going through the slot; a refused save staying open; Close cancelling
and going back; a route segment other than the app's name; and another
app's slot not being used.
- Ablations (one-shot, not kept): without the page change, the page file
went 3 failed | 1 passed. Without the menu change, all 5 menu report
cases were red.
- `tsc --noEmit` (app-shell) exit 0. ESLint on the changed files: 0
errors. `check-i18n-call-site-keys` exit 0.

## Screenshots

Taken on the live showcase example (fresh backend, console dev server,
zh-CN, deviceScaleFactor 2). They are stored with the seat's project
files (`issue-36364/`):

1. 「添加菜单项 → 报表」, with 「新建报表…」 first.
2. The builder, with the held 「新建报表…」 row under 数据分析 and the 「adds to
the menu」 line.
3. The builder filled: Invoice Metrics, grouped by status, named 回款分析.
4. After Save: the design mode is left, and 「回款分析」 sits in the held
place, open.
5. Cancel path: a second 「新建报表…」, closed from the builder. The page goes
back, no held row is left, and the mode stays on.

Checked through the API after the run:
- `report/hui_kuan_fenxi` is stored in `com.example.showcase.custom`,
the menu's package (the same item Studio lists), with
`_diagnostics.valid: true`.
- The app's menu holds `{ id: nav_item_1, type: report, reportName:
hui_kuan_fenxi, label: 回款分析 }` under `grp_analytics`.
- It is the only `hui_kuan*` report, so the cancelled build left
nothing.

## Overlap

`overlap-check`: merges cleanly with main, objectstack-ai#36655 and objectstack-ai#36525. With
objectstack-ai#36629 it conflicts only in `de-quote-pairing-3876.test.ts`, because
both PRs raise the same German quote count. Whichever lands second
re-adds 1 to the count.

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Merged via the queue into main with commit 6a73185 Nov 23, 2026
63 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-9amm3d branch November 23, 2026 10:40
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/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant