Skip to content

fix(app-shell): Studio's Interfaces rail keys a nav entry by its id, so slices and named views of one object preview and deep-link as themselves (objectui#11774) - #11833

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11774-nav-surface-identity
Oct 7, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11774-nav-surface-identity

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #11774

Clause-②: no

Studio's Interfaces rail identified a nav entry by its target, {type, name}, alone. An app whose nav holds several entries on one object (the plain list, data slices via filters, a named view via viewName) therefore had one surface for all of them: clicking Urgent Tasks highlighted all five showcase_task rows, previewed every task unfiltered, and a reload landed on Tasks. The surface is now the nav entry.

What changed

All inside packages/app-shell/src/views/studio-design/, the claim's file surface. No package-entry export, no @object-ui/types member and no locale key is added.

  • navSurface.ts: resolveSurface now carries the entry's id as navId on every variant, plus an object entry's filters / viewName as authored. The binding itself is unchanged: all five showcase entries still bind object:showcase_task. isSameSurface is the one identity rule. It compares by nav id when both sides carry one, else by {type, name}. findSurfaceInTree opens the entry whose id a deep link names when that entry still exists. Otherwise it takes the first {type, name} match in tree order, as before.

  • StudioDesignSurface.tsx (Interfaces pillar only): NavTree's isActive reads isSameSurface. The canvas hands the open entry to the studio canvas through StudioCanvasNavEntryContext, which sits beside StudioCanvasPreviewProps and not in them, because those props are on the package entry.

  • useSurfaceDeepLink.ts: the entry id travels in a key of its own, nav, beside ?surface=, for example ?surface=object:showcase_task&nav=nav_slice_urgent. It is a separate key and not a nav:ID value of ?surface=, because every ?surface= reader parses TYPE:NAME: each pillar's restore, the app-to-Studio bridge in utils/appRoute.ts, and the copilot context in StudioAiCopilot. A second value grammar would hand each of them a nav "type". All of those readers stay unedited. A link without nav resolves exactly as before. The mirror clears nav when the open surface has no entry id.

  • studio-canvas-preview.tsx: the default object canvas does not interpret filters / viewName itself. navEntryListTarget asks resolveHref (@object-ui/layout, the shell's nav-to-URL source) where the running app takes the entry, then reads that landing the way its route does:

    • a /data landing through parseUrlFilterTriples, the parser ObjectDataPage uses;
    • a /view/VIEW landing matched with resolveViewId against the object's merged listViews, the matcher ObjectView and useNavTargetLabel use.

    A plain entry renders the schema it rendered before.

  • Changeset: .changeset/11774-nav-surface-identity.md, @object-ui/app-shell patch.

Evidence (local head 1a301c4)

  • H1, measured on the base (a scratch run of resolveSurface, not committed): the five showcase entries nav_tasks, nav_slice_in_progress, nav_slice_urgent, nav_slice_review and nav_report_tabular each returned exactly {type: object, name: showcase_task, label}. No id, no filters, no viewName. findSurfaceInTree(object:showcase_task) returned Tasks.

  • Real browser (Chromium, through a dev-only harness that was never committed: the real InterfacesPillar over an in-memory metadata backend and data source, the showcase nav abridged to its showcase_task entries):

    Filer's step Before (source at d53fd02) After
    2. click Urgent Tasks 5 rows active; query had no filter; 8 rows, priorities Urgent/High/Medium/Low; URL ?surface=object:showcase_task 1 row active (Urgent Tasks); query [[priority, =, urgent]]; 3 rows, all Urgent; URL ?surface=object:showcase_task&nav=nav_slice_urgent
    3. reload caption Tasks, 5 rows active caption Urgent Tasks, 1 row active, same 3 rows
    extra: click Task List 5 rows active, bare grid 1 row active, the tabular view's columns
  • Pins:

    • StudioDesignSurface.navEntryIdentity-11774.test.tsx mounts the pillar with the default canvas and a recorder for object-view. It pins five things: each click makes exactly that row active and hands the canvas that entry's slice or view; the deep link round-trips (Urgent Tasks, read back from the URL, remounts active); ?surface=object:showcase_task with no id opens Tasks; a stale id falls back as the same link without it does; distinct-object apps are the control.
    • navSurface.test.ts, useSurfaceDeepLink.test.ts and studio-canvas-preview.test.tsx pin the pure halves.
  • Reverse check: the four source files were checked out from d53fd02 with the pins kept, restored from HEAD after the run, and git diff HEAD was empty afterwards. The pillar pin file went 4 failed | 2 passed. The first pin failed in the predicted direction, ["Tasks"] expected and the five labels received. The round-trip failed with nav expected as nav_slice_urgent and received as null. The control pin and the fixture-parse pin passed on the base as on the fix.

  • Gates, run on 1a301c4 unless noted, exit code then verdict:

    • vitest run over packages/app-shell/src/views/studio-design/ plus apps/console/src/components/StudioRoute*.test.tsx: 0, Test Files 97 passed (97), Tests 604 passed (604).
    • pnpm --filter @object-ui/app-shell type-check: 0. Both tsc legs ran, and --listFilesOnly shows all four touched test files in the test project.
    • pnpm --filter '@object-ui/app-shell^...' build: 0. Run once, before the first commit. The closure excludes app-shell, the only package this diff touches.
    • check:control-bytes, check:new-line-citations, check:changeset-claims, check:pending-changeset-literals: all 0.
    • Added from the actual diff (new imports, a new vi.mock test): check:phantom-deps, check:esm-specifiers, check:vi-mock-specifiers, check:vi-mock-inherit, check:vi-mock-override-shape, check:test-path-roots, check-changeset-presence, check-changeset-no-major, check-governed-queue-guard --test (NOT GOVERNED): all 0.
  • Lint: the repo-wide pnpm lint was not run here; CI owns it. A targeted eslint --no-inline-config over the eight changed TS files was compared per file against d53fd02. The only new findings are 2 react-refresh/only-export-components warnings in studio-canvas-preview.tsx, which already carried 3 of that rule. The 1 error the run reports is react-hooks/static-components in the Data pillar, in the same count on the base.

Acceptance notes

  • Control and the URL. Highlight, preview and restore on distinct-object apps are unchanged, and the control pin is green on the base too. The mirrored URL now carries the entry id for every entry that has one, including those apps. This is deliberate: a shared link keeps naming its entry if the author later adds a second entry on the same object.
  • Downstream canvases. A canvas registered over the default with registerStudioCanvasPreview does not receive the entry. Carrying it there means a new member on the published StudioCanvasPreviewProps, which is a Clause-② question and is left out of this patch.
  • Preview fidelity bounds, inherited rather than introduced here:
    • The named view reaches the registered object-view renderer through listViews, the route the Studio's view preview already takes (the named-view member coverage of that route is the objectui#10885 family).
    • ObjectDataPage's field-level trimming and its removable filter chips are not reproduced.
    • A view held only as a saved sys_view row is not in the metadata cache's listViews, so such an entry previews the plain list.
    • A recordId entry previews the list, as before.
  • Ids. id is required on every nav item (SnakeCaseIdentifierSchema), so served nav carries one. An id-less entry in an unsaved draft buffer is compared by {type, name}, and the mirror writes no nav for it. No id is invented. The installed spec states ids are unique but enforces no uniqueness; two entries sharing an id would both highlight. This is not measured through a public door and is noted only.
  • The fourth {type, name} reader is leafKeyOf, the identity of the draft buffer, selection stamp and autosave target. It stays on {type, name} on purpose: two entries on one page edit the same page.
  • Untouched. The nav editor's save path is objectui#11776's. PackagesPage.tsx and metadata-admin/i18n.ts belong to the in-flight objectui#11784. The other pillars' ?surface= handlers are unedited. The shared hook now also clears a stray nav on their URLs, which is inert because no producer writes one there.

Implemented in session https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z (seat domain:ui#1).


Generated by Claude Code

claude added 4 commits October 7, 2026 20:10
…d and previews its slice or view

The Interfaces rail identified a nav entry by {type,name} alone, so entries
that open one object with different `filters` or `viewName` were one surface:
all highlighted at once, one unfiltered preview, and a reload landing on the
first. The resolved Surface now carries the entry's `id`, `filters` and
`viewName`; the rail and the deep-link restore compare by id when both sides
carry one; `?surface=` gains a `nav` key beside it; and the default object
canvas reads the entry the way the runtime's nav does (resolveHref, then the
landing route's own reading).

Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z
Co-authored-by: Claude <noreply@anthropic.com>
… and its preview

One object, five entries (the showcase shape): each click makes exactly that
row active and hands the default canvas that entry's slice or view; the
`?surface=` + `nav` link round-trips; a link with no entry id, or a stale
one, resolves as a `<type>:<name>` link did; distinct-object apps are the
control.

Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z
Co-authored-by: Claude <noreply@anthropic.com>
…ues, dependency-complete

The memo read `entry.filters` while keyed on its serialisation, which needed
an inline lint suppression the lint script does not honour
(`--no-inline-config`). It now reads the filters back from the key it is
keyed on.

Claude-Session: https://claude.ai/code/session_01DrKzdPdyLLBW3qpZ4vtk7z
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 336 chunks) 3519.5 KB 3551.8 KB
Main entry chunk (gzip) 157.0 KB 350 KB
Entry file index-D4iZegR-.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 17.82KB 6.58KB
app-shell (runtime-config.js) 22.59KB 7.89KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.11KB 7.97KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.50KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 579.68KB 139.46KB
core (index.js) 10.00KB 3.96KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 235.41KB 65.46KB
fields (index.js) 266.88KB 67.46KB
i18n (LocalizationContext.js) 2.92KB 1.42KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.52KB 2.39KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 38.37KB 10.31KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 41.50KB 11.82KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.86KB 5.00KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.52KB 2.26KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.04KB 3.92KB
plugin-calendar (index.js) 53.39KB 15.52KB
plugin-charts (index.js) 84.26KB 23.05KB
plugin-chatbot (index.js) 199.63KB 47.46KB
plugin-dashboard (index.js) 144.82KB 39.17KB
plugin-designer (index.js) 231.46KB 48.87KB
plugin-detail (index.js) 247.86KB 65.27KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 176.62KB 45.75KB
plugin-gantt (index.js) 179.17KB 45.07KB
plugin-grid (index.js) 239.75KB 65.92KB
plugin-kanban (index.js) 52.17KB 16.37KB
plugin-list (index.js) 116.85KB 29.12KB
plugin-map (index.js) 25.60KB 8.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.12KB 12.29KB
plugin-timeline (index.js) 39.10KB 11.81KB
plugin-tree (index.js) 15.07KB 5.33KB
plugin-view (index.js) 91.07KB 22.93KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 120.63KB 39.56KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.31KB 2.07KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.50KB 1.99KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 7.30KB 3.12KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 23.87KB 7.83KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (authoring-nodes.js) 0.20KB 0.19KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (cloud.js) 0.20KB 0.18KB
types (complex.js) 4.44KB 2.07KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (dashboard-widget-layout.js) 2.06KB 0.96KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 1.13KB 0.65KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 5.78KB 2.70KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (node-slots.js) 7.18KB 2.34KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.25KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 7, 2026 21:00
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 7, 2026 21:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 8273f4b Oct 7, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-11774-nav-surface-identity branch October 7, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants