Skip to content

refactor(app-shell): move ObjectView's module-level helpers into sibling modules (slice 1) - #26152

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-4zo4ol
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-4zo4ol

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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/main 8a990d8 before coding: ui/packages/app-shell/src/views/ObjectView.tsx was 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.tsx keeps the component, imports these back, and re-exports every name it exported before (ListRecordRoutes as a type re-export). The package entry (src/index.ts, src/views/index.ts) is untouched. The only edits beyond the move are the export keyword 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 imports ObjectView.tsx no longer uses.

Move-only proof: the multiset of non-blank lines of the base file equals the multiset of the new ObjectView.tsx plus the three modules' bodies, once the added export keyword is normalised away. The only lines that differ are import lines and the new import / re-export block.

Kept in ObjectView.tsx on purpose

  • The per-kind options family (timelineViewOptions, calendarViewOptions, ganttViewOptions, galleryViewOptions, kanbanViewOptions, storedLegacyOptions, isSameOptionsValue). Four app-shell tests scan ObjectView.tsx source text for this family: ObjectView.galleryBinding-7547, ObjectView.ganttBinding-7070, ObjectView.calendarBinding-7029 and ObjectView.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 or vi.mock path, so it is left for the seat to rule on before a later slice.
  • dispatchViewPatches: writeRefusalCensus-11583's ledger keys that write site by file: 'ObjectView.tsx'.
  • ConsoleObjectViewProps, ObjectNotFoundState, useViewTabsFit (with VIEW_TABS_MIN_WIDTH / viewTabsFitNow) and keepInlineEditModeForTheSession: the component's own props, a React component and a hook, which belong with the component-body slices.

Test edits

None. No import, vi.mock or other test file changed.

Verification

  • @object-ui/app-shell whole suite, before and after, at the same tree otherwise (vitest run --maxWorkers=3 packages/app-shell/ under scripts/pm/os-verify-lock.sh):
    • after, head 25b9143: Test Files 1729 passed, 1 skipped (1730); Tests 15924 passed, 9 skipped (15933). VERDICT command-exit 0.
    • before, ObjectView.tsx restored to the 8a990d8 blob and the new modules removed: the same counts, VERDICT command-exit 0. The tree was restored from HEAD afterwards and git status was clean.
  • The 24 tests that read ObjectView.tsx as text (app-shell, types, react, plugin-form, plugin-grid, ui/scripts): 24 files / 819 tests passed.
  • After merging origin/main (head 646c0e7): rebuilt the @objectstack/* and @object-ui/app-shell^... closures, pnpm --filter @object-ui/app-shell type-check (src and tsconfig.test.json) exit 0, and a scoped re-run of 128 files (the text readers, every ObjectView* / CreateViewDialog* test, and the AppContent* tests that mock this module) passed 1705/1705. The incoming main commits touch app-shell only outside views/ (home, layout, preview), so the whole suite was not re-run on the merge; CI Test Core covers it.
  • eslint on the four changed source files: 0 errors (warnings are the pre-existing no-explicit-any ones, moved with their lines).
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on 646c0e7: 29 families, each run, each exit 0; --ran reconciles 29/29. check-sdui-manifest is green and the record did not move.

Acceptance notes

  • Source-text scans that read ObjectView.tsx (for example the absence checks in ObjectView.urlFilterSuffix-9196, ObjectView.overlayPatchOnly and ObjectView.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.
  • One comment in the component body still says "loadViewOverrides above"; that function now lives in objectViewTabs.ts. Left unchanged so this slice stays move-only.

Generated by Claude Code

…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>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T14:12Z

Head 646c0e73cc23 (read from the PR object).

  • Shape. Draft on main; Part of #25992 (slice 1 of the ObjectView.tsx split); changeset .changeset/25992-objectview-helpers-split.md in the root .changeset/. Files: ObjectView.tsx and three new modules beside it (objectViewHelpers.ts, objectViewRecordLinks.ts, objectViewTabs.ts). No test edits.
  • Checks pinned to the head. 54 named check runs, latest per name: 46 success, 8 skipped, 0 failing, 0 pending.
  • Governed surface. check-governed-merges.mjs --pr 26152: not governed, +841/-766.
  • Verbatim move, checked by the seat. I compared the set of removed lines with the set of added lines in ui/packages/app-shell/src/views/. Every removed line reappears unchanged. The only differences are an export added to the moved module-level declarations (FALLBACK_USER, MOBILE_FAB_LIST_CLEARANCE, VIEW_TYPE_ICONS, bulkWiredActionNamesKey, substituteFilterTokens) and the redistributed import lines. ObjectView.tsx re-exports every name it exported before, so imports by path still resolve.
  • Deviation, accepted. The view-options family and dispatchViewPatches stay in ObjectView.tsx. Four tests readFileSync that file for the options family, and the writeRefusalCensus-11583 ledger keys dispatchViewPatches by file. Moving them would need test-logic edits outside this slice's "import / vi.mock paths only". A later slice may re-point those reads, and the seat will write that into its claim.
  • Serial constraints. app-shell is outside the sdui registry closure, and no record file is in the diff. Main has moved 6 commits since the merge base, none under ui/packages/app-shell/src/views/, and git merge-tree against current main is clean.

Landing: ready + auto-merge through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 14:14
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 26, 2026 14:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit d00215f Oct 26, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-4zo4ol branch October 26, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants