Repository navigation
fix(app-shell): packaged flow rows keep their height; the platform reason opens from a neutral chip (objectui#12609) - #12647
Conversation
…ason opens from a neutral chip (objectui#12609) The runtime's `reason` sentence for an enabled-but-unarmed flow rendered as a paragraph inside the Setup › Packaged automation table row, growing each such row to several lines. It now opens, verbatim and muted, from a popover behind a "Details" chip on the flow name's line. The chip's label and look follow only whether a reason was sent, never what it says: the contract renders the field and never parses it, so nothing here names a cause. One i18n key, `packagedAutomation.reasonDetails`, in all ten packs. Claude-Session: https://claude.ai/code/session_011K9g23W67dy2zwnyzaoB6o Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
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
Size Limits
|
Contract reviewServed-tier: Face: the ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT ·
|
Fixes #12609
Clause-②: yes
Setup › Packaged automation: a flow row that carries the runtime's
reasonsentence no longer grows to several lines. The sentence opens, verbatim and in full, from a neutral Details chip on the flow name's line. This is the card as triage narrowed it (comment 6210990723): target 3 only, the half that classifies nothing.What changed
packages/app-shell/src/views/setup/PackagedAutomationPage.tsxrow.reasoninside the flow cell is gone.ReasonDetails, draws a small outline chip (an Info icon and the word "Details") inline after the flow's label. The chip opens a popover that shows the sentence whole and muted, with no alert role.reason. That rule is the existing one injoinPackagedFlows, unchanged. The chip's label, icon and classes are the same on every row, and nothing reads, matches or compares the sentence.packages/i18n/src/locales/*.ts: one new key,packagedAutomation.reasonDetails, in all ten packs. Each pack uses the word it already uses for "Details" elsewhere..changeset/12609-packaged-flow-reason-chip.md: a patch for@object-ui/app-shelland@object-ui/i18n, with the Clause-② paragraph (one pack key added; no export or prop changes).Governing text
@objectstack/specFlowRuntimeState.reason, verbatim: "A free-form sentence, deliberately — the shape the two surfaces that already carry this reason use. Consumers RENDER it; ⛔ do not parse it." This PR adds no regex,includesor match on the reason, and the chip's wording names no cause.Tests
PackagedAutomationPage.test.tsx, section 6 (the platform reason for an unbound flow), reworked:pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/setup/PackagedAutomationPage.test.tsx: 15 passed (15).Ablation (each red proven, then restored)
Each mutation went through objectstack's
scripts/ablation-replace.mjsin wrap mode. The anchor must hit, and the tool checks on-disk counts and blob hashes. Restore is proven by blob == HEAD and an emptygit diff HEAD. The test imports the page fromsrc/, so no build sits between the mutation and the run.Mutation A's first attempt was refused by the tool before anything ran. Its replacement contained the anchor, so the anchor count could not drop. It was re-anchored and re-run, and the counts above come from the run whose mutation landed.
Local gates, all on
ad380ceobjectui is hand-derived from its own
package.jsonand.github/workflows/ci.yml. Each exit code was captured before any pipe. CI runs the full farm.pnpm exec turbo run build --filter='@object-ui/app-shell^...' --concurrency=2(upstream closure of app-shell, which contains i18n's): exit 0, 28 tasks successful (28)pnpm --filter @object-ui/i18n type-checkandpnpm --filter @object-ui/app-shell type-check: exit 0. app-shell'stsconfig.test.jsonincludessrc/**/*.test.tsx, so the test file is compiled.pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/setup/ packages/i18n/: exit 0, 88 files passed, 1387 tests passed, 13 skippedpnpm check:i18n-keys,check:i18n-drift(1 key added, 0 values changed),check:i18n-dead-keys(the new key is not listed): exit 0pnpm check:changeset-claims,pnpm changeset:check,node scripts/check-changeset-presence.mjs: exit 0pnpm check:test-path-roots,pnpm check:spec-symbols,pnpm check:new-line-citations(0 new): exit 0pnpm exec eslint --no-inline-configon the 12 changed.tsand.tsxfiles: exit 0, no outputAcceptance notes
enabledfield, so a flow that deployment policy keeps unarmed still reads On. Showing the effective state needs the structured discriminator that spec(automation):FlowRuntimeStategains a structured discriminator besidereason(deployment policy vs a binding failure), so a consumer can classify a disabled packaged flow without parsing the sentence (objectui#12609) objectstack#23842 adds, and this PR does not touch the switch.@objectstack/spec.OS_AUTOMATION_SCHEDULED_WORK_ENABLEDunset, so those rows carry the policy sentence;/apps/com.objectstack.setup/component/automation/packaged;leading-4text, a one-pixel border, no vertical padding). Rows without a reason were already two lines tall (the label above the machine name), in cells with the table primitive'sp-4padding. So the claim this PR makes is "a reason row is as tall as any other row", not a pixel figure; the screenshot reading above should take the figure.pnpm --filter @object-ui/app-shell test: the whole-package run is left to CI. Locally, the setup directory and the whole i18n package ran, as listed above.content/docs/describes how this page shows the reason, so no doc changed.main.Generated by Claude Code