Repository navigation
refactor(app-shell): move ObjectView's identity import and record navigation into sibling hooks (slices 5+6) - #26353
Merged
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>
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 27, 2026
refactor(app-shell): move ObjectView's list toolbar affordances into a sibling hook (slice 7)
#26374
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Part of #25992 (slices 5 and 6 of the move-only split, paired in one PR as the seat allowed; slices 1 to 4 landed as #26152, #26233, #26310 and #26336, and the card stays open for the slices listed below).
Clause-②: no
Metadata-protocol: none
What moved
Base
b9cd9809(slice 4 merged).ui/packages/app-shell/src/views/ObjectView.tsxis 3123 lines there. Two concerns ofObjectViewInnermove verbatim into custom hooks in new sibling modules. In both, every input is passed as an argument, the component destructures the returned values under their original names, no identifier is renamed and no context is added.Slice 5: identity import and the managed-environment Users marker →
objectViewIdentity.tsxLines 688–752 move into
useObjectViewIdentity({ objectDef, isAdmin, dataSource, refreshKey, t, actionRuntime }):featuresfromuseExpressionContext,isIdentityImport,identityImportEnabled),managedUsers, the metadata-store ref, the grant-loader ref andmanagedUserMarker),identityDataSource.It returns the six names the rest of the component reads:
identityImportEnabled,managedUsers,managedUserMarker,identityPasswordPolicy,setIdentityPasswordPolicy,identityDataSource. The module is.tsxbecause the marker callback returns<UnauthorizedUserMarker>. The import-wizard open state (showImport, line 686) stays in the component, because the header and the wizard read it.Slice 6: the record navigation overlay →
objectViewRecordNavigation.tsTwo blocks move into
useObjectViewRecordNavigation({ activeView, objectDef, objects, appName, viewId, searchParams, setSearchParams, location, navigate, routerRootHref, servedViews, viewLabel, unlabelledViewText, language }):detailNavigation(the authored or derived overlay mode and width) anddrawerRecordId,handleNavOverlayNavigate,listRecordActions,navOverlay(useNavigationOverlay),handleDrawerClose,handleRowClick,handleExpandDrawerand the effect that syncs?recordId=to the overlay.It returns the five names the rest of the component reads:
listRecordActions,navOverlay,handleDrawerClose,handleRowClick,handleExpandDrawer.The block between the two (lines 1491–1562: the
filter[...]URL equality filters and theuf_*user-filter selections) stays in the component. It is a different concern (list filter URL state, row H's neighbour in the seam table), andObjectView.urlFilterSuffix-9196.test.tspinsconst urlFilters,parseUrlEqualityFilterTriplesand the./drillUrlFilters.jsimport inObjectView.tsx. Because the hook is called where the first block stood, the three hooks of that filter block (useMemo,useRef,useCallback) now run after the navigation hooks instead of between them. The two groups share no value, the order is the same on every render, and the only effect in either group, the?recordId=sync, keeps its place among the component's effects.Imports
Each import moves with its only readers:
deriveRecordSurface,overlayWidthFor,RECORD_DRAWER_PARAM,ViewNavigationConfig,useNavigationOverlay,listRecordDetailUrl,listRecordActionsValue(still re-exported fromObjectView.tsx, line unchanged) go to the navigation module.useMetadata,useExpressionContext,createIdentityImportDataSource,IDENTITY_IMPORT_OBJECT,IdentityPasswordPolicy,MANAGED_USERS_OBJECT,UnauthorizedUserMarker,UserGrantLoaderandisManagedEnvironmentgo to the identity module.viewTabLabelis imported by both, since the component still reads it. Nothing new is exported fromObjectView.tsx, and the package entry is untouched.ObjectView.tsxgoes from 3123 to 2926 lines.Move-only proof: the multiset of non-blank lines of the base
ObjectView.tsxis contained in newObjectView.tsxplus the two modules. The only base lines missing are the five import lines that lost a moved name, each replaced by its trimmed form. The added lines are the trimmed imports and the two new imports, the module headers and imports, the hook signatures and parameter types, thereturnobjects, and inObjectView.tsxthe two calls with their destructuring and two-line comments.Test edits
None.
identityImportWriteModes-12697readsObjectView.tsxfor the wizard'sIDENTITY_IMPORT_WRITE_MODESspread and its import from./identityImport.js; both stay in the component, and the import keeps that name.urlFilterSuffix-9196is covered by keeping the filter block in place (above). No other source reader names a moved line.Seam table of
ObjectViewInnerThe full table (regions A to Q) is in #26336. Measured again on
b9cd9809, with the rows this PR changes:b9cd9809t), C (objectDef,isAdmin,refreshKey,actionRuntime), propdataSourceactiveView), propsobjectsfilter[...]URL equality filters +uf_*user-filter selectionslistIdentityKey,ownListParamsRef)Remaining slices (the last closes the card)
ObjectView.urlFilterSuffix-9196.test.tsto the new file (path change only, under the seat's re-pointing allowance); otherwise it stays.PageHeader, import wizard andNavigationOverlayblocks into sub-components with explicit props.renderListView, with thewriteRefusalCensus-11583rows and therelayRungCensus-7559read re-pointed to the new file (path and file-key changes only), as the seat allowed.The seat allows pairing two of these per PR. A, C, F, J and M (the held list refs, read only by
renderListView, which go with O) stay where the table says.Verification
See the os-dev-report comment on the card for the full readings: app-shell
type-check, everyObjectView.*test inviews/, theAppContent*tests, every other test that readsObjectView.tsxas source, the app-shell tests that touch identity import, managed users or the record drawer, eslint on the 3 touched files, the derived dispatch gates, and a Console build.Acceptance notes
anycasts, and the twoexhaustive-depswarnings onhandleExpandDrawer(handleDrawerClose) and the drawer-sync effect (navOverlay). Dependency arrays and casts are kept verbatim because the slices are move-only. The three files report 152 warnings in total, against 158 for the baseObjectView.tsxalone.any(seat review, laneanyremoval lint/types: 14,366 no-explicit-any warnings can never red CI — make it an error on packages/types/src, delete the vestigial (schema as any) reads, and type ComponentRendererProps with unknown #25918):activeViewisReturnType<typeof buildViewTabs>[number],objectsisConsoleObjectViewProps['objects']andobjectDefits element. TheConsoleObjectViewPropsimport from./ObjectView.jsisimport type, so it is erased and adds no runtime cycle.Changeset:
.changeset/25992-objectview-identity-navigation-split.md(patch,@object-ui/app-shell).🤖 Generated with Claude Code
https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz