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

fix(app-shell): FlowRunsPanel groups parallel-branch steps on branch, stacking the loop row (objectui#7614) - #10408

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-7614-flow-runs-branch-key
Sep 24, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-7614-flow-runs-branch-key

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #7614
Clause-②: no

What changes

@objectstack/spec 17.4.0 (the version this repo installs) declares ExecutionStepLog.branch beside iteration. Since objectstack#14414 (ruling A), iteration means one thing only: the row of the enclosing loop. The Studio flow Runs panel (FlowRunsPanel.tsx) still grouped parallel-branch steps on iteration.

  • The local step type gains branch?: number. The iteration comment now has one meaning: "Zero-based iteration of the enclosing loop, carried through any nesting."
  • parallel-branch steps group on branch, plus iteration when present. The grouping key is parallel-branch#branch=B#iteration=I. The header reads Branch 2, or Branch 2 · Iteration 3 inside a loop. The new designer string engine.flowRuns.branchNIterationM is added to the en and zh tables.
  • loop-body, try and catch still group on iteration exactly as before.
  • parallelBranchIndex and groupChildren are exported for tests, like buildStepTree and regionLabel already are.

The live defect this closes: against an engine that writes branch, every branch of a bare parallel got the same key (parallel-branch#). They merged into one unnumbered Branch header. Inside a loop, the header was numbered by the row, not the branch.

Premise check (made against origin/main 9b281519f)

  • The double-meaning comment and the ${regionKind}#${iteration} key are in the tree as the card describes.
  • Restart-when probe, run from packages/app-shell: 'branch' in ExecutionStepLogSchema.shape exits 0. The negative control (a key that does not exist) exits 1.
  • There is one consumer. A repo-wide grep for .iteration, regionKind and parallel-branch under apps/ and packages/ finds only this panel. apps/console's FlowRunsPage.tsx defines its own FlowRunsPanel function, and it reads neither key.
  • The panel does not import spec types. Its step type is hand-written, so I kept that pattern (Zone 2, point 2).

Legacy records: a deterministic rule, not "indistinguishable"

The rule: a parallel-branch step with no branch key comes from an engine that predates branch. Its iteration is read as the branch index. Its loop row is unknown, because the older engine discarded it. It is never read as a row and never defaulted to branch 0. The record alone decides this. No date or version guess is involved, and ExecutionLogSchema carries no engine-build field that could be used for one.

Evidence, read from objectstack at the time of writing. Nothing in this repo re-derives it, and the code comment says so.

  • Older engine. The parallel executor (parallel-node.ts at objectstack b07d829d64) tags each branch region { parentNodeId, iteration: i, regionKind: 'parallel-branch' }. Every parallel-branch step carries iteration, and none carries branch.
  • Current engine (objectstack#15230, 65ec530f8c). The executor tags { parentNodeId, branch: i, regionKind: 'parallel-branch' }. runRegion's tag() writes regionKind (inside the parentNodeId === undefined arm) and branch in the same pass. So the current engine cannot emit a parallel-branch step without branch.
  • Persistence keeps the key. steps_json is a whole-object JSON.stringify (serializeStepsBounded), so branch survives.
  • Caveat, stated in the code. The schema alone does not decide this. branch is .optional() and nothing ties it to regionKind, so the rule rests on the producer. The ADR-0087 entry execution-step-iteration-single-valued names this rule in its acceptance criteria: "treat its iteration under parallel-branch as the legacy branch index only when the record predates the engine build that writes branch."

For historical runs, the panel shows exactly what it showed before. Their iteration really was the branch index, so they keep Branch N.

Pins (FlowRunsPanel.test.ts, describe "parallel-branch grouping reads branch (objectui#7614)")

  • (a) A bare parallel with branch: 0, 0, 1 gives ['Branch 1:a1,a2', 'Branch 2:b1']. A step with branch: 1, iteration: 2 yields { branch: 1, iteration: 2, legacy: false } and the label Branch 2 · Iteration 3 (zh: 分支 2 · 第 3 次迭代). Same row with a different branch gives two groups; same branch with a different row also gives two groups.
  • (b) Control: loop-body groups on iteration, and a branch carried through nesting is ignored.
  • (c) Control: try/catch keep their handler labels and their iteration key.
  • (d) Legacy step { regionKind: 'parallel-branch', iteration: 2 } yields { branch: 2, legacy: true } and the label Branch 3. Legacy groups split by legacy index. A legacy step with no index at all stays unnumbered (Branch) and is not branch 0.
  • Render pin (FlowRunsPanel.render.test.tsx): a new-engine loop { parallel } run shows Iteration 1, Branch 1 · Iteration 1 and Branch 2 · Iteration 1 in the DOM.
  • Fixture triage. Two existing fixtures spelled the legacy shape (iteration under parallel-branch). They used it incidentally, so I respelled them to branch. The legacy shape now has its own pins, (d).

Ablation (proven on disk; ran at 782b57188, whose source is byte-identical to the head)

The mutation keys parallel-branch on iteration again: node ../objectstack/scripts/ablation-replace.mjs, WRAP mode with its restore trap, anchor x1 then x0, marker ABLATION-7614 x0 then x1, blob 9ef9458f1eee then c95d6fd8b7c1.

  • Red: 3 failed, 25 passed. Both (a) pins and the render pin failed. For example, expected [ 'Branch 1:a1,a2,b1' ] to deeply equal [ 'Branch 1:a1,a2', 'Branch 2:b1' ]. The (b), (c) and (d) pins stayed green.
  • Restore: blob after restore 9ef9458f1eee equals HEAD, and git diff HEAD is empty. An independent re-count found the marker 0 times and the anchor once.
  • The test imports ./FlowRunsPanel relatively, from source, so no dist/ leg applies.

Verification (head 875b3c221)

  • pnpm exec vitest run packages/app-shell/ --maxWorkers=2 from the repo root: Test Files 773 passed | 1 skipped (774); Tests 7627 passed | 9 skipped. This covers the dispatch's metadata-admin/ gate and every app-shell ratchet that reads sources as text. The skipped file is an existing skip/skipIf file, not one of mine.
  • pnpm --filter @object-ui/app-shell type-check (tsc --noEmit && tsc -p tsconfig.test.json): exit 0. The dependency closure was built first (turbo run build --filter=@object-ui/app-shell^..., 28/28). --listFilesOnly on the test project includes all three FlowRunsPanel files.
  • eslint, narrowed to the 4 touched .ts/.tsx files.
    • Population: pnpm lint runs per-package eslint ..
    • Count: --format json reports 4 files, 0 errors and 7 warnings. The base version of the file has 5 warnings; the +2 are react-refresh/only-export-components on the two new test-exposed exports, and lint.yml sets no --max-warnings.
    • Invariance: eslint.config.js has 0 type-aware hits (projectService, parserOptions.project, *TypeChecked), with the positive control react-refresh at 3 hits. No rule under eslint-rules/ reads the filesystem. So this diff cannot change the verdict on an untouched file.
  • Gates, all exit 0:
    • check:control-bytes, check:new-line-citations (0 new), check-changeset-presence, check-changeset-no-major, check-changeset-fixed, check-changeset-overwrite
    • check:i18n-designer-parity, check:i18n-keys, check:i18n-drift, check:spec-symbols, check-test-path-roots, check-vi-mock-{override-shape,inherit,specifiers}
    • check:handler-key-reads, check:unreferenced-sources, check:designer-field-key-parity, check:metadata-write-doors, check:phantom-deps, check-type-check-coverage, check-lint-coverage
  • check:changeset-claims (report-only) flags 3 pending changesets that name metadata-admin/i18n.ts: 6310-…, 7125-… and 8632-…. I re-read all three. They describe other keys (designer.field.formula, table.noRows / engine.form.noRows) and their own additions, and adding one engine.flowRuns.* row falsifies none of them.
  • check-governed-queue-guard --test on all 5 paths: NOT GOVERNED.
  • Changeset: minor on @object-ui/app-shell, because the displayed grouping changes.

Acceptance notes

  • The spec leaves the legacy discriminator to the producer: branch is optional, with no refinement against regionKind. That is a design observation, not a defect, and I did not file it.
  • The objectui gate families were derived by hand from package.json and .github/workflows/. objectui has no dispatch-gates.mjs.

Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC (domain:ui seat 1, dispatched os-dev).


Generated by Claude Code

…`, stacking the loop row

`ExecutionStepLog.iteration` is single-valued since objectstack#14414
(ruling A): the enclosing loop's row. The parallel branch index moved to
its own key, `branch`, which @objectstack/spec 17.4.0 declares.

- The local step type gains `branch?: number`; `iteration` gets one meaning.
- `parallel-branch` steps key and label on `branch`, plus `iteration`
  (the row) when present: "Branch 2 · Iteration 3".
- Legacy records (a `parallel-branch` step with no `branch`) are told apart
  by the record itself: the pre-objectstack#15230 engine never wrote
  `branch` and put the branch index in `iteration`; the current one
  always writes `branch` on a parallel-branch step. Their `iteration` is
  read as the branch index, never as a row, never defaulted to 0.
- `loop-body` / `try` / `catch` grouping is unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
…change (minor, app-shell)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 3 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6310-designer-formula-key-retired.md

  • names packages/app-shell/src/views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Not touched: designer.field.formula ('Formula (CEL)') in packages/app-shell/src/views/metadata-admin/i18n.ts, a different and live key belonging to metadata-admin's ObjectFieldInspector — the surface that still authors formula expressions.

.changeset/7125-dashboard-empty-state-keys-retired.md

  • names packages/app-shell/src/views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Not touched: table.noRows ('No rows to display') and engine.form.noRows (packages/app-shell/src/views/metadata-admin/i18n.ts, read at widgets.tsx) — two different, same-named keys in different namespaces. Nor the comments in WidgetEmptyState.tsx, DatasetWidget.tsx, ObjectDataTable.tsx and PivotTable.tsx that record WHY three widgets with three strings became one shared empty state; the packs' own comment keeps that rationale and now names the retirement instead of a row that is gone.

.changeset/8632-malformed-picklist-option-loud.md

  • names views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Two new strings land in the designer's own en / zh tables — the metadata-admin console owns its strings in views/metadata-admin/i18n.ts and is deliberately outside the ten locale packs (packages/i18n/README.md, "Scope — the engine.* carve-out").

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 961ceaa32 (merge-base with origin/main): 4 file(s) changed outside .changeset/, read against 1365 pending declaration(s) that publish a body (1939 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3043.5 KB 3104.5 KB
Main entry chunk (gzip) 148.4 KB 350 KB
Entry file index-CgDHD3_Q.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) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
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.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.52KB 3.45KB
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) 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) 542.47KB 129.64KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 224.12KB 62.26KB
fields (index.js) 254.86KB 64.50KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.28KB 11.09KB
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.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
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.01KB 3.93KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 72.54KB 20.26KB
plugin-chatbot (index.js) 198.27KB 47.18KB
plugin-dashboard (index.js) 133.45KB 35.33KB
plugin-designer (index.js) 216.12KB 44.37KB
plugin-detail (index.js) 260.94KB 67.93KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.34KB 37.47KB
plugin-gantt (index.js) 168.47KB 41.53KB
plugin-grid (index.js) 215.22KB 58.85KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 114.36KB 28.24KB
plugin-map (index.js) 22.05KB 7.14KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.72KB 8.96KB
plugin-tree (index.js) 10.74KB 3.76KB
plugin-view (index.js) 85.86KB 21.38KB
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) 114.58KB 37.60KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
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 (expression.js) 0.20KB 0.18KB
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.74KB 2.25KB
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 (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 (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
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 September 24, 2026 23:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 378a4f6 Sep 24, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-7614-flow-runs-branch-key branch September 24, 2026 23:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

1 participant