Skip to content

fix(approvals): render the step progress bar as a vertical stepper in both occurrences - #5570

Merged
os-sales merged 1 commit into
mainfrom
claude/issue-5554-approvals-step-progress-overflow
Aug 21, 2026
Merged

fix(approvals): render the step progress bar as a vertical stepper in both occurrences#5570
os-sales merged 1 commit into
mainfrom
claude/issue-5554-approvals-step-progress-overflow

Conversation

@os-sales

Copy link
Copy Markdown
Collaborator

Fixes#5554

What was wrong

Both occurrences laid the approval step strip out as a single non-wrapping flex row whose steps were each shrink-0. A flex row's min-content width is the sum of its non-shrinkable items, so the strip's intrinsic width grew without bound with step count x label length. On a live 17.1.0 project a real 6-step flow with ordinary CJK step names measured 1070px inside a 527px container.

The two hosts failed differently, and neither failure was recoverable by the reader:

scrollerwhat the reader had to do
ApprovalsInboxPage (inbox drawer)none on the strip; nearest was the drawer paneldrag the drawer's own scrollbar, which pushed the record card, activity timeline and action buttons off-screen and left a near-blank panel
RecordApprovalsPanel (record page)overflow-x-auto on the stripscroll the strip — better, but the tail steps still sat behind a gesture with no visible affordance

In both, readers took the clipped strip for the end of the data; the reporting customer acceptance tester said so verbatim. Widening the window does not help — the drawer is fixed-width, and clipping was identical at 1440x900 and 1920x1000.

The fix, and why always vertical

Both now render as a column: one row per step, a badge-and-rail gutter, a wrapping label. Width is capped by the container at every step count and every label length, which also suits both hosts' tall-and-narrow aspect ratio.

The card left the layout choice open between always-vertical and vertical-past-a-threshold. Always vertical, with no step-count and no measured-width threshold, because:

  • The overflow is driven by intrinsic content width, not by count. Three 16-character CJK labels already crowd a 527px drawer, so any count threshold picks a cutoff that is wrong for some real flow — the guard is flow_steps.length > 1, and label length is unbounded and unowned by us.
  • A measured threshold reintroduces exactly the failure class the card rules out: a branch whose behaviour depends on a width nobody tested, plus a ResizeObserver/layout-effect that no unit test in this repo can exercise.
  • A layout with no breakpoint and no measurement is viewport-invariant by construction, which is strictly stronger than passing at two sampled viewports.

Horizontal-with-scroll was rejected for both occurrences per the card: it leaves steps behind a gesture.

The rail segment below each step keeps the tint rule the horizontal connector used — it is coloured by the step it leads into — so the "how far has this flow got" reading is unchanged.

Verification

pnpm exec vitest run from the repo root (per AGENTS.md; never --filter, never paths after --).

"The stepper renders" is green against the broken code, so that is not what is asserted — and this was measured, not assumed. A throwaway presence-only probe (finds the stepper by its accessible name, finds all six labels) run against the reverted RecordApprovalsPanel passed 1/1. The committed suites, run against the same reverted components, failed 8/8.

The suites assert the property the defect names — no element may pin intrinsic width and none may be a horizontal scroller:

  • the container stacks (flex-col), and each step owns a row (listitem);
  • no row is shrink-0 — the class that made min-content width the sum of every step;
  • every label is min-w-0 (a flex item defaults to min-width:auto = min-content, which is how a long label pushes a row past its container) and none is whitespace-nowrap;
  • nothing in the subtree is an overflow-x-auto/-scroll scroller;
  • no axis, overflow or width-pinning class carries a breakpoint prefix, so there is no viewport with untested behaviour.

Regimes exercised. The reported failing regime directly — 6 steps, the reporter's own CJK labels verbatim (they are the regime: 8-16 CJK characters is an ordinary business step name and roughly double the width of the same character count in English, so English fixtures would quietly leave the failing regime). Plus the guard boundary (2 steps) and well past the report (12). A 2/5/6/12 sweep pins that the root and row layout classes are byte-identical across all four, so no count threshold can put some other flow length back on the old path.

