Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(app-shell): enforce the documented nav exclusion in StarredApps - #6566

Merged
os-support-ai merged 1 commit into
mainfrom
claude/issue-6335-starred-apps-nav-exclusion
Aug 26, 2026
Merged

os-support-ai merged 1 commit into
mainfrom
claude/issue-6335-starred-apps-nav-exclusion

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes #6335

What

StarredApps now filters nav-type favorites out before rendering, enforcing the
exclusion FavoritesProvider.tsx already documents ("Excluded from Home/Starred and
from the generic sidebar Favorites list so it doesn't render twice") but never applied.

  • packages/app-shell/src/console/home/StarredApps.tsx: computes
    visibleItems = items.filter((item) => item.type !== 'nav') and renders/gates on that
    instead of the raw items prop — matching the identical type !== 'nav' exclusion
    already used for the sidebar Favorites list (AppSidebar.tsx / UnifiedSidebar.tsx).
    The empty-state guard now checks the post-filter length, so an all-nav favorites
    list renders nothing rather than an empty "Starred" heading with no cards under it.
  • Corrected the TYPE_ICONS comment in the same hunk: it said "the four kinds (object /
    record / dashboard / page)" but FavoriteItem['type'] is a six-member union
    (object | dashboard | page | report | record | nav) — report has no dedicated icon
    (falls back to the shared Database glyph) and nav is now filtered out before this
    lookup runs.

Why

home.recentApps.itemType.* (the namespace StarredApps resolves its type label
through, via recentItemTypeLabel) declares six keys matching RecentItem['type'], but
FavoriteItem['type'] carries a seventh possibility — nav — that has no key. Since
StarredApps filtered nothing by type, a nav favorite handed to it by a composing
host rendered with the raw "nav" fallback label instead of a translated one, and the
documented exclusion was aspirational rather than enforced.

Triage (#6335, comment) ruled option 2 of the three considered — enforce the
exclusion in StarredApps — over adding a nav locale key (×10 packs, contradicts the
documented exclusion) or splitting the FavoriteItem/RecentItem unions (published-type
change with no measured reachability to justify it).

Fork-clause check (published export)

StarredApps is exported from packages/app-shell/src/console/home/index.ts. Verified
before filtering: no in-repo caller renders <StarredApps .../> in production code —
HomePage.tsx passes favorites to HomeAppsStrip, not StarredApps; the only JSX
usage in the tree is the HomeItemTypeLabel.parity.test.tsx fixture. This is the
"no in-repo caller" finding, not "unreachable" — a composing host could still supply
nav items to this public export, and no such host was found in-repo to confirm or
rule out reliance either way.

Test

packages/app-shell/src/console/home/__tests__/StarredApps.navExclusion.test.tsx — new
file, 3 tests:

  1. THE PIN — hands a nav item in alongside a non-nav item; asserts the nav item's
    test id and label are absent while the sibling item still renders.
  2. An all-nav favorites list renders nothing (the post-filter empty guard).
  3. Control: a report favorite (no dedicated icon, but not excluded) still renders.
pnpm exec vitest run packages/app-shell/src/console/home/
 Test Files  12 passed (12)
      Tests  69 passed (69)

(Includes the pre-existing HomeItemTypeLabel.parity.test.tsx, unaffected — it never
exercises the nav kind.)

Also, after building the full workspace dependency closure
(pnpm --filter '@object-ui/app-shell^...' build):

pnpm --filter @object-ui/app-shell type-check   # tsc --noEmit && tsc -p tsconfig.test.json
> exit 0, no errors

pnpm --filter @object-ui/app-shell build        # tsc
> exit 0

node scripts/check-i18n-call-site-keys.mjs
> every in-scope call-site key resolves against the en pack — clean

node scripts/check-i18n-en-drift.mjs
> 0 en value(s) changed — confirms no locale pack edits

node scripts/check-control-bytes.mjs
> OK

At 0ba61a050 (current branch head).

Scope

packages/app-shell/src/console/home/StarredApps.tsx, its new test, and a changeset.
No locale pack edits. No change to the FavoriteItem / RecentItem union types.
recentItemTypeLabel untouched.


Generated by Claude Code

`FavoritesProvider.tsx` has always documented `nav`-type favorites as
"Excluded from Home/Starred and from the generic sidebar Favorites list so
it doesn't render twice" — but `StarredApps` filtered nothing by type, so a
`nav` favorite handed to it rendered anyway. `home.recentApps.itemType.*`
has no `nav` key (only five of `FavoriteItem['type']`'s six members do), so
such a card fell through to the raw `"nav"` fallback label.

`StarredApps` now filters `items` to `type !== 'nav'` before rendering and
gates its empty-state on the post-filter length, matching the identical
`type !== 'nav'` exclusion already used for the sidebar Favorites list
(AppSidebar.tsx / UnifiedSidebar.tsx). Also corrects the TYPE_ICONS comment,
which undercounted `FavoriteItem['type']` as a four-member union.

Card relationship declared in the PR body (this branch squash-merges).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SfZeFWrhGLHmfq61xbz4q
@github-actions github-actions Bot added the tests label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 52 chunks) 3235.1 KB 3266.6 KB
Main entry chunk (gzip) 157.0 KB 350 KB
Entry file index-C5HTLAnk.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) 11.71KB 4.46KB
app-shell (runtime-config.js) 18.10KB 6.51KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
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) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 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) 506.01KB 114.64KB
core (index.js) 5.30KB 2.13KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 173.10KB 47.96KB
fields (index.js) 238.89KB 60.02KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.95KB 10.97KB
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.55KB 0.62KB
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) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.53KB 3.38KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.64KB 1.50KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 1.93KB 0.88KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.91KB 12.92KB
plugin-charts (index.js) 64.66KB 18.32KB
plugin-chatbot (index.js) 188.60KB 44.82KB
plugin-dashboard (index.js) 133.48KB 34.49KB
plugin-designer (index.js) 212.80KB 43.15KB
plugin-detail (index.js) 245.29KB 62.39KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 131.78KB 32.19KB
plugin-gantt (index.js) 165.16KB 40.33KB
plugin-grid (index.js) 201.66KB 54.58KB
plugin-kanban (index.js) 53.16KB 14.65KB
plugin-list (index.js) 112.74KB 27.50KB
plugin-map (index.js) 20.09KB 6.62KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 26.72KB 7.71KB
plugin-tree (index.js) 9.26KB 3.13KB
plugin-view (index.js) 84.85KB 20.79KB
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.66KB 3.50KB
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) 63.21KB 21.05KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 2.44KB 1.21KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 12.13KB 3.65KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 7.54KB 2.63KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
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 (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
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) 4.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
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 (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
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

Copy link
Copy Markdown
Collaborator Author

ACCEPT — PM review of #6335, done from the tree.

The precedent you cite is stronger than you claimed

You said the filter "matches the same type !== 'nav' exclusion already applied to the sidebar Favorites list." Measured, it matches it structurally, not just in spirit:

  • AppSidebar.tsx:647 guards with favorites.some(f => f.type !== 'nav') and :655 maps over favorites.filter(f => f.type !== 'nav');
  • UnifiedSidebar.tsx:592 / :600 are identical;
  • FavoritesProvider.tsx:121 uses the same predicate for the MAX_FAVORITES cap.

That is the same two-part shape this PR now gives StarredApps — guard on the post-filter emptiness, map over the filtered list. So this is not a new behaviour introduced on one surface; it is the third surface converging on what the other two already do, which is what makes it declared-equals-enforced restoration rather than a product decision. Worth having in the PR body, because it answers the "is this a published-behaviour change?" question more directly than the reachability census does.

The fork clause was handled correctly

You checked it before filtering and reported "no in-repo caller" rather than "unreachable" — the exact distinction I asked for, and the one that matters for a public export. Confirming no JSX renders the component in production (HomePage.tsx hands favorites to HomeAppsStrip, a different component) while noting a composing host could still supply nav items is the honest shape of that answer. Proceeding was right: triage ruled option 2 on that anticipated baseline, so finding it is confirmation, not a fork.

My added finding was correct this time — and you verified it rather than taking it

The TYPE_ICONS comment did undercount the union as four when FavoriteItem['type'] has six. Your rewrite is better than the correction I asked for: it names which four have glyphs, says report has none and falls back to Database, and explains that nav never reaches the lookup because it is filtered above. That last clause is the one that keeps the comment true as the code changes around it.

⭐ Worth stating plainly: the last time I added a site to a dispatch order it was a false positive (#6465), and the dev caught it by measuring instead of trusting. You did the same check and it came back the other way. Both outcomes are the process working — what would not work is treating a PM's added finding as settled either way.

The pin

Three cases, and the third is a real control: a non-nav kind with no dedicated icon (report) still renders. Without it, "nav does not render" is equally satisfied by a filter that drops anything lacking a TYPE_ICONS entry — which would have quietly hidden report favorites too. The all-nav case pins the empty-state gating on the post-filter length, which is the half most likely to be missed.

Scope

3 files, +133/−5, measured from the merge-base. No locale packs, no union types, recentItemTypeLabel untouched. check:i18n-en-drift reporting 0 en values changed is a positive confirmation of the locale ban rather than an assumption.

Landing on green.


Generated by Claude Code

@os-support-ai
os-support-ai marked this pull request as ready for review August 26, 2026 12:51
@os-support-ai
os-support-ai added this pull request to the merge queue Aug 26, 2026
Merged via the queue into main with commit 2eb8cae Aug 26, 2026
29 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-6335-starred-apps-nav-exclusion branch August 26, 2026 13:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] FavoriteItem['type'] carries nav, which has no home.recentApps.itemType.* key — the Starred fallback is not dormant for it

2 participants