Skip to content

feat(components): the record's close button moves to the left of the top bar's navigation row - #36603

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36557-close-top-left
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36557-close-top-left

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #36557
Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:电脑上打开记录整页,或在列表上打开记录侧滑面板时,关闭按钮 ✕ 从右上角移到左上角,排在「↑ ↓ 第 N 条,共 M 条」前面;「以整页打开」按钮仍在右边,手机版不变。
  • 为什么做:维护者要求把记录详情的关闭按钮改到左上角(记录详情页主题)。
  • 出错会怎样:最坏是 ✕ 显示的位置不对,关闭本身照常(✕、Esc、点视图名回列表都没改);直接撤回这个 PR 即可恢复原位置。
  • 要你做什么:看一眼截图里整页的 ✕ 排在侧边栏展开按钮左边是否合意。

What changes

  • RecordTopBar (@object-ui/components) takes a new optional prop, close (a ReactNode slot shaped like leading and frame), for the button that closes the record. The two-row bar draws it as the first control of the navigation row, before leading, ↑ ↓ and the "N of M · view" counter. The one-row bar (the phone face, and drawers whose host hands no record row) draws it last at the right end, after frame, which is where the close button sat before, so those faces do not change. The docblock describes the new placement.
  • NavigationOverlay passes its close button as close. Only the expand button stays in frame. On the drawer, split pane and maximized pane, the close button is now at the top left and the expand button stays at the right.
  • RecordDetailView (page face; only the pageFrame hunk): the page's close button (record-page-close) moves from pageFrame to close. pageFrame now holds only the shell's button group. Page order: the close button, then the host's leading (the sidebar expand control, then the breadcrumb).
  • The close button keeps its accessible name ("Close") and its handler. Escape and the view-name link back to the list are unchanged. The close button now comes first in Tab order because DOM order is Tab order.
  • No new metadata key, no new i18n string, no new export. The only widening is the one optional prop, hence Clause-②: yes (widening). The changeset is .changeset/36557-record-top-bar-close-left.md (@object-ui/components patch). @object-ui/app-shell is private and needs no changeset.

Read first, by risk:

  1. ui/packages/components/src/custom/record-top-bar.tsx: the two-row navigation row (the new data-record-top-bar-close wrapper drawn before the leading div) and the one-row controls ({close} after {frame}, plus the two divider conditions that now count close).
  2. ui/packages/app-shell/src/views/RecordDetailView.tsx: pageClose / pageFrame. This hunk is disjoint from feat(console): an administrator configures the record page's tabs in place (#36499, PR 1 of 2) #36583's hunks in the same file.
  3. ui/packages/components/src/custom/navigation-overlay.tsx: frame keeps the expand button only; close takes the close button.

Two-minute check: open any record from a list in the console and look at the drawer. The close button is the leftmost control of the top row, and the expand button is the rightmost. Click "Open as full page": the page shows the close button leftmost too. Click it and you are back on the list.

Tests

  • record-top-bar-two-rows-35853.test.tsx (components) is rewritten. Two-row bar: the navigation row's buttons in DOM order start with Close and end with the frame's expand button. One-row CONTROL: the close button is the last element of the controls, right after frame, and there is no data-record-top-bar-close wrapper. Drawer (NavigationOverlay): the first nav button is Close, the last is "Open as full page", frame holds only the expand button, and clicking the close button calls the host's close handler once.
  • RecordDetailView.topBar-27524.test.tsx (app-shell) is rewritten for the page face. The first button of the navigation row is record-page-close, its aria-label is "Close", and it is not inside frame. It still navigates to the object's list. With the shell group on, the group sits in frame without the close button. With the shell group off, frame is empty and the close button is still first.
  • record-top-bar-27524.test.tsx is unchanged and stays green. It pins the one-row drawer's right-end order (… "Open as full page", "Close").

The verification readings are in the collapsed sections below.

Acceptance notes

Verification

Screenshots: the page and the drawer, before and after (CRM example, 1440 px wide)

I ran my own stack: the CRM example backend (--fresh, a random port) and the console's Vite dev server pointed at it, then drove it with Playwright on Chromium. "Before" swaps in main's three source files (git restore --source=f4c2d0b1b9) and "after" uses this branch's head. Afterwards the files were restored to HEAD (git hash-object equals the HEAD blob for all three, and git diff HEAD is empty). The servers were stopped by their own ports.

  • Page, before: /mnt/project-files/objectstack-seat2/36557-page-before.png. Navigation-row buttons in DOM order: ["Comments","Edit app","Help & Documentation","Close"].
  • Page, after: /mnt/project-files/objectstack-seat2/36557-page-after.png. Order: ["Close","Comments","Edit app","Help & Documentation"]. The close button sits at the far left, before the "Accounts" breadcrumb. The shell group stays at the right.
  • Drawer over the list, before: /mnt/project-files/objectstack-seat2/36557-drawer-before.png. Order: ["Previous record","Next record","All Records","Open as full page","Close"].
  • Drawer over the list, after: /mnt/project-files/objectstack-seat2/36557-drawer-after.png. Order: ["Close","Previous record","Next record","All Records","Open as full page"]. The close button is at the top left and the expand button stays at the top right.

The sidebar was expanded in these runs, so the page's sidebar-expand control was not drawn. When it is drawn, it follows the close button because it belongs to leading.

Tests: affected package tests and type-check at dc760d8 (the implementation head, before the main merge)
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/ plus every app-shell and console test file that mentions the bar or record-page-close (15 files): Test Files 521 passed | 1 skipped (522), Tests 5186 passed | 24 skipped (5210), os-verify-lock: VERDICT command-exit 0.
  • pnpm --filter @object-ui/components run type-check: VERDICT command-exit 0.
  • pnpm --filter @object-ui/app-shell run type-check: VERDICT command-exit 0.
  • The merge of main (f4c2d0b) brought no change to the bar, its hosts or their tests. overlap-check at 152e0ff: #36583 (shares ui/packages/app-shell/src/views/RecordDetailView.tsx): merges cleanly, VERDICT clean exit 0.
Ablation: putting the close button back at the far right turns the new pins red

Mutation in record-top-bar.tsx, made with scripts/ablation-replace.mjs and confirmed on disk by the tool's own counts and blob hashes:

  1. the two-row {close !== undefined && ( became {false && ( (anchor count 1 then 0);
  2. {close} was appended after {frame} in the two-row frame div (anchor count 1 then 0).

The test resolves the component from src through a relative import, so no dist was involved.

  • With the mutation: record-top-bar-two-rows-35853.test.tsx gives Tests 3 failed | 2 passed (5). The three failures are the two-row list case, the no-list case and the drawer case. The two that pass are the Chinese counter and the one-row CONTROL, as expected.
  • Restore: ok restored: blob == HEAD (b1efd8f95bfa) and git diff HEAD is empty.
Derived gate families: 38 of 38 run at 152e0ff, with the ledger and its reconciliation
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 152e0ff (the merge of main f4c2d0b) derived 38 commands. I ran each with stdin from /dev/null and captured the exit code before any pipe. Ledger: /mnt/project-files/objectstack-seat2/36557-gates-ran.txt.
  • 37 exited 0 on the first pass. pnpm --dir ui exec vitest run scripts/ first recorded exit 99: it never got the lock because the CRM build held it, so it was not measured. The re-run under the lock exited 0 (Test Files 172 passed | 2 skipped (174), Tests 5127 passed | 2 skipped (5129)). The ledger keeps both lines.
  • --ran reconciliation: Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. The tool flags the doubled vitest entry and reads it as 99 until the record holds a single line; the 0 above is the re-run.
  • Outside the derived set: overlap-check VERDICT clean exit 0 (feat(console): an administrator configures the record page's tabs in place (#36499, PR 1 of 2) #36583 merges cleanly); pnpm check:new-line-citations 0 new citation(s); check-nul-bytes exit 0. After the merge, the three top-bar pin files: Tests 26 passed (26).
  • CI on 152e0ff: all eleven required contexts are success or skipped by their own selectors. Success: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (16/16 shards), Build & E2E UI, Live E2E UI, Dogfood Regression Gate. Skipped: Build Core. Check Changeset is also success.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm

…vigation row

RecordTopBar gains an optional `close` slot: the two-row bar draws it as the
first control of the navigation row, before `leading`; the one-row bar keeps
it last at the right end. The drawer (NavigationOverlay) and the record page
hand their close button through it; the expand button stays in `frame`.

Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

Contract-review-claim: session_01ADHkmRB34k9WUWeGpRnVNm · head 152e0ff · 2026-11-23T02:55Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 152e0ff9d29e7f6f5f948312268c2387647cd74d
Local-runs: none

The face is the Clause-②: yes (widening) declaration alone (PR body and changeset): no published schema, no governed path, no narrowing arm in the 6 changed paths (check-governed-merges.mjs --pr 36603: 0 of 6). Area s2-B writes this record itself under the seat's area order (rule 10), and the seat confirmed the route and the name on the card (7089089107).

① Derived judgments

  • The widening the declaration names is real and complete: RecordTopBarProps gains one optional prop, close (React.ReactNode), published through @object-ui/components' export * from custom/index.ts. No other prop, type or export moves; no i18n key, no metadata key.
  • The name follows its sibling slots on the same component (leading, frame, comments, toggles), and the close control's testid is already record-page-close.
  • A host that does not pass close keeps today's bar exactly (its ✕ inside frame stays at the far right), so no existing consumer changes; both in-repo hosts (NavigationOverlay, RecordDetailView) move their ✕ to the new slot in this PR.

② Semver level

patch for @object-ui/components: AGENTS.md's Post-Task Checklist step 3 grades by the Metadata-protocol kind, and none takes patch ("a non-protocol change, widening or breaking, ships patch"); Check Changeset's level axis agrees (measured by the dev: a minor grade under none fails with none-minor). The area's L1 first asked for minor on a misread precedent (that changeset is Metadata-protocol: semantic); withdrawn. No breaking change.

③ Boundary flags

  • Dev open questions: (1) route — A, a new close slot (the area's claim amendment; seat 7089089107). (2) page-face order — ✕ before the sidebar expand control and breadcrumb, as the card's acceptance reads; screenshots /mnt/project-files/objectstack-seat2/36557-page-after.png and 36557-drawer-after.png. (3) changeset grade — patch, above.
  • SQL push-down: not applicable — presentation only, no record read changes.
  • Author: objectstack-fleet[bot] (relay-written).

Implemented-by: claude/issue-36557-close-top-left
Reviewed-by: session_01ADHkmRB34k9WUWeGpRnVNm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

席位核对

ACCEPT — PR #36603 @ 152e0ff (head of record, full sha on the PR) · card #36557 · L1 first read by area s2-B (area order rule 9) · 2026-11-23T03:17Z · contract review TIER_DEFAULT PASS 7090342552 at the same head

  • Shape: open, draft, base main; first line Fixes #36557, Clause-②: yes (widening), Metadata-protocol: none; no closing keyword near another card (l1-face.mjs --pr 36603 CLEAN).
  • Premise: held (claim 7089013164): ✕ was drawn at the far right of the navigation row on the page and the drawer. The dispatch's mechanism guess failed (os-dev report 7089057439: hosts hand ✕ inside frame), so the route moved to a new close slot (claim amendment on the card; seat confirmation 7089089107).
  • Scope: 6 files, 104+/62-: record-top-bar.tsx (the close slot: first in the two-row navigation row, last in the one-row bar), navigation-overlay.tsx (✕ to close, ⤢ alone in frame), RecordDetailView.tsx (the pageFrame hunk only: ✕ to close, the shell group alone in frame), the two pin files rewritten to pin ✕ first, one @object-ui/components patch changeset. Not governed, 166 lines.
  • Diff read: the two-row bar returns early, so ✕ is drawn once per face; a host that passes no close is unchanged; the one-row (phone) bar keeps ✕ at the right end; ✕'s accessible name Close and handlers unchanged; Escape and the view-name link untouched. Tab now reaches ✕ first (DOM order).
  • Changeset read against the diff: matches. Grade patch stands: AGENTS.md grades by the Metadata-protocol kind and none takes patch; the area's L1 request for minor was a misread precedent and is withdrawn (the dev measured Check Changeset failing none-minor).
  • Tests and gates: components suite plus 15 app-shell/console files touching the bar, 5186 passed; components and app-shell type-check exit 0. Ablation (two-row close slot disabled and appended after frame): 3 red (list, no-list, drawer), the counter and one-row controls green, restore blob equal to HEAD. Browser, CRM example at 1440 px: page nav before Comments · Edit app · Help · Close, after Close · Comments · Edit app · Help; drawer before ↑ · ↓ · All Records · Open as full page · Close, after Close · ↑ · ↓ · All Records · Open as full page (screenshots /mnt/project-files/objectstack-seat2/36557-{page,drawer}-{before,after}.png). 38 of 38 derived gate families run, 0 NOT-MEASURED (ledger /mnt/project-files/objectstack-seat2/36557-gates-ran.txt; the ui/scripts vitest line holds a lock-timeout 99 and the re-run 0). Check-runs at this head: 47 success, 15 expected skip, 0 failed, 0 pending.
  • Accepted deviations: a first commit attempt carried a hooks-path override; refused, re-run as a plain commit with hooks. The ledger keeps both vitest readings (an in-place rewrite was refused).
  • Out of scope: none. Phone face unchanged by construction.
  • Landing: non-governed, ≤3000 lines; sequenced after s2-A's feat(console): an administrator configures the record page's tabs in place (#36499, PR 1 of 2) #36583 (shares RecordDetailView.tsx, disjoint hunks); K = 9, feat(console): an administrator configures the record page's tabs in place (#36499, PR 1 of 2) #36583 merged 2026-11-23T03:17Z, merge with main clean ⇒ area lands it in this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 03:18
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45105220119 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (16/16) — 失败步骤: Run the ui tests (shard 16/16)

    × leaving the Actions tab keeps the hold, and the held line names the action 782ms
    FAIL   dom  packages/app-shell/src/views/studio-design/DataPillar.panelHold-27629.test.tsx > DataPillar — an action predicate that does not parse holds with the draft (objectstack#27629) > leaving the
      ↳ 失败原因: AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • packages/app-shell/src/views/studio-design/DataPillar.panelHold-27629.test.tsx — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 6 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

Re-queue after a flake — PR #36603 @ 152e0ff (head unchanged since ACCEPT 7090632634) · 2026-11-23T03:58Z

  • Kicked: merge-queue run 45105220119 at base ed0edb1b50, job Test UI (16/16) 137465526451. Signature: DataPillar.panelHold-27629.test.tsx:233 · "leaving the Actions tab keeps the hold" · expected "vi.fn()" to not be called at all, but actually been called 1 times. It was the only red case: 389 of 390 files passed.
  • Not this PR: the failing case is a Studio Data-pillar hold test, and this diff touches the record top bar and its two hosts. The same case reproduces on the queue base without this PR: on origin/main ed0edb1b50 the area ran the file alone under the verify lock 12 times and it went red once (same line, same assertion). On main merged with this PR it went red 1 time in 5.
  • Flake card: Test flake: DataPillar.panelHold-27629 'leaving the Actions tab keeps the hold' sometimes sees a save of the unparsable predicate (fails 1 in ~5–8 runs on main) #36619 (finding, triage knocked on pm:mailbox — triage#1 · hotlong #32588). With that reading it is a known flake, so this is a re-queue as-is, once; if the same signature knocks it again, the area stops and hands it on.

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

Development

Successfully merging this pull request may close these issues.

Record page and record drawer: the close button ✕ moves from the top right to the top left

2 participants