Viewports. No browser is available in this container (chromium is not installed), so there is no real-layout measurement here and none is claimed. Instead of sampling widths, the suites pin the fact that makes sampling unnecessary: the stepper carries no breakpoint-prefixed axis/overflow/width class and no measurement, so its layout is the same at every viewport by construction.

Gates run — all against cc07ae9af, this PR's head

gateverdict line
targeted vitest (new suites)Test Files 2 passed (2) / Tests 8 passed (8)
regression vitest — the whole apps/console project plus every approvals-surface suite in app-shell and plugin-detailTest Files 71 passed (71) / Tests 772 passed (772)
turbo run type-check (@object-ui/console, @object-ui/app-shell, incl. tsconfig.test.json)Tasks: 37 successful, 37 total
pnpm lintfull farm, uncachedTasks: 47 successful, 47 total · Cached: 0 cached, 47 total · 0 errors repo-wide
pnpm check:control-bytesOK (scanned 4626 tracked text file(s); skipped 85 binary)
check-changeset-presence.mjs4 source file(s) of 2 released package(s) changed, and this change declares 1 changeset(s)
check-changeset-no-major.mjsNo changeset declares a major bump.
check-changeset-fixed.mjsAll workspace packages are in the changeset fixed group.
pnpm check:i18n-keysEvery in-scope call-site key resolves against the en pack (2918 keys)
pnpm check:i18n-driftNo en value changed in this range.
pnpm check:i18n-dead-keysexit 0 (report, not a gate)
pnpm check:skills-pathsOK (95/96 stated path(s) resolve across 18 guide file(s); 1 baselined)
pnpm check:doc-typesEvery documented component type is registered.
pnpm check:doc-snippetsEvery covered documentation snippet compiles against the built types.

Exit codes were captured before any pipe (cmd > log 2>&1; EXIT=$?), and each row quotes the gate's own verdict line rather than $?.

check:doc-snippets first refused to run with @object-ui/cli declares types at packages/cli/dist/index.d.ts and it is not on disk — an unbuilt-workspace precondition, unrelated to this diff. Building that one package turned it green; recorded so the red is not mistaken for a finding.

No new i18n keys: both steppers keep the existing approvalsInbox.stepProgress call site, which is already present in all ten locale packs.

Not run locally, left to CI: Test shards 1-4/4 (the console project and the entire approvals surface were run; the rest of the farm is CI's), Build & E2E (@object-ui/app-shell:build did run and pass, as a turbo dependency of type-check), and Bundle Analysis. This is a declared narrowing, not a skip.

Scope

Exactly the declared file surface — the two components, their tests, and a changeset. No breach.

packages/app-shell/src/hooks/useRecordApprovals.ts was read (it owns the flow_steps type) and not modified; the fix needs no data-shape change.

The two steppers are kept identical by hand rather than extracted to a shared component: they live in different packages and deduplicating them is a refactor with its own surface, outside this fence. Filed separately as #5569.


Generated by Claude Code

…bjectui#5554)
Both the Approvals Inbox drawer and the record page's approvals panel laid the
flow step strip out as a single non-wrapping flex row of `shrink-0` steps, so
its min-content width was the sum of every step and grew without bound with
step count and label length. A real 6-step flow with ordinary CJK step names
measured 1070px inside a 527px container on a live 17.1.0 project: the drawer's
bar was not scrollable at all (only the drawer panel was, so reaching steps 4-6
pushed the rest of the drawer off-screen), and the record panel's scrolled
itself but still parked the tail steps behind a gesture with no affordance.
Both now stack: one row per step, a badge-and-rail gutter, a wrapping label.
Width is capped by the container at every step count and label length. Always
vertical, with no count or measured-width threshold — the overflow is driven by
intrinsic content width, so any threshold picks a cutoff that is wrong for some
real flow and a measured one reintroduces a viewport-dependent branch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012u2pRjcqAYtoEjgr3wwhnK
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

MetricValueBudget
Eager closure (gzip, 52 chunks)3784.8 KB3867.2 KB
Main entry chunk (gzip)151.2 KB350 KB
Entry fileindex-D4u4tOjb.js
StatusPASS

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

PackageSizeGzipped
app-shell (index.js)10.04KB3.72KB
app-shell (runtime-config.js)8.91KB2.99KB
app-shell (types.js)0.01KB0.04KB
app-shell (urlParams.js)10.06KB3.86KB
auth (AuthContext.js)0.31KB0.24KB
auth (AuthGuard.js)1.17KB0.53KB
auth (AuthProvider.js)29.34KB7.05KB
auth (AuthShell.js)3.49KB1.40KB
auth (ForgotPasswordForm.js)12.21KB3.45KB
auth (LoginForm.js)18.15KB5.39KB
auth (PreviewBanner.js)0.90KB0.50KB
auth (RegisterForm.js)6.65KB2.22KB
auth (SocialSignInButtons.js)9.61KB3.89KB
auth (UserMenu.js)3.41KB1.23KB
auth (auth-gate-events.js)1.29KB0.66KB
auth (authStyles.js)5.04KB1.72KB
auth (createAuthClient.js)40.21KB10.80KB
auth (createAuthenticatedFetch.js)6.35KB2.43KB
auth (index.js)2.77KB1.22KB
auth (invitation-status.js)1.22KB0.70KB
auth (org-roles.js)6.66KB2.78KB
auth (phone-identifier.js)1.11KB0.66KB
auth (types.js)0.59KB0.35KB
auth (useAuth.js)5.02KB0.89KB
auth (useIsWorkspaceAdmin.js)3.04KB1.45KB
collaboration (CommentThread.js)26.08KB7.56KB
collaboration (LiveCursors.js)3.17KB1.27KB
collaboration (PresenceAvatars.js)6.49KB2.64KB
collaboration (PresenceProvider.js)2.79KB1.13KB
collaboration (index.js)1.68KB0.73KB
collaboration (useCollaborationTranslation.js)6.05KB2.52KB
collaboration (useCommentSearch.js)1.98KB0.88KB
collaboration (useConflictResolution.js)7.75KB1.86KB
collaboration (useMentionNotifications.js)1.81KB0.68KB
collaboration (usePresence.js)6.33KB1.84KB
collaboration (useRealtimeSubscription.js)7.91KB2.01KB
components (index.js)506.94KB113.63KB
core (index.js)4.51KB1.80KB
create-plugin (index.js)10.08KB3.26KB
data-objectstack (index.js)159.80KB44.33KB
fields (index.js)237.61KB59.63KB
i18n (LocalizationContext.js)1.76KB0.96KB
i18n (currency.js)1.22KB0.64KB
i18n (i18n.js)4.28KB1.75KB
i18n (index.js)3.44KB1.39KB
i18n (pickLocalized.js)7.22KB3.08KB
i18n (provider.js)23.13KB7.63KB
i18n (useDisplayLocale.js)2.85KB1.45KB
i18n (useObjectLabel.js)30.51KB7.57KB
i18n (useSafeTranslation.js)7.77KB3.13KB
layout (index.js)38.95KB10.97KB
mobile (MobileProvider.js)0.92KB0.49KB
mobile (ResponsiveContainer.js)0.94KB0.38KB
mobile (breakpoints.js)1.51KB0.70KB
mobile (createOfflineDataSource.js)5.61KB1.75KB
mobile (index.js)1.55KB0.62KB
mobile (offlineQueue.js)3.91KB1.35KB
mobile (pwa.js)0.97KB0.49KB
mobile (serviceWorker.js)1.48KB0.62KB
mobile (serviceWorkerSource.js)3.41KB1.48KB
mobile (useBreakpoint.js)1.54KB0.65KB
mobile (useGesture.js)6.96KB1.98KB
mobile (useOfflineSync.js)1.99KB0.72KB
mobile (usePullToRefresh.js)2.53KB0.85KB
mobile (useResponsive.js)0.72KB0.42KB
mobile (useResponsiveConfig.js)1.37KB0.63KB
mobile (useSpecGesture.js)4.32KB1.64KB
mobile (useTouchTarget.js)1.01KB0.54KB
permissions (MePermissionsProvider.js)9.35KB3.31KB
permissions (PermissionContext.js)0.31KB0.25KB
permissions (PermissionGuard.js)0.89KB0.45KB
permissions (PermissionProvider.js)4.42KB1.42KB
permissions (evaluator.js)5.12KB1.74KB
permissions (index.js)0.93KB0.41KB
permissions (store.js)0.91KB0.42KB
permissions (useFieldPermissions.js)1.28KB0.53KB
permissions (usePermissions.js)1.81KB0.83KB
plugin-ai (index.js)15.75KB3.80KB
plugin-calendar (index.js)46.62KB12.83KB
plugin-charts (index.js)64.72KB18.35KB
plugin-chatbot (index.js)181.21KB43.14KB
plugin-dashboard (index.js)128.51KB32.96KB
plugin-designer (index.js)212.39KB42.83KB
plugin-detail (index.js)242.15KB60.89KB
plugin-editor (index.js)2.46KB1.10KB
plugin-form (index.js)125.07KB30.43KB
plugin-gantt (index.js)164.10KB39.87KB
plugin-grid (index.js)200.79KB54.26KB
plugin-kanban (index.js)52.93KB14.60KB
plugin-list (index.js)111.70KB27.17KB
plugin-map (index.js)20.06KB6.62KB
plugin-markdown (index.js)13.72KB4.69KB
plugin-report (index.js)43.49KB11.93KB
plugin-timeline (index.js)26.68KB7.66KB
plugin-tree (index.js)8.50KB2.88KB
plugin-view (index.js)84.52KB20.67KB
providers (DataSourceProvider.js)0.75KB0.39KB
providers (MetadataProvider.js)1.37KB0.59KB
providers (ThemeProvider.js)1.90KB0.85KB
providers (UploadProvider.js)11.66KB3.50KB
providers (index.js)0.45KB0.23KB
providers (types.js)0.01KB0.04KB
react-runtime (index.js)5.62KB2.34KB
react (LazyPluginLoader.js)3.77KB1.33KB
react (SchemaRenderer.js)43.66KB14.77KB
react (data-invalidation.js)5.05KB2.08KB
react (index.js)1.33KB0.69KB
react (schema-input.js)1.45KB0.83KB
react (spec-input.js)0.20KB0.18KB
sdui-parser (codegen.js)5.41KB2.34KB
sdui-parser (index.js)4.77KB2.16KB
sdui-parser (input-type.js)2.84KB1.40KB
sdui-parser (parse.js)10.76KB3.17KB
sdui-parser (provenance.js)3.66KB1.82KB
sdui-parser (types.js)0.29KB0.24KB
sdui-parser (validate.js)6.92KB2.40KB
types (ai.js)0.20KB0.17KB
types (api-types.js)0.20KB0.18KB
types (app.js)2.87KB0.99KB
types (base.js)0.20KB0.18KB
types (blocks.js)0.20KB0.18KB
types (complex.js)0.20KB0.18KB
types (crud.js)0.20KB0.18KB
types (dashboard-filter-alias.js)6.23KB2.74KB
types (data-display.js)0.20KB0.18KB
types (data-protocol.js)0.20KB0.19KB
types (data.js)0.20KB0.18KB
types (designer.js)1.87KB0.85KB
types (disclosure.js)0.20KB0.18KB
types (error-code.js)1.54KB0.88KB
types (feedback.js)0.20KB0.18KB
types (field-types.js)0.20KB0.18KB
types (form.js)0.20KB0.18KB
types (http-retry.js)4.32KB2.02KB
types (index.js)3.08KB1.53KB
types (layout.js)0.20KB0.18KB
types (managed-by.js)0.19KB0.18KB
types (mobile.js)2.59KB1.31KB
types (navigation.js)0.20KB0.18KB
types (objectql.js)0.20KB0.18KB
types (overlay.js)0.20KB0.18KB
types (permissions.js)0.20KB0.18KB
types (plugin-scope.js)0.20KB0.18KB
types (record-components.js)0.20KB0.19KB
types (record-semantics.js)1.28KB0.67KB
types (registry.js)0.20KB0.18KB
types (reports.js)0.20KB0.18KB
types (spec-report.js)5.05KB1.93KB
types (system-fields.js)3.33KB1.54KB
types (theme.js)0.20KB0.18KB
types (ui-action.js)3.40KB1.71KB
types (views.js)0.20KB0.18KB
types (widget.js)0.20KB0.18KB

Size Limits

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants

@os-sales@claude