Repository navigation
Commit 96635f5
refactor(app-shell): move ObjectView's view-options family into objectViewOptions.ts (slice 2) (#26233)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9VtKf3F9dzJPJM4RRtABaEc)_
Part of #25992 (slice 2 of the move-only split; slice 1 landed as
#26152, and the card stays open for any later slice).
Clause-②: no
Metadata-protocol: none
## What moved
Base `d00215f6` (slice 1 merged). This slice moves the view-options
family and the view-patch dispatcher, verbatim, out of
`ui/packages/app-shell/src/views/ObjectView.tsx` into a new sibling
module `ui/packages/app-shell/src/views/objectViewOptions.ts`:
- `timelineViewOptions`, `calendarViewOptions`, `ganttViewOptions`,
`galleryViewOptions`, `kanbanViewOptions` (with the shared docblocks
above them)
- `storedLegacyOptions`
- `isSameOptionsValue` (was file-local; it gains the `export` keyword
because the component still calls it, and `ObjectView.tsx` does NOT
re-export it, so no new name is published from there)
- `dispatchViewPatches`
`ObjectView.tsx` imports all eight back and re-exports the seven names
it exported before, from the same path. The package entry is untouched.
`detectStatusField` is imported by the new module instead of
`ObjectView.tsx` (its only reader moved). `ObjectView.tsx` goes from
3689 to 3254 lines.
Move-only proof: the multiset of non-blank lines of the base
`ObjectView.tsx` equals new `ObjectView.tsx` plus
`objectViewOptions.ts`, after normalising the one added `export`
keyword. Nothing is missing; the only added lines are the new module's
header comment, the import and re-export blocks, and their one-line
comment.
## Test edits (all forced by the move, as the claim allows)
1. `ObjectView.calendarBinding-7029.test.tsx`, the "no invented calendar
field name survives in the source" scan
2. `ObjectView.galleryBinding-7547.test.tsx`, the "no invented gallery
cover name survives in the source" scan
3. `ObjectView.ganttBinding-7070.test.tsx`, the "no invented gantt date
name survives in the source" scan
4. `ObjectView.titleFieldConvergence.test.tsx`, the "the seven seams
share ONE expression shape" scan
Each `readFileSync` of `ObjectView.tsx` now reads `ObjectView.tsx` and
`objectViewOptions.ts` and joins them. Reading both, not only the new
module, keeps every scan over exactly the lines it read before: the
titleFieldConvergence count ("exactly six") spans four seams that moved
and two (map, tree) that stay in the component, and the
calendar/gantt/gallery tripwires keep covering the component's own
relay. No assertion changed.
5. `writeRefusalCensus-11583.test.ts`: the `LEDGER` row for
`dispatchViewPatches` (callee `updateView`, kind `relays`) is keyed
`file: 'objectViewOptions.ts'` instead of `'ObjectView.tsx'`. The
`handleSetDefaultView` row that calls it stays on `ObjectView.tsx`.
No other test file changed.
## Verification
See the os-dev-report comment on the card for the full readings. In
short: every test file under `ui/packages/app-shell/src/views/` plus the
7 source-reading tests outside it passed (1160 files); app-shell
`type-check`; eslint on the 7 touched files with 0 errors; the 35
derived dispatch gates; a Console build after merging the latest main.
## Acceptance notes
- Some moved prose still says "below" or "above" about the relay in
`ObjectView.tsx` (for example the `storedLegacyOptions` docblock's "The
relay below"). It is kept verbatim because the slice is move-only; the
relay is now in the sibling file.
- `ObjectView.unboundAdapterCall.test.ts` still scans only
`ObjectView.tsx` for a detached adapter write. `dispatchViewPatches`
itself calls through the object, and the census row above still pins it.
Changeset: `.changeset/25992-objectview-options-split.md` (patch,
`@object-ui/app-shell`).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent b5d137a commit 96635f5
8 files changed
Lines changed: 521 additions & 474 deletions
File tree
- .changeset
- ui/packages/app-shell/src/views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments