Skip to content

Doc metadata embed: a type: flow block's business view draws a flat list of steps with no branch and no condition, so a manual cannot point readers to the diagram for an approval threshold #36094

Description

@objectstack-fleet

repo:hotcrm#2 · os-mickey · session_01ASNY8XiE8ZJYbrmzFDtS9g

Found by the hotcrm lane on @objectstack 18.6.0 while verifying hotcrm#2706. Its acceptance asks that when an administrator changes an approval threshold in Studio, the manual's embedded diagram follows the change. The measurements are in the developer's report, hotcrm#2706 comment 7056602749. Filed on the maintainer's word of 2026-11-21 (「其他都同意」, agreeing to the seat's proposal to ask the platform for this).

What happens

  • The embed: hotcrm's sales manual embeds type: flow, name: opportunity_approval (ADR-0051, the default detail: business).
  • What it draws: the viewer's FlowView (ui/packages/components/src/renderers/basic/metadata-viewer.tsx) shows a numbered list of steps: Start, Sales Manager Review, High Value (> $500K)?, Sales Director Sign-off, …, End, then 已隐藏技术步骤:2.
  • What it leaves out: it draws no edge and no branch, and it does not show the decision's condition (amount > 500000) or the entry condition (amount >= 100000).
  • Where amounts do appear: only where an author typed them into a node label or the flow description. hotcrm#2706 removes those, because a typed amount goes stale when the threshold changes.

Why it matters

ADR-0051 embeds the live definition so a manual does not hand-copy machine facts. For an approval flow, the fact a reader needs is when it applies, which is the condition. Today the business view drops exactly that, so a manual cannot say "the threshold is shown in the diagram below". It has to name the flow and send the reader to Studio instead.

Asked

The business view of a type: flow embed shows each decision's branches and, beside the decision or its outgoing edges, the condition in a readable form, for example Amount > 500,000. The amount is formatted in the reader's locale and currency, where the expression is simple enough to render. A condition too complex to render may show a neutral "condition" marker rather than the raw expression.

Done when

  • Live: a manual that embeds opportunity_approval shows that a deal goes to director sign-off when the amount is over 500,000.
  • Follows the definition: after an administrator changes that condition in Studio, the same page shows the new amount, with no manual edit.

Dedupe: searched metadata embed flow business view condition, docs flow embed branch and metadata-viewer FlowView edges (objectstack, open). None covers it. A sibling card is #35979 (the same embed draws its labels untranslated).

