Repository navigation
Commit 6cfa758
fix(components)!: NavigationOverlay drops its unused comments prop (#37275)
Fixes #36410
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill, docs page or README names the
NavigationOverlay comments prop; the changeset carries the FROM-TO line
## 维护者速读
- 用户能看到什么变化:用户无感;只是记录侧边抽屉组件删掉了一个早已没人传入的评论按钮入口。
- 为什么做:收尾「评论通知直达评论」这张卡的第二项清理,上一项已在之前的合并里完成。
- 出错会怎样:只有自己写代码向抽屉传评论按钮的集成方会编译报错,删掉该参数即可;可直接撤回。
- 要你做什么:无
## What changes
Item 2 of the card, the last open item (item 1 landed earlier; see the
card's release comment).
- `@object-ui/components` `NavigationOverlay` drops its `comments` prop:
the `NavigationOverlayProps.comments` declaration, its destructure, and
the pass-through into the drawer's `RecordTopBar`.
- `RecordTopBar` keeps its own `comments` slot. It is still filled by
the record page: `ui/packages/app-shell/src/views/RecordDetailView.tsx`
passes `comments={phoneCommentsButton}` on the phone bar and
`comments={shellActions ? undefined : commentsButton}` on the desktop
bar.
- Changeset `.changeset/36410-navigation-overlay-comments-prop.md`:
`@object-ui/components` patch, BREAKING banner, ADR-0087 disposition
`not-required (runtime-export-retired
@object-ui/components#NavigationOverlayProps.comments)`, and the FROM-TO
line, in the shape of the earlier `NavigationOverlayProps.maximizable`
removal.
Premise, measured on `origin/main` 9171bed before the change: no
caller passes `comments` to `NavigationOverlay`. Every render site under
`ui/`, `examples/`, `packages/` and `apps/` was read (27 sites,
including the e2e harness `ui/e2e/toast-under-modal.spec.ts`, which
passes mode, isOverlay, isOpen, selectedRecord, close, setIsOpen, width,
title, onExpand, expandLabel, children). The spread sites spread
`useNavigationOverlay`'s result (no `comments` in the hook) or
ObjectGrid's `recordOverlayShellProps` (storageKey, legacyStorageKey,
width).
## Read first
1. `ui/packages/components/src/custom/navigation-overlay.tsx`: the three
removals and the bar comment.
2.
`ui/packages/components/src/__tests__/navigation-overlay-bar-26679.test.tsx`:
the new top-level describe (type pin plus render check).
3. `.changeset/36410-navigation-overlay-comments-prop.md`: the
disposition marker and FROM-TO line.
## Two-minute check
`pnpm --filter @object-ui/components exec vitest run --maxWorkers=2
src/__tests__/navigation-overlay-bar-26679.test.tsx`: expect all tests
to pass, including "the drawer bar takes no comments switch".
## Tests
- The pin goes into the existing drawer bar harness: a
`@ts-expect-error` on a partial `NavigationOverlayProps` object carrying
`comments` (compiled by the package's `tsconfig.test.json`), and a
render check that a stray `comments` is not drawn in the bar.
- `record-top-bar-comments-36075.test.tsx`: docblock only. It no longer
says the drawer hands the switch on.
Every reading below is on head `8acc3c0e7`.
<details><summary>Package test, type-check and pin ablation</summary>
- `pnpm --filter @object-ui/components test` (under the verify lock):
`Test Files 510 passed | 1 skipped (511)`, `Tests 4967 passed | 24
skipped (4991)`, `VERDICT command-exit 0`.
- `pnpm --filter @object-ui/components type-check` (`tsc --noEmit && tsc
-p tsconfig.test.json`): `VERDICT command-exit 0`.
- Ablation of the type pin (one-time, through
`scripts/ablation-replace.mjs`): putting `comments?: React.ReactNode;`
back into `NavigationOverlayProps` landed (anchor 1 to 0, blob a7cb247
to dbcac407), and `tsc -p tsconfig.test.json` failed with
`navigation-overlay-bar-26679.test.tsx(129,5): error TS2578: Unused
'@ts-expect-error' directive.` The file was restored to the HEAD blob
a7cb247, and `git diff HEAD` was empty. A first attempt was a no-op:
the tool refused it because the replacement text contained its anchor,
and no command ran.
</details>
<details><summary>Dogfood battery (bang title and narrowing
arm)</summary>
`pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter
@objectstack/dogfood test` under the verify lock, with no shard and no
path: `Test Files 487 passed | 3 skipped (490)`, `Tests 4128 passed | 68
skipped (4196)`, `VERDICT command-exit 0`.
</details>
## Acceptance notes
- `RecordTopBar.comments` stays, so this is the only published surface
that narrows.
- The e2e harness and the examples pass no `comments`, so no e2e or
example text changes.
## Verification
<details><summary>Derived gates, local subset</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 38 families from the 4-path change
set (merge base 9171bed). Each family was run and its exit code
captured before any pipe, and all 38 exited 0. Among them:
`check-adr-0087-registration --base origin/main` verified `not-required
(runtime-export-retired) -- verified:
@object-ui/components#NavigationOverlayProps.comments (member,
ui/packages/components/src/custom/navigation-overlay.tsx)`, plus
`check-changeset-no-major`, `check-empty-changeset`,
`check:type-check-debt`, `check:type-check-coverage`, `check:nul-bytes`
and `pnpm --dir ui exec vitest run scripts/` (172 files passed).
Reconciliation: `Run reconciliation — 38 derived, 38 run, 0
NOT-MEASURED, 0 UNRUN` (a derived zero: all 38 recorded an exit code).
`scripts/pm/overlap-check.mjs` before each push: `VERDICT clean exit 0`,
and origin/main merges cleanly. `test:repo` and the repo-wide lint
belong to CI.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0ad44a3 commit 6cfa758
4 files changed
Lines changed: 35 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
| |||
523 | 518 | | |
524 | 519 | | |
525 | 520 | | |
526 | | - | |
527 | 521 | | |
528 | 522 | | |
529 | 523 | | |
| |||
634 | 628 | | |
635 | 629 | | |
636 | 630 | | |
637 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
638 | 634 | | |
639 | 635 | | |
640 | 636 | | |
| |||
652 | 648 | | |
653 | 649 | | |
654 | 650 | | |
655 | | - | |
656 | 651 | | |
657 | 652 | | |
658 | 653 | | |
| |||
0 commit comments