Repository navigation
fix(app-shell): a narrow-window toast beside the record drawer no longer covers the record's Edit and more buttons - #26426
Conversation
…record's actions row The fallback for a window too narrow for a toast beside a right-edge drawer cleared only the drawer's own header, so on a 1024px window the create-success toast covered the record header's Edit and more buttons. It now also drops below the drawer's first row of controls, measured from layout offsets. Claude-Session: https://claude.ai/code/session_01ADHkmQQBJvECrfY7vVyetV Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmQQBJvECrfY7vVyetV Co-authored-by: Claude <noreply@anthropic.com>
席位核对 · ACCEPT · seat
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40446655069 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #26418
Clause-②: no
Metadata-protocol: none
维护者速读
ConsoleToaster.tsx的窄窗口分支;宽窗口(提示放在抽屉左侧)不变。回滚即还原这一个文件。ConsoleToaster.tsx的firstControlRowBottom/clearanceFor;ConsoleToaster.drawerActionsRow-26418.test.tsx。What changes
ui/packages/app-shell/src/chrome/ConsoleToaster.tsx, the objectui#11685 fallback (no room for a toast beside an open right-edge drawer): the toaster used to drop below the drawer's own header only, so on a 1024px window with the 720px record drawer the create-success toast sat at y 69–123 on top of the record header's Edit (93–129) and ⋯ menu. It now drops below the drawer's first row of controls too.button,a[href], form fields, and the button / link / menuitem / tab roles), widened by every control that overlaps it vertically (the title's star button beside a taller Edit). The toast's top ismax(header bottom, row bottom) + 24pxon desktop and+ 16pxon phones, where sonner spans the toaster across the window and the same row was covered.offsetParentchain, like the existing header measurement: the slide-in transform does not skew them, andoffsetTopignores the body's scroll position, so a toast raised mid-scroll still clears the row once the user scrolls back (measured in Chromium, below).display: none(nooffsetParent) does not count. A first control in the drawer's lower half is body or footer content, not a header row, so it does not count either: dropping below it would push the toast off the window.childList) and re-measures when the row arrives, coalesced to one measurement per animation frame as before.Why measuring, not the drawer's bottom-right corner. The card offered both. The bottom-right corner of the record drawer is where
InlineEditSaveBarsticks (sticky bottom-0, Save / Cancel right-aligned), and a failed inline save raises its error toast exactly while that bar is up, so the corner option would move the same defect onto Save. It would also flip the toaster to a bottom anchor, the corner objectui#7482 keeps toasts out of. Measuring the first control row carries no page-specific pixel and follows whatever the drawer holds.Tests
New
ConsoleToaster.drawerActionsRow-26418.test.tsx(happy-dom; sizes assigned from the card's Chromium reading, asConsoleToaster.drawerClearance-11685does):--offset-right: 888px,--offset-top: 24px).No existing test was edited.
Ablation 1, the fix reverted (the whole source file restored from the merge base
436d2840, blob252cf760, then restored to HEAD blob24ccab6c,git diff HEADempty): the new file goes 3 failed / 1 passed. The three cases above the control go red; the wide-window control stays green, as a control should.drawerClearance-11685stays 6/6 green both ways.Ablation 2, the drawer-subtree observer removed (
scripts/ablation-replace.mjs, anchor 1 → 0, restored blob == HEAD): the late-render case and the non-vacuity leg go red (2 failed / 2 passed), so the observer is load-bearing.Acceptance notes
ConsoleToaster(bundled from source) over a hand-built drawer shaped likeNavigationOverlay(45px header, scrolling body, record header with Edit and ⋯ arriving after the drawer opened). It is a one-off probe and nothing re-runs it.elementFromPointat Edit's centre is the toast.elementFromPointat Edit's centre is Edit. The same reading holds with the body scrolled 60px when the toast is raised.Verification
Local, at head
e8590370:pnpm exec vitest run packages/app-shell/src/chrome/ConsoleToaster packages/app-shell/src/chrome/consoleToasterAnchor(fromui/, under the verify lock): 5 files / 21 tests passed.pnpm --filter @object-ui/app-shell type-check(bothtscpasses, after building the^...closure): exit 0.tsconfig.test.jsonincludessrc/**/*.test.tsx, so the new test is compiled.eslintover the two touched files: exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 derived families, each run with its exit captured before any pipe: 34 exit 0.--ranreconciliation: "34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN" (a derived zero, every line carries its exit code).The full app-shell suite and every repo-wide family are left to CI (
Test UI,Type Check UI,Lint UI,Lint & Repo Gates).Human Minimum
packages/specholds no runtime logic. (No spec change.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQQBJvECrfY7vVyetV
Generated by Claude Code