Reader. objectstack triage routes it to the owning lane. Not a claim. hotcrm#2706 waits on it.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (doc metadata embed FlowView) · pm:queue; rationale: area:ux · Feature · a type: flow embed's business view draws a flat numbered list with no edges, branches or conditions, so a manual cannot show an approval threshold that follows Studio changes; found by the HotCRM lane on 18.6.0 (hotcrm#2706) → p2 (UX rule; shipped manuals) · size M.

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 21, 2026
  3. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1

    Claim: PM loop · area a4-D · 2026-11-22T03:29Z
    Session: session_01FEkQ5okniknzVVR3KTSVr1
    Account: os-project-manager
    Branch: claude/issue-36094-flow-embed-branches
    Worktree: objectstack-issue-36094
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-D
    File surface: ui/packages/components/src/renderers/basic/metadata-viewer.tsx (FlowView, business view), a helper module beside it for the readable condition, @object-ui/i18n viewer keys, tests, a changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: opus (default tier; seat order a4-D 2026-11-22T03:28Z, dispatch-gates --tier: no path-derived mandate on ui/**), effort: high (seat order)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the docs viewer's type: flow embed (ADR-0051) in objectstack ui/** | the business view draws each decision's branches and its condition in a readable, locale-formatted form, or a neutral marker when too complex | manual readers (hotcrm#2706 waits on it) who must learn when an approval applies without a hand-copied amount
    Thread-read: 7063581027
    Premise: holds — at origin/main a5a5312 FlowView (~384) renders nodes as a flat <ol> and reads no edge or condition.
    Pre-claim lane: repo:objectstack whole-repo lane, area:ux (seat 4 intake 2026-11-22T02:48Z); no open PR touches metadata-viewer.tsx.
    Pre-claim deps: none. Sibling #35979 (same FlowView, label translation) dispatched in parallel by a4-D on the seat's word; each keeps its change in its own helper, second lander merges main and keeps both.
    Prior rulings read: type,flow,metadata,embed,block,business,view,draws,flat,list,steps,branch (+7) → 346 hits; in the file: zero hit lines → no ruling. thread: none.
    Fold-or-serial: not folded with #35979 (different mechanism: graph and condition rendering vs label resolution); parallel with overlap-check before each push.
    Serial constraints cleared: none on this file surface at origin/main a5a5312

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1
    os-dev-report

    {
      "issue": 36094,
      "status": "done",
      "branch": "claude/issue-36094-flow-embed-branches",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36327",
      "session": "session_01FEkQ5okniknzVVR3KTSVr1",
      "premise_still_valid": true,
      "summary": "The business view of a type: flow metadata embed now lists each decision's branches: the condition read from the live definition (field label from the flow's object, amount in the reader's locale and the field's or tenant's currency, for example 'Amount > 500,000'), an arrow, and the target step. A branch taken when no other matches reads 'otherwise'. A condition outside the reader's grammar shows a neutral 'condition' marker, never raw CEL. The start node's condition is shown once above the steps; hotcrm's reads 'Runs when Amount ≥ 100,000 and other conditions'. The new pure module flow-branches.ts holds the graph and condition code. It reads both decision forms the engine runs and has a small fail-closed CEL reader that drops presence guards on the compared field. The two label reads that #35979 changes are untouched. One extra metadata request per embed, for the flow's object. The technical view is unchanged. Zone-2 readings: (1) through the spec's FlowSchema, edge and start conditions normalize to {dialect:'cel', source} and decision config.conditions[].expression stays a bare string; a live GET /meta/flow read was NOT MEASURED. (2) No CEL-to-text helper exists that components may import; app-shell's celToRows is off-limits, and @objectstack/formula's parseCelToAst is undeclared for components, so the smallest reader was written. (3) Label and currency come from useMetadataItem('object', start.config.objectName) plus resolveFieldCurrency. (4) The entry condition is in reach and shown once.",
      "tests": "At c3bc920762 (run without the lock, declared under deviations): 'pnpm --dir ui exec vitest run --maxWorkers=1 packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts packages/components/src/__tests__/metadata-viewer.test.tsx' gave 'Test Files 2 passed (2) / Tests 46 passed (46)'. At 29ee8356ea, under the lock, the same two files plus packages/i18n/ gave 'Test Files 107 passed (107) / Tests 2007 passed | 13 skipped', VERDICT command-exit 0. A first run at 12c5755c84 was red, 1 failed: the threshold pin caught the object request drawing conditions unread for one render. Fixed in 29ee8356ea and pinned deterministically in c3bc920762. type-check at c3bc920762: '@object-ui/components type-check' exit 0 and '@object-ui/i18n type-check' exit 0; --listFiles counts both test files (2) and the new module (1). Ablations, each through scripts/ablation-replace.mjs (anchor 1->0, blob moved, restored to the HEAD blob, git diff HEAD empty): reader leg (readComparison returns null) gave 3 failed | 11 passed (14); neutral-marker leg (raw source drawn) gave 1 failed | 13 passed (14); technical-view leg gave 1 failed | 13 passed (14); loading-gate leg (subject.loading guard deleted) gave 3 failed | 12 passed (15) at c3bc920762. The same mutation stayed 14/14 green at 29ee8356ea, before the deterministic pin existed. No rebuild was needed: the tests import the viewer by relative source path.",
      "gates": "Local subset from dispatch-gates --commands (41 families, the same list at 12c5755c84 and c3bc920762), each exit captured by redirect-then-$?. At c3bc920762: 39 exit 0. 'pnpm check:type-check-debt' exit 3 (its closure build never got the verify lock: NOT MEASURED); it was exit 0 at 12c5755c84. 'pnpm --dir ui exec vitest run scripts/' NOT MEASURED (lock queue-timeout, exit 99), left to CI. dispatch-gates --ran: '41 derived famil(ies) accounted for — 40 run, 1 NOT-MEASURED'; the 99 leg is recorded there as run, but it is NOT MEASURED. Outside the derived list: ui check-i18n-call-site-keys exit 0, check-i18n-dead-keys exit 0, check-i18n-en-drift exit 0, check-nul-bytes exit 0. overlap-check: VERDICT clean exit 0 three times. CI check-runs on PR #36327 at c3bc920762: none listed yet at report time (in_progress).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — POST repos/objectstack-ai/objectstack/dispatches (fleet-write relay pr_create, which opened #36327; read back 8061/8061 bytes identical); POST repos/objectstack-ai/objectstack/issues/36094/comments (this os-dev-report, via post-stamped.mjs). Plus 4 git pushes (not REST): the empty branch, then 12c5755c84, 29ee8356ea, c3bc920762.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed (PR Acceptance notes): useMetadataItem (@object-ui/react) keeps its previous state for one render when its name goes from null to a value: loading stays false and item stays null until the effect runs. A consumer that derives the name from an earlier request sees a spurious 'not loading, no item'. This PR avoids it by mounting the object request once the flow is known. Read once; whether other consumers hit it is not measured, and no public-door repro was taken, so it is not filed. Dedupe words: 'useMetadataItem name change stale state', 'useMetadataItem loading false first render'",
        "carrier: none · noted, not filed: the condition reader is a second, narrow CEL grammar in the UI. @objectstack/formula's parseCelToAst is the platform parser, but @object-ui/components does not declare that dependency, and adding it was outside the claimed file surface. Dedupe words: 'components parseCelToAst dependency', 'flow condition readable text parser'"
      ],
      "deviations": [
        "Component-level pins went into the component's existing shared harness, metadata-viewer.test.tsx, as a top-level describe, not into a new card-named file as Zone 3 suggested. AGENTS.md says a new pin for a component with a shared harness file goes into that file (ruling record 6583487846), and AGENTS.md outranks the order. The pure-helper pins are in the new card-named file flow-branches-36094.test.ts.",
        "The harness attribution reminder asked for a 'Co-Authored-By: Claude Opus …' trailer and a robot-emoji PR footer. The order and AGENTS.md require the model-free trailer pair and the session-URL footer, so those were used.",
        "The third push (c3bc920762) went out before its overlap-check. The check ran right after: VERDICT clean exit 0.",
        "After about 40 minutes with the verify-lock queue not moving (holder pid 10562, issue-35403 suites.sh, held over 4000s), the final green run, the loading-gate ablation leg and both type-checks ran WITHOUT the lock, narrowed to two test files with --maxWorkers=1. The earlier green run and three ablation legs ran under the lock.",
        "The li class in FlowView gained 'flex-wrap' in both views so a decision's branch list can wrap under its row. The technical view's content is unchanged, and so is its markup apart from that class."
      ],
      "files_changed": [
        ".changeset/36094-flow-embed-branches.md",
        "ui/packages/components/src/__tests__/metadata-viewer.test.tsx",
        "ui/packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts",
        "ui/packages/components/src/renderers/basic/flow-branches.ts",
        "ui/packages/components/src/renderers/basic/metadata-viewer.tsx",
        "ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts"
      ],
      "line_budget": "none declared for this card (size M); within the claimed file surface",
      "net_added_lines": "+937 / -4 = 933 net (16 files; the new module flow-branches.ts is 452, the tests are 254)",
      "contract_face": "none — no packages/spec, no server change, no published accept set; Clause-②: no, Metadata-protocol: none kept as dispatched"
    }
  6. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

    Handover to repo:objectstack#7 · 2026-11-22T06:46Z

    Release: handed over to repo:objectstack#7 by the maintainer's word (Leehom 2026-11-22T06:32Z 「后续任务通过信箱交接给座位7」, then 「其他交接给座位7,现在就开始交接」). Handover sheet: mailbox #36199 comment 7075457123 (stop point and what is owed for this card).
    Resume-from: claude/issue-36094-flow-embed-branches@c3bc9207628230732ff4d3fb0a60916fc8e3fd49

  7. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 22, 2026
  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ

    Claim: PM loop · area f7-shell · 2026-11-22T07:29Z · handed card, resumed from seat 4's Resume-from (handover sheet 7075457123)
    Session: session_01QsR2jV3scu6UYPb42n5okQ
    Account: zhuangjianguo
    Branch: claude/issue-36094-flow-embed-branches
    Worktree: objectstack-issue-36094
    Domain: domain:ui
    Seat: repo:objectstack#7
    Area: f7-shell
    File surface: unchanged from seat 4's claim 7073573540: ui/packages/components/src/renderers/basic/metadata-viewer.tsx (FlowView, business view), the helper module flow-branches.ts beside it, @object-ui/i18n viewer keys, tests, a changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: opus (default tier; dispatch-gates --tier at 2b57044: no path-derived mandate on ui/**), effort: high (M card)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the docs viewer's type: flow embed (ADR-0051) in objectstack ui/** | the business view draws each decision's branches and its condition readably, or a neutral marker | manual readers (hotcrm#2706 waits on it)
    Thread-read: 7075523702
    Premise: holds (seat 4's claim reading; dev report 7075269023 built it)
    Pre-claim lane: repo:objectstack whole-repo lane, area f7-shell (seat 7 lease, #35557).
    Pre-claim deps: none.
    Prior rulings read: seat 4's claim: zero hit lines in the file, no ruling; thread: none.
    Fold-or-serial: not folded with #35979 (different mechanism); overlap-check at main 2b57044: exit 1, conflicts only with #36335 (#35979, same FlowView file and test) in metadata-viewer.tsx and metadata-viewer.test.tsx. Second lander merges main and keeps both.
    Serial constraints cleared: #35979 / PR #36335 is parked behind #36316 by the seat's routing, so this PR goes first; #36335 merges main after it.
    Resume-from: claude/issue-36094-flow-embed-branches@c3bc9207628230732ff4d3fb0a60916fc8e3fd49

  9. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
  10. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ
    os-dev-report

    {
      "issue": 36094,
      "status": "done",
      "branch": "claude/issue-36094-flow-embed-branches",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36327",
      "head": "c8300e93a5a83184767664da7f45888b14710d05",
      "session": "session_01QsR2jV3scu6UYPb42n5okQ",
      "premise_still_valid": true,
      "summary": "Resumed seat 4's draft PR #36327 at c3bc920762 (worktree from the remote branch, no force-push, no second PR). The red Test UI (10/16) was this diff's: ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts flagged 'ConditionField — a NEW colliding name' (flow-branches.ts:348 against plugin-list conditionModel.ts:31). c8300e93a5 renames the reader's interface to FlowConditionField in flow-branches.ts, its test and FlowView's import (7 lines, no behaviour change); the two label reads #35979 changes are untouched. CI on c8300e93a5 is green (45 success, 13 skipped, 0 failed). The live GET /meta/flow read stays NOT MEASURED: the verify lock was contended throughout, and a server boot would have starved it.",
      "tests": "At c8300e93a5 under the lock: 'cd ui && pnpm exec vitest run --maxWorkers=2 scripts/__tests__/one-authority-per-exported-name-6273.test.ts packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts packages/components/src/__tests__/metadata-viewer.test.tsx' gave 'Test Files 3 passed (3) / Tests 57 passed (57)', VERDICT command-exit 0. Two earlier runs exited 1 with 'Failed to resolve import @objectstack/spec/system' and then '@objectstack/formula' (a fresh worktree with no dist), not a test verdict; fixed by building spec and then 'turbo run build --filter=@object-ui/components^... --concurrency=2' (48/48 tasks, VERDICT command-exit 0). The before reading is CI's red at c3bc920762 (job 137118968360, 'Tests 1 failed | 5032 passed'). No ablation: the rename changes no tested behaviour; seat 4's four ablations at c3bc920762 still stand.",
      "gates": "dispatch-gates --commands at c8300e93a5 (41 families), each exit captured by redirect-then-$?: 41 exit 0. That includes 'pnpm --dir ui exec vitest run --maxWorkers=2 scripts/' ('Test Files 172 passed | 2 skipped (174)', 'Tests 5122 passed | 2 skipped (5124)', VERDICT command-exit 0) and 'pnpm check:type-check-debt' exit 0, both NOT MEASURED at c3bc920762. Also 'pnpm --filter @object-ui/components run type-check' exit 0. --ran: '41 derived famil(ies) accounted for — 41 run, 0 NOT-MEASURED'. Outside the derived list: check-platform-checklist --changed-from origin/main exit 0 (0 anchored files). overlap-check: 'VERDICT overlap exit 1', conflicts only with #36335 (routed to land after this PR). dispatch-gates warned STALE TREE (43 commits behind origin/main, 6 scripts/pm files changed there); main not merged, since no conflict, main-caused red or queue kick asked for it. CI check-runs on c8300e93a5: 58 total, 45 success, 13 skipped, 0 failure; 'Test UI' success, 'Test UI (10/16)' success.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "1 — POST repos/objectstack-ai/objectstack/issues/36094/comments (this os-dev-report, via post-stamped.mjs). Plus 1 git push (not REST): c3bc920762..c8300e93a5.",
      "pr_body": "NOT WRITTEN by this agent (os-dev.md: subagents write a PR body only in pr_create, and the seat writes later edits). The PR body still describes c3bc920762, with seat 4's attribution lines. A corrected full body is at /tmp/claude-0/-home-claude/cabb5ee0-9a6e-5db5-a1f8-9c35ba6bb49d/scratchpad/issue-36094/body-new.md: the standing-frame attribution lines, a What-changes bullet for the rename, a readings block for c8300e93a5, an updated Verification section and the session footer. The seat posts it.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: seat 4's two notes stand unchanged (useMetadataItem's stale first render on a null-to-name change; the UI-side narrow CEL reader against @objectstack/formula's parseCelToAst). This run added nothing new."
      ],
      "deviations": [
        "Dispatch conflict: the standing frame routes 'any comment/label/body' through the relay and wants 'PR body true'. os-dev.md says a subagent writes a PR body only in pr_create, and the seat writes later edits; os-dev.md wins. So the body was not PATCHed, and the corrected text is handed over (pr_body field).",
        "Zone 3's live read of one embed against a running showcase or hotcrm flow was not done: the lock was contended throughout (two 9-minute queue-timeouts), and the PR body keeps the NOT MEASURED line."
      ],
      "files_changed": [
        "ui/packages/components/src/renderers/basic/flow-branches.ts",
        "ui/packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts",
        "ui/packages/components/src/renderers/basic/metadata-viewer.tsx"
      ]
    }
  11. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ

    Close-out · area f7-shell · 2026-11-22T15:06Z

  12. removed
    pm:dispatched
    on Nov 22, 2026
  13. added a commit that references this issue on Nov 23, 2026
    e605773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uipriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions