Repository navigation
Commit a7f4b99
refactor(app-shell): move ObjectView's page header and record overlay into sibling sub-components (slice 10) (#26434)
<!-- 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 10 of the move-only split; slices 1 to 9 landed as
#26152, #26233, #26310, #26336, #26353, #26374, #26396 and #26412, and
the card stays open for slice 11).
Clause-②: no
Metadata-protocol: none
## What moved
Base `4ef75053` (slice 9 merged, latest `main` merged in; `main` has not
touched `ObjectView.tsx` since).
`ui/packages/app-shell/src/views/ObjectView.tsx` is 2374 lines there.
Two blocks of `ObjectViewInner`'s JSX return move verbatim into
sub-components in two new sibling modules. In each, every value the
block read is passed as a prop, typed from its source (no `any`), the
props keep the names the block used, no identifier is renamed, no
context is added, and the rendered DOM is the same.
### Q-header: the page header → `objectViewPageHeader.tsx`
Lines 1987–2100 (the `hidden sm:block` wrapper and its `PageHeader`)
move into `ObjectViewPageHeader`, mounted in their place with the props
`objectDef`, `objectPluralLabel`, `objectDesc`, `createButton`,
`importShown`, `setShowImport`, `importDisabled`, `t`, `listActions`,
`isEnvironmentList`, `headerToolbarActions`, `environmentEntitlements`,
`toolbarBar`, `listFavorite`, `activeViewHasPreference`,
`handleResetView` and `foldedHeaderActions`. That covers the plural
title (objectui#11696), the managed-by badge (objectui#12194, #12606),
the `createElement` icon, the create button, Import, the schema-driven
toolbar or `EnvironmentListToolbar`, the overflow menu with favorites
and "Reset view" (objectui#12427, #12418), and the folded face
(objectui#12705). The "1. Header with breadcrumb + description" comment
above it stays in place.
### Q-overlay: the record detail overlay → `objectViewRecordOverlay.tsx`
Lines 2347–2368 (the `NavigationOverlay` drawn for every mode but
`split`, with its `RecordDetailView` render function) move into
`ObjectViewRecordOverlay`, with the props `navOverlay`,
`handleDrawerClose`, `objectLabel`, `objectDef`, `handleExpandDrawer`,
`t`, `dataSource`, `objects` and `onEdit`. The `navOverlay.mode !==
'split' &&` guard around it stays in the component.
### What stays in the return, and why
- **The import wizard.**
`plugin-form/src/affordanceGrantMap-12082.test.tsx` finds the
`ImportWizard` mounts by walking JSX element names per file, and
requires each mount to sit in a file the `listImport` site names
(`CONSOLE_LIST` = `ObjectView.tsx`, which also reads the `listImport`
row). A mount in a new file would fail that pin. Re-pointing it would
change the site's `readBy` list rather than a path, so the block stays.
- **The `split` face of the overlay.** It wraps the list itself
(`mainContent` holds the `PluginObjectView`), so moving it would mean
passing that subtree in as a prop, which changes lines.
- The phone FAB, `ManageViewsDialog`, the managed-users invite line, the
list area, `MetadataPanel`, `ViewConfigPanel` and `CreateViewDialog`
stay. They are short, or they are the views' own config surface, which
slice 11's handlers feed.
### Imports
Each import moves with its only readers. `createElement`, `Button`, the
four `DropdownMenu*` parts, `Upload`, `MoreHorizontal`, `RotateCcw`,
`SchemaRenderer`, `FavoriteMenuItem`, `getIcon`, `PageHeader`,
`ManagedByBadge` and `EnvironmentListToolbar` go to the header module.
`NavigationOverlay` and `RecordDetailView` are still drawn by the
`split` face, so the overlay module imports them too. Nothing new is
exported from `ObjectView.tsx`, and the package entry is untouched.
`ObjectView.tsx` goes from 2374 to 2263 lines.
Move-only proof: the multiset of non-blank lines of the base
`ObjectView.tsx` is contained in new `ObjectView.tsx` plus the two
modules. The only base lines missing are four import lines that lost a
moved name: the `react`, `lucide-react`, `../layout/SidebarItemMenu.js`
and `@object-ui/react` imports. Each is replaced by its trimmed form.
Removed outright are the `Button` and `DropdownMenu*` entries of the
`@object-ui/components` list and the `getIcon`, `PageHeader`,
`ManagedByBadge` and `EnvironmentListToolbar` imports, whose lines
reappear verbatim in the header module. The added lines are the trimmed
imports and the two new imports, the module headers and imports, the
component signatures and prop types, `return (` / `);`, and in
`ObjectView.tsx` the two mounts with their props and one-line comments.
## Test edits
None. No source reader of `ObjectView.tsx` names a moved line. The
readers that mention `PageHeader`, `NavigationOverlay`,
`RecordDetailView` or `EnvironmentListToolbar` read other files, mock
the module, or assert an absence
(`navRunAction.privateConventionRetired`: no `runAction` literal, which
holds in every file). The `affordanceGrantMap-12082` mount walk sees no
host-gated component mounted in either new module.
## Seam table rows this PR changes (measured on `4ef75053`)
The full table (regions A to Q) is in #26336.
| # | Concern | Lines on `4ef75053` | Reads | Read by | Slice |
|---|---|---|---|---|---|
| Q-header | `PageHeader`: title, badge, icon, create, Import, toolbar,
overflow menu, folded face | 1987–2100 | A, C, D, E (`setShowImport`),
G, H, P | — | **10, this PR** |
| Q-overlay | `NavigationOverlay` for every mode but `split` | 2347–2368
| A, C, L | — | **10, this PR** |
| Q (rest) | Providers, FAB, import wizard, tab row, dialogs, list area,
`split` overlay, config panel | 1968–2346 less Q-header | everything | —
| stays (see above) |
## Remaining slice (closes the card)
- **Slice 11 — B + I + O + G-columns:** the view-config and view-tab
CRUD handlers, `renderListView` and the column flags only it reads. The
`writeRefusalCensus-11583` rows, the `relayRungCensus-7559` read, the
`check-i18n-call-site-keys.test.ts` `deleteViewConfirm` row and the
`tree-view-config-readers-8253` `CONSOLE_COMPOSITION` read of the tree
`labelField` rung are re-pointed (path and file-key changes only).
## Verification
See the os-dev-report comment on the card for the full readings:
app-shell `type-check` after rebuilding its dependency closure, every
`ObjectView.*` test in `views/` (header fold, favorites entry, list
title plural, managed-by badge, setup list chrome, import and create
predicates, record navigation and overlay tests among them), the
`AppContent*` tests, every other test that reads `ObjectView.tsx` as
source, eslint on the 3 touched files, the derived dispatch gates, and a
Console build.
## Acceptance notes
- eslint: 0 errors, no new warning. The three files report 110 warnings,
the same count as the base `ObjectView.tsx` alone; the two
`exhaustive-deps` warnings on `handleViewChange` only moved lines.
Changeset: `.changeset/25992-objectview-page-header-overlay-split.md`
(patch, `@object-ui/app-shell`).
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 11cb1d5 commit a7f4b99
4 files changed
Lines changed: 297 additions & 148 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 | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 30 | | |
36 | 31 | | |
37 | | - | |
38 | | - | |
| 32 | + | |
| 33 | + | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
43 | | - | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
| |||
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
56 | | - | |
57 | 50 | | |
58 | 51 | | |
59 | | - | |
60 | 52 | | |
61 | 53 | | |
62 | 54 | | |
| |||
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
74 | | - | |
| 66 | + | |
75 | 67 | | |
76 | 68 | | |
77 | | - | |
78 | 69 | | |
79 | 70 | | |
80 | 71 | | |
| |||
108 | 99 | | |
109 | 100 | | |
110 | 101 | | |
| 102 | + | |
| 103 | + | |
111 | 104 | | |
112 | 105 | | |
113 | 106 | | |
| |||
1984 | 1977 | | |
1985 | 1978 | | |
1986 | 1979 | | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
1991 | | - | |
1992 | | - | |
1993 | | - | |
1994 | | - | |
1995 | | - | |
1996 | | - | |
1997 | | - | |
1998 | | - | |
1999 | | - | |
2000 | | - | |
2001 | | - | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
2032 | | - | |
2033 | | - | |
2034 | | - | |
2035 | | - | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
2039 | | - | |
2040 | | - | |
2041 | | - | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
2047 | | - | |
2048 | | - | |
2049 | | - | |
2050 | | - | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | | - | |
2093 | | - | |
2094 | | - | |
2095 | | - | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
2099 | 1999 | | |
2100 | | - | |
2101 | 2000 | | |
2102 | 2001 | | |
2103 | 2002 | | |
| |||
2344 | 2243 | | |
2345 | 2244 | | |
2346 | 2245 | | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
2353 | | - | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2369 | 2258 | | |
2370 | 2259 | | |
2371 | 2260 | | |
| |||
0 commit comments