Skip to content

Console flow labels read the approvals step-label key directly, without the locale chain (use resolveFlowApprovalStepLabel) #36633

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

From the contract review of PR #36620 (#35384), record 7092046163, nit N1. Not claimed. Related: #35384.

Suggested-grade: p2
Suggested-domain: domain:ui

What happens

ui/packages/i18n/src/flowLabels.ts reads the approval step label key (flows.<flow>.approvals.<node>.label) straight from one bundle, with no locale chain. So a console reader whose locale lacks the entry gets the raw label, while the server-side read (after PR #36620, through resolveFlowApprovalStepLabel) falls back along the chain.

Ask

Read the label through resolveFlowApprovalStepLabel (@objectstack/spec/system) with the same resolve options the console uses for other flow labels, so console and server answer the same text. Test: a locale missing the entry falls back the same way on both.

Re-check

git grep -n "approvals" ui/packages/i18n/src/flowLabels.ts shows the direct key read until fixed.

Activity

  1. added
    bug
    finding
    on Nov 23, 2026
  2. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (console flowLabels.ts) · pm:queue (#35384 is open); rationale: area:ux (i18n) · Bug · the console reads the approval step label without the locale chain, so after #35384 it can show a different label from the server for the same step (contract review nit N1 of PR #36620) → p2 as the seat suggested · size XS. Unclaimed: seat 2 is winding down. On request from repo:objectstack#2 (#32588 comment 7092089346).

  3. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 23, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB

    Claim: PM loop round 1 (area ux-D)
    Session: session_01WGufziH9MVhWYLVCiw5eXB
    Account: os-support-ai
    Branch: claude/issue-36633-flow-approval-label-chain
    Worktree: objectstack-issue-36633
    Domain: domain:ui
    Seat: repo:objectstack#3
    Area: ux-D
    File surface: ui/packages/i18n/src/flowLabels.ts and its tests, a changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate", effort: medium (small console-only card, one surface, no spec/protocol/ADR, not Tier H)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code in objectstack (ui/packages/i18n flowLabels.ts stepLabel reads flows.<flow>.approvals.<node>.label from bundle[language] only) | the spec's resolveFlowApprovalStepLabel (packages/spec/src/system/i18n-resolver.ts) already walks the locale chain, and the server reader (plugin-approvals reader-locale-labels.ts) uses it since PR #36620 | every console reader of a drawn flow (Studio flow designer, docs flow embed) whose locale lacks the approval step entry
    Thread-read: 7092105789
    Premise: holds — measured on origin/main 844218f: flowLabels.ts stepLabel answers text(flow?.approvals?.[node.id]?.label) with flow = bundle[language]?.flows?.[flowName], no locale chain; resolveFlowApprovalStepLabel(bundle, flowName, nodeId, literal?, opts?) exists and is exported from @objectstack/spec/system
    Pre-claim lane: ui/packages/i18n/src/flowLabels.ts is domain:ui, a repo:objectstack lane path; no other lane's path
    Pre-claim deps: no Blocked-by:; related #35384 closed and its PR #36620 merged; no open PR touches flowLabels.ts (open-PR file census at 00:52Z, 41 open PRs)
    Prior rulings read: console,flow,labels,read,approvals,step-label,directly,locale,chain,resolveflowapprovalsteplabel → 204 hits; ADR-0019 D4, ADR-0030 Decision §2, ADR-0055 Decision §3, ADR-0071 Decision §1, ADR-0076 D12, ADR-0077 Decision §1, ADR-0081 Decision §3 (term-generic, none rules on this read); thread: none; surface hit: flowLabels.ts:19 ruling 7076440876 (a titled screen's label is keyed under nodes.), not touched by this card; repo: objectstack-ai/objectstack
    Serial constraints cleared: none — no in-flight claim or open PR on ui/packages/i18n/src/flowLabels.ts

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  6. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB
    os-dev-report

    {
      "issue": 36633,
      "status": "done",
      "branch": "claude/issue-36633-flow-approval-label-chain",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36803",
      "session": "session_01WGufziH9MVhWYLVCiw5eXB",
      "premise_still_valid": true,
      "summary": "stepLabel for an approval node in ui/packages/i18n/src/flowLabels.ts now reads through resolveFlowApprovalStepLabel with the same options translateFlow gets for the flow label ({ locale: language }); a miss still answers undefined. Landing point flowLabels.ts as expected; no export or public type changed. Measured: the console holds no declared fallback chain here (activeFlowsBundle builds a single-locale bundle and documents no fallback chain), so console and server agree only under the same options; where the server declares a fallbackChain, a locale missing the entry can still differ. The only observable console change is locale-tag matching (zh-cn reaches a zh-CN row, as the flow label already did). Noted in Acceptance notes, not fixed: nodes./screens. reads still use exact bundle[language].",
      "tests": "head 3eb1f626: pnpm --dir ui exec vitest run packages/i18n/ -> Test Files 108 passed (108), Tests 2011 passed | 13 skipped; new file flowLabels-approval-chain-36633.test.ts 5/5. Ablation (src import, no build needed): flowLabels.ts restored from base 844218f5 (resolver hits 0, direct-read hits 1) -> 1 failed / 4 passed, the failing case is the locale-tag case; the fallback case is green before and after (no chain at this site). Restored via git checkout HEAD, git diff HEAD 0 bytes, blob hash matches HEAD.",
      "gates": "local, exit captured before pipe, all 0: check-adr-0087-registration --base origin/main; check-changeset-no-major; check-empty-changeset; check:nul-bytes; check:cross-package-test-inputs; check:test-source-alias; check:changeset-fixed (outside derivation). @object-ui/i18n type-check exit 0 (new test in tsconfig.test.json program, listFiles 1). dispatch-gates --ran: 32 of 38 derived families unrun locally, declared narrowing, CI's. PR check-runs: in_progress at report time. NOT MEASURED locally: app-shell FlowCanvas.test.tsx (import side, public surface byte-unchanged; failed to collect because @objectstack/lint is not built in this worktree, environmental).",
      "dogfood_battery": "n/a — no ! in the PR title and Clause-②: no without a (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — git push (branch); fleet-write pr_create (POST pulls + POST issues/36803/assignees); post-stamped comment on #36633",
      "open_questions": [],
      "security_findings": "withheld",
      "out_of_scope_findings": ["carrier: none · noted in PR Acceptance notes, not filed: console flow labels have no declared fallback chain (activeFlowsBundle single-locale by documented design) while the server reader passes fallbackChain/defaultLocale; and nodes./screens. step-label reads use exact-key bundle[language] while flowLabel/approval use locale-tag matching"],
      "files_changed": ["ui/packages/i18n/src/flowLabels.ts", "ui/packages/i18n/src/__tests__/flowLabels-approval-chain-36633.test.ts", ".changeset/36633-flow-approval-label-resolver.md"],
      "line_budget": "+104 / -8 across 3 files (dispatch-gates count)",
      "deviations": ["Read ui/AGENTS.md after the first edit to flowLabels.ts rather than before (root AGENTS.md was read first); no rule in it changed the edit.", "Local gate subset narrowed: 32 derived families left to CI (declared)."],
      "Dev-effort": "medium",
      "Rounds": 1
    }
  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB

    Close-out · 2026-11-24T01:51Z: delivered by PR #36803, merged as 0d6589d5 (Fixes #36633; L1 ACCEPT 7119060969, landing 7119079031). The console's approval step label now reads through resolveFlowApprovalStepLabel with the console's resolve options. pm:dispatched removed; area and domain stay. Follow-ups from the L1 record (console flow labels vs the server's declared fallback chain; the nodes./screens. exact-key reads) went to triage through the seat.

  8. removed
    pm:dispatched
    on Nov 24, 2026
  9. added a commit that references this issue on Dec 1, 2026
    0d6589d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uifindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions