Repository navigation
refactor(app-shell): move ObjectView's view tab strip, plugin schema and header chrome into sibling hooks (slice 9) - #26412
Conversation
…tViewOptions.ts (slice 2) The timeline/calendar/gantt/gallery/kanban ViewOptions, storedLegacyOptions, isSameOptionsValue and dispatchViewPatches move verbatim out of views/ObjectView.tsx into views/objectViewOptions.ts. ObjectView.tsx imports them back and re-exports every name it exported before. Test edits forced by the move: the four source scans that read the ObjectView face (calendarBinding-7029, galleryBinding-7547, ganttBinding-7070, titleFieldConvergence) now read ObjectView.tsx plus objectViewOptions.ts, and the writeRefusalCensus-11583 LEDGER row for dispatchViewPatches is keyed by its new file. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…ome.tsx (slice 3) ObjectNotFoundState, the saved-view tab strip's viewport check (VIEW_TABS_MIN_WIDTH, viewTabsFitNow, useViewTabsFit) and keepInlineEditModeForTheSession move verbatim out of views/ObjectView.tsx into views/objectViewChrome.tsx. ObjectView.tsx imports them back and re-exports ObjectNotFoundState, the one name it exported. No test edits. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…unt into a sibling hook Slice 4 of the move-only ObjectView split. The realtime subscription, the reconnection conflict resolution and the footer record-count fetch move verbatim from ObjectViewInner into useObjectViewLiveData in views/objectViewLiveData.ts. The component calls the hook at the same position (hook order unchanged) and passes its inputs explicitly; the recordCount state stays in the component. No test edits. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…igation into sibling hooks Slices 5 and 6 of the move-only ObjectView split, paired in one PR. - The identity-import gate, its password-policy state and data source, and the managed-environment Users marker move verbatim into useObjectViewIdentity in views/objectViewIdentity.tsx. - The record navigation overlay (detail navigation config, drawer recordId URL state, row click, expand to page, list record links) moves verbatim into useObjectViewRecordNavigation in views/objectViewRecordNavigation.ts. The URL equality filters and the user-filter selections between its two blocks stay in the component. Inputs are passed explicitly; the component destructures the returned values under their original names. No test edits. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…m their sources activeView, objectDef and objects were written as `any` in the new hook's parameter type. They now name where the component gets each value: the element of buildViewTabs' result, and ConsoleObjectViewProps['objects'] and its element. No new no-explicit-any warning; the moved bodies are unchanged. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…a sibling hook Slice 7 of the move-only ObjectView split. The environment list's entitlements, the list actions and their localized toolbar copies, and the create and import buttons' toolbar-scope predicates move verbatim into useObjectViewToolbarAffordances in views/objectViewToolbarAffordances.ts. The resolveAffordance verdict memo stays in the component (the affordance grant census reads it there) and is passed in with the other inputs, typed from their sources. No test edits. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…ate into sibling hooks Slice 8 of the move-only ObjectView split. - The header's list_toolbar actions (less the record-scoped ones the selection bar carries), the nav runAction deep link and the action:bar node move verbatim into useObjectViewHeaderToolbar in views/objectViewHeaderToolbar.ts. - The list's uf_ URL state (seed, write-back, Reset view) moves into useObjectViewListUrlState, and the filter[...] equality filters with the restored user-filter selections into useObjectViewUrlFilters, both in views/objectViewListUrlState.ts. Hook parameters are typed from their sources. One test edit, path only: ObjectView.urlFilterSuffix-9196 reads objectViewListUrlState.ts, where the scanned block now lives. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
…and header chrome into sibling hooks Move-only split of ObjectViewInner: the view tab items, ViewTabBar and its own-row face go to objectViewTabBar.tsx; the merged views and the plugin ObjectViewSchema go to objectViewPluginSchema.ts; the create button, folded header actions menu and refused-view face go to objectViewHeaderChrome.tsx. Each hook is called where its block stood. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
席位核对 · ACCEPT · seat
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40443830059 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
The merge-queue build 40443830059 failed in
No fix is needed on this PR, and I'm not porting one. The fix belongs to #26419, where #26422 tracks it. Re-queueing this PR on a stack that no longer carries #26419 is expected to go green. Generated by Claude Code |
席位核对 · re-queue · seat
|
Requested by Steve · project thread
Part of #25992 (slice 9 of the move-only split; slices 1 to 8 landed as #26152, #26233, #26310, #26336, #26353, #26374 and #26396, and the card stays open for the slices listed below).
Clause-②: no
Metadata-protocol: none
What moved
Base
e4434f75(slice 8 merged, latestmainmerged in).ui/packages/app-shell/src/views/ObjectView.tsxis 2554 lines there. Three concerns ofObjectViewInnermove verbatim into custom hooks in three new sibling modules. In each, every input is passed as an argument, typed from its source (noany), the component destructures the returned values under their original names, no identifier is renamed and no context is added.N: the view tab strip →
objectViewTabBar.tsxLines 1131–1206 move into
useObjectViewTabBar({ views, savedViews, objectDef, servedViews, viewLabel, unlabelledViewText, language, t, viewAccess, activeViewId, handleViewChange, isAdmin, handleAddView, handleRenameView, handleDeleteView, handlePinView, handleSetDefaultView, handleConfigView, setManageViewsOpen }). That covers the View Tabs docblock,useViewTabsFit(),useDisplayLocale(),viewTabItems, the<ViewTabBar>node (viewTabBar, objectui#12440) and its own-row faceviewTabRow(objectui#13114). It returnsviewTabItems,viewTabBarandviewTabRow. The view handlers it wires are typed from theViewTabBarPropscallbacks they are handed to.P (plugin schema): the merged views and
ObjectViewSchema→objectViewPluginSchema.tsLines 1975–2034 move into
useObjectViewPluginSchema({ views, activeViewId, viewDraft, activeView, objectDef, onEdit, isAdmin, location, navigate, viewId, servedViews, viewLabel, unlabelledViewText, language }):mergedViews, the active view'suserActionstoolbar policy (objectui#11013) andobjectViewSchema. It returnsmergedViewsandobjectViewSchema.viewDraftis declared in the component asuseState<Record<string, any> | null>, so it is typed asPartial<ReturnType<typeof buildViewTabs>[number]> | null: a partial of the tab it is merged over, which is the only way the block reads it.P (header chrome): the create button, folded header actions and refused-view face →
objectViewHeaderChrome.tsxLines 2036–2146 move into
useObjectViewHeaderChrome({ objectCanCreate, createVisible, createDisabled, actions, t, listActions, toolbarActionsWithDeepLink, identityImportEnabled, objectCanImport, importVisible, importDisabled, setShowImport, listFavorite, activeViewHasPreference, handleResetView, isEnvironmentList, toolbarBar, viewAccess }):showCreate,listFabClearance,createButton,toolbarRowActions,primaryToolbarAction,importShown,foldedMenuBar,foldedHeaderActions(objectui#12705) andrefusedViewFace(objectui#12112). It returnsshowCreate,listFabClearance,createButton,importShown,foldedHeaderActionsandrefusedViewFace. The block calls no React hook; it keeps theusename so it reads like its siblings and stays at the top level of the component.Each hook is called where its block stood, so the order of React hooks in the component is unchanged.
Imports
Each import moves with its only readers.
ViewTabBar,ViewTabItem,useViewTabsFit,useDisplayLocaleandpickLocalizedgo to the tab bar module.Empty,EmptyTitle,EmptyDescription,Lock,ActionBarSchema,UIActionSchemaandMOBILE_FAB_LIST_CLEARANCEgo to the header chrome module.declaredPrimaryToolbarActionalso goes there; it is still re-exported fromObjectView.tsx, line unchanged. Imports still read elsewhere in the component (viewTabLabel,viewRowId,VIEW_TYPE_ICONS,normalizeListViewSchema,Button,Plus,SchemaRenderer) are imported by the modules as well. Nothing new is exported fromObjectView.tsx, and the package entry is untouched.ObjectView.tsxgoes from 2554 to 2374 lines.Move-only proof: the multiset of non-blank lines of the base
ObjectView.tsxis contained in newObjectView.tsxplus the three modules. The only base lines missing are 11 import lines or import-list entries that lost a moved name: the@object-ui/plugin-viewvalue and type imports,Empty/EmptyTitle/EmptyDescriptionin the@object-ui/componentslist, thelucide-react,@object-ui/types,@object-ui/i18nand./objectViewChrome.jsimports, and thedeclaredPrimaryToolbarActionandMOBILE_FAB_LIST_CLEARANCEentries. The trimmed lines replace them. The added lines are the trimmed imports and the three new imports, the module headers and imports, the hook signatures and parameter types, thereturnobjects, and inObjectView.tsxthe three calls with their destructuring and two-line comments.Test edits
None. No source reader of
ObjectView.tsxnames a moved line: the readers that mentionViewTabBar,userActionsornormalizeListViewSchemareadplugin-view/src/ObjectView.tsx, mock the module, or anchor onfullSchemainsiderenderListView, which stays.Seam table rows this PR changes (measured on
e4434f75)The full table (regions A to Q) is in #26336.
e4434f75ViewTabBar, its own-row facesavedViews,views,activeViewId,viewAccess), I (view handlers)userActionstoolbar policy,ObjectViewSchemaviewDraft), C, FlistFavorite), D, E, F (viewAccess), G, H, J (actions)Remaining slices (the last closes the card)
PageHeader, import wizard andNavigationOverlayblocks into sub-components with explicit props.renderListViewand the column flags only it reads. ThewriteRefusalCensus-11583rows, therelayRungCensus-7559read and thecheck-i18n-call-site-keys.test.tsdeleteViewConfirmrow 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-checkafter rebuilding its dependency closure, everyObjectView.*test inviews/(the view tab, header fold, mobile FAB, refused view and favorites tests among them), theAppContent*tests, every other test that readsObjectView.tsxas source, eslint on the 4 touched files, the derived dispatch gates, and a Console build.Acceptance notes
ObjectView.tsxalone: threereact-hooks/preserve-manual-memoizationwarnings are no longer raised, and the twoexhaustive-depswarnings onhandleViewChangeonly moved lines.Changeset:
.changeset/25992-objectview-tab-bar-header-chrome-split.md(patch,@object-ui/app-shell).🤖 Generated with Claude Code
https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz