Repository navigation
refactor(app-shell): move ObjectView's module-level helpers into sibling modules (slice 1) - #26152
Merged
Merged
Conversation
…ing modules Slice 1 of the move-only split of the Console ObjectView. The pure helpers, types and constants above the component move verbatim into objectViewHelpers.ts, objectViewKindOptions.ts, objectViewRecordLinks.ts and objectViewTabs.ts. ObjectView.tsx keeps the component, imports the helpers back and re-exports every name it exported before. Claude-Session: https://claude.ai/code/session_01XoX8HCroGnX4axVMMZ1JDd Co-authored-by: Claude <noreply@anthropic.com>
Four source scans in app-shell (the gallery, gantt and calendar binding tests and the titleField convergence census) read ObjectView.tsx for the timeline/calendar/gantt/gallery/kanban options builders. Moving the family out would mean re-pointing those scans, which is more than an import path edit, so it stays beside the component for this slice. Adds the changeset. Claude-Session: https://claude.ai/code/session_01XoX8HCroGnX4axVMMZ1JDd Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 26, 2026
This was referenced Oct 26, 2026
Merged
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 (slice 1 of the move-only split; the card stays open for the next slices).
Clause-②: no
Metadata-protocol: none
What moved
Re-measured on
origin/main8a990d8 before coding:ui/packages/app-shell/src/views/ObjectView.tsxwas 4414 lines, module-level code on lines 1-1436, the component from line 1437. This slice moves module-level helpers, types and constants, verbatim, into three sibling modules:objectViewHelpers.ts:VIEW_TYPE_ICONS,FALLBACK_USER,substituteFilterTokens,declaredPrimaryToolbarAction,selectFilterParams,MOBILE_FAB_LIST_CLEARANCE.objectViewRecordLinks.ts:listRecordDetailUrl,NO_RELATED_HANDLERS,listRecordActionsValue,ListRecordRoutes.objectViewTabs.ts:defaultListColumnsFromObject(with its docblock),bulkWiredActionNamesKey,buildAddViewSpec,sanitizeViewOverride,loadViewOverrides,buildViewTabs,setDefaultViewPatches,VIEW_ROW_STATE_KEYS,getListViewConfigKeys,buildViewConfigSaveBody.ObjectView.tsxkeeps the component, imports these back, and re-exports every name it exported before (ListRecordRoutesas a type re-export). The package entry (src/index.ts,src/views/index.ts) is untouched. The only edits beyond the move are theexportkeyword on the five formerly file-local names the component now imports (VIEW_TYPE_ICONS,FALLBACK_USER,substituteFilterTokens,MOBILE_FAB_LIST_CLEARANCE,bulkWiredActionNamesKey), a one-line file header per new module, and pruning the importsObjectView.tsxno longer uses.Move-only proof: the multiset of non-blank lines of the base file equals the multiset of the new
ObjectView.tsxplus the three modules' bodies, once the addedexportkeyword is normalised away. The only lines that differ are import lines and the new import / re-export block.Kept in ObjectView.tsx on purpose
timelineViewOptions,calendarViewOptions,ganttViewOptions,galleryViewOptions,kanbanViewOptions,storedLegacyOptions,isSameOptionsValue). Four app-shell tests scanObjectView.tsxsource text for this family:ObjectView.galleryBinding-7547,ObjectView.ganttBinding-7070,ObjectView.calendarBinding-7029andObjectView.titleFieldConvergence(its "exactly six" seam count). Moving the family turned three of them red (measured). Re-pointing those reads is a change to test logic, not an import orvi.mockpath, so it is left for the seat to rule on before a later slice.dispatchViewPatches:writeRefusalCensus-11583's ledger keys that write site byfile: 'ObjectView.tsx'.ConsoleObjectViewProps,ObjectNotFoundState,useViewTabsFit(withVIEW_TABS_MIN_WIDTH/viewTabsFitNow) andkeepInlineEditModeForTheSession: the component's own props, a React component and a hook, which belong with the component-body slices.Test edits
None. No import,
vi.mockor other test file changed.Verification
@object-ui/app-shellwhole suite, before and after, at the same tree otherwise (vitest run --maxWorkers=3 packages/app-shell/underscripts/pm/os-verify-lock.sh):ObjectView.tsxrestored to the 8a990d8 blob and the new modules removed: the same counts, VERDICT command-exit 0. The tree was restored from HEAD afterwards andgit statuswas clean.ObjectView.tsxas text (app-shell,types,react,plugin-form,plugin-grid,ui/scripts): 24 files / 819 tests passed.origin/main(head 646c0e7): rebuilt the@objectstack/*and@object-ui/app-shell^...closures,pnpm --filter @object-ui/app-shell type-check(src andtsconfig.test.json) exit 0, and a scoped re-run of 128 files (the text readers, everyObjectView*/CreateViewDialog*test, and theAppContent*tests that mock this module) passed 1705/1705. The incoming main commits touch app-shell only outsideviews/(home, layout, preview), so the whole suite was not re-run on the merge; CITest Corecovers it.eslinton the four changed source files: 0 errors (warnings are the pre-existingno-explicit-anyones, moved with their lines).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon 646c0e7: 29 families, each run, each exit 0;--ranreconciles 29/29.check-sdui-manifestis green and the record did not move.Acceptance notes
ObjectView.tsx(for example the absence checks inObjectView.urlFilterSuffix-9196,ObjectView.overlayPatchOnlyandObjectView.unboundAdapterCall) now read the component and the helpers that stayed, and no longer read the moved helpers. All of them still pass, and none of them was aimed at the moved code. Noted, not filed.loadViewOverridesabove"; that function now lives inobjectViewTabs.ts. Left unchanged so this slice stays move-only.Generated by Claude Code