You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b6709b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(console): derive the sidebar fold width from the record drawer over the list (#29352)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbHKR9NdXoRePJwYZ8bT6wA4)_Fixes#29109
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:控制台侧栏自动折叠阈值仍是 1416
px,只把它的推导理由从已退役的分屏改为「记录抽屉(720)+其旁最窄可用列表(440)+展开侧栏(256)」;记录页列宽档位的注释同步改正。
- **为什么改**:分屏已于 #28915 退役,1416 的原推导理由不复存在;按裁决 6576273751(字母
D,维护者「同意」)保留数值、重写理由。
- **风险与回滚**:零行为变化,任何窗口宽度下表现与 main 相同;常量不从包入口导出。回滚即还原本 PR。
- **先看**:`ui/packages/app-shell/src/layout/consoleSidebarRail.ts`(常量与
docblock)、`consoleSidebarRail.width-27593.test.tsx`(推导钉)。
- **两分钟验证**:`cd ui && pnpm exec vitest run
packages/app-shell/src/layout/__tests__/consoleSidebarRail.width-27593.test.tsx`,预期
5 条全绿。
- **需要你做的**:无,席位落地。
## What changes
- `consoleSidebarRail.ts`: `RECORD_SPLIT_MIN_CONTENT_WIDTH` (the retired
split pane) becomes `RECORD_DRAWER_MIN_CONTENT_WIDTH =
LIST_MIN_COLUMNS_WIDTH (440, the #27545 measurement) +
RECORD_DRAWER_WIDTH (720)`. `CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH` is that
plus the expanded sidebar (256), still 1416. The docblocks name the
non-modal drawer over the full-width list as the reason and no longer
mention the split pane. None of these constants is exported from the
`@object-ui/app-shell` entry.
- `consoleSidebarRail.width-27593.test.tsx`: holds `RECORD_DRAWER_WIDTH`
equal to plugin-view's `overlayWidthFor('md', …)` (`min(92vw, 720px)`),
pins the sum and the 1416 value, and checks that 1280 px and 1366 px
windows fold (the rail leaves 512 / 598 px of list beside the drawer,
where the expanded sidebar would leave 304 / 390) and that a 1440 px
window does not.
- `plugin-detail/src/synth/recordPageColumns.ts`: comment only. The
window arithmetic now says the console folds to the 48 px rail below
1416 px (1232 px of page root at 1280), with the expanded-sidebar
figures kept for a reader who keeps the sidebar open.
- Changeset `29109-console-sidebar-fold-width-drawer.md`,
`@object-ui/app-shell` patch.
## Tests
On head e8cb255, and the 13-file set again on the merged head b64f11a
(main merged at a19759a..origin/main; the merge touched none of these
files):
- Every ui test file naming `consoleSidebarRail`, `recordPageColumns` or
`useResponsiveSidebar` (13 files): Test Files 13 passed (13), Tests 109
passed (109), lock VERDICT command-exit 0, on both heads.
- Ablation via `scripts/ablation-replace.mjs`: `RECORD_DRAWER_WIDTH =
720` to `640` (anchor 1 to 0) made the width test go red, 3 failed and 2
passed (5). Restored: blob equals HEAD and `git diff HEAD` is empty.
- `turbo run type-check --filter=@object-ui/app-shell
--filter=@object-ui/plugin-detail`: 66 tasks successful, VERDICT
command-exit 0.
- `eslint` on the three touched files: 0 errors (11 existing
`no-explicit-any` warnings in `recordPageColumns.ts`).
## Acceptance notes
- The maintainer's ruling 6576273751 picked letter D: the threshold
stays 1416 px and the user-visible behaviour is unchanged. The brief's
ablation ("restore 1416") does not apply because 1416 is kept. The
ablation narrows the drawer width instead, which proves the pin binds
the drawer.
- The 440 px list floor has no other constant in code since the split
pane retired. It is restated here as a named constant that cites #27545.
- The two pending changesets that state 1416
(`27593-console-sidebar-narrow-rail.md`,
`28077-console-sidebar-rail-rework.md`) are left as they are, as the
ruling says. No `content/docs/**` line states 1416.
- No browser run was done, as the ruling allows: the sum is unchanged.
## Verification
<details><summary>Derived gates on e8cb255: 35 derived, 35 run, all
exit 0</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 35 families. Each was run and
recorded with its exit code, and `--ran` reconciled them: 35 derived, 35
run, 0 NOT-MEASURED, 0 UNRUN. That set includes
`check-sdui-manifest.mjs` and its `--self-test`, the changeset and
closing-keyword body gates (run against this body),
`check:cross-package-test-inputs`, `check:test-source-alias`,
`check:published-files` and `check:type-check-coverage` /
`check:type-check-debt`. `pnpm --dir ui exec vitest run scripts/`: Test
Files 169 passed, 2 skipped (171); Tests 4903 passed, 2 skipped (4905);
lock VERDICT command-exit 0.
</details>
On the merged head b64f11a the ratchet and package-surface gates were
run again, all exit 0: `check:type-check-coverage`,
`check:type-check-debt`, `check:cross-package-test-inputs`,
`check:test-source-alias`, `check:published-files` and
`check-sdui-manifest.mjs`. Re-deriving the gate list on that head is NOT
MEASURED: the `--commands` call did not finish within 600 s and was
stopped. The merge brought in no change to the four files in this diff.
Repo-wide scans (`pnpm lint`, Test UI and the rest) are CI's: see this
PR's check-runs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QsR2jQy62PTjRj5La7392w
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jQy62PTjRj5La7392w)_
Co-authored-by: Claude <noreply@anthropic.com>
fix(console): the sidebar's fold width is derived from the record drawer over the list, now that the split pane is retired
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The console sidebar still folds to its icon rail below 1416 px, and nothing changes at any width: a 1280 px or 1366 px window keeps the rail, a click still expands it over the content, and "Keep sidebar open" still keeps it expanded. What changes is the reason the code gives for 1416. It was the split pane beside the list, which is retired. It is now the record drawer a list record opens in (720 px, non-modal, so the list beside it stays readable and clickable), the narrowest list that still draws its columns beside it (440 px), and the expanded sidebar (256 px). The module-internal `RECORD_SPLIT_MIN_CONTENT_WIDTH` is now `RECORD_DRAWER_MIN_CONTENT_WIDTH`, built from `RECORD_DRAWER_WIDTH` and `LIST_MIN_COLUMNS_WIDTH`; none of them is exported from the package entry.
0 commit comments