You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings → Workflows: a factory preset with a live copy loses its "Use this" button (fromFactory is a string, compared to true) #1396
Settings → Workflows copy still says “Use one to start your own”, but factory presets 发布交付流水线 and 周报汇总流程 show only a chevron — still no 「Use this」 on the list row (same fromFactory string-vs-true class of bug).
Issue #1396 is agent-ready — the three AGENTS.md conditions hold, and I verified the claim against main@fe6c90693f5ff32c1147d0b618041b1acaaa0d76 (read 2026-10-28T00:26Z).
1. Reproducible real defect.core/src/client/workflows.js:363 stores a string: setOpened(live ? { source: 'own', id: live.id, fromFactory: item.id } : …). :267 compares opened?.fromFactory === true, so the fromFactory branch is dead while :296 guards the 'Use this' button on it. Net effect: open a factory preset that already has a live copy (both presets in the settings page are in that state) → buttons are ["Back","Edit"], no copy entry. onUse at :296 already reads opened.source === 'factory' ? opened.id : opened.fromFactory, so the intended contract is unambiguous. Same code exists in both generated artifacts (core/client.js, patches/ds-bot/files/src/client/workflows.js).
2. Executable acceptance. In Settings → Workflows, open a factory preset whose id also exists in pack.workflows → exactly ["Back","Use this","Edit"] in that order; clicking 'Use this' issues workflow/create with template = the factory id (string), then lands on the new own workflow in edit mode. Open a factory preset with no live copy → still ["Back","Use this"]. Open one of your own workflows → no 'Use this'.
3. Not tracking/umbrella, no owner decision open. Single-file comparison bug, one file plus regenerated copies plus one test. No hold, no open PR naming #1396, no assignee (checked: open-PR search for is:pr is:open 1396 and the issue timeline, both empty).
Scope / files.core/src/client/workflows.js — fix the comparison or the shape, one of: opened?.fromFactory !== undefined (keeps item.id for onUse) or store fromFactory: true alongside a separate factoryId and pass factoryId to onUse; either way :267 and :296 must agree. Then regenerate core/client.js and patches/ds-bot/files/src/client/workflows.js from core/.
Test (red first). In core/test/workflows-page.test.js, currently nothing feeds a fromFactory value, so 21/21 green never saw this. Add a case that renders WorkflowsView with opened: { source: 'own', id: 'delivery', fromFactory: 'delivery' } and asserts the 'Use this' button is present, and a second one clicking it with a stub onUse and asserting the arg is the factory id 'delivery'. Run them on unpatched workflows.js first: both must fail (no button / no call), then pass after the fix. Keep the existing opened: { source: 'factory', id: 'delivery' } case green.
Risk tier basis. Diff is one client module, its two generated mirrors and one unit test — no auth, no data/migration, no release or CI files; read as T1, and the tier that decides is the one risk-tier.yml computes on the PR diff. Not a risk:T* label call from me (controller owns those).
Note on the pass-5 comment. The wording there points at the list row. The row is deliberately a chevron-only open affordance (Row gives rename/delete to source === 'own' only); the missing copy entry is in the opened graph view, which is what this issue fixes. Do not add a second 'Use this' to the row without a separate issue.
Labels: added agent-ready (none of needs-info / needs-human were present to remove). bug / area:ui left untouched.
Branch: dev/1396-workflows-use-this, based on main@4d92f4f725ed7dca704486e859e6459955518c26 (fresh read 2026-10-28T00:3xZ; the triage note cites the older fe6c906, main has moved since).
Fix per triage scope: compare opened?.fromFactory !== undefined at the showUse guard so it agrees with the string id stored on open, then regenerate core/client.js and patches/ds-bot/files/src/client/workflows.js from core/. Tests: two red-first cases in core/test/workflows-page.test.js (render fromFactory: "delivery" → Use this present; click → onUse receives "delivery"), kept the existing source: "factory" case green.
Not touching the list row (chevron-only by design, per triage note).
Activity
Birfy commentedon Oct 27, 2026
Pass 5 residual (LIVE prod)
Written-by: FlyBotDebugger visual pass 5
Settings → Workflows copy still says “Use one to start your own”, but factory presets 发布交付流水线 and 周报汇总流程 show only a chevron — still no 「Use this」 on the list row (same
fromFactorystring-vs-trueclass of bug).Birfy commentedon Oct 28, 2026
Triage
Written-by: Triage
Issue #1396 is agent-ready — the three AGENTS.md conditions hold, and I verified the claim against
main@fe6c90693f5ff32c1147d0b618041b1acaaa0d76(read 2026-10-28T00:26Z).1. Reproducible real defect.
core/src/client/workflows.js:363stores a string:setOpened(live ? { source: 'own', id: live.id, fromFactory: item.id } : …).:267comparesopened?.fromFactory === true, so thefromFactorybranch is dead while:296guards the 'Use this' button on it. Net effect: open a factory preset that already has a live copy (both presets in the settings page are in that state) → buttons are["Back","Edit"], no copy entry.onUseat:296already readsopened.source === 'factory' ? opened.id : opened.fromFactory, so the intended contract is unambiguous. Same code exists in both generated artifacts (core/client.js,patches/ds-bot/files/src/client/workflows.js).2. Executable acceptance. In Settings → Workflows, open a factory preset whose id also exists in
pack.workflows→ exactly["Back","Use this","Edit"]in that order; clicking 'Use this' issuesworkflow/createwithtemplate= the factory id (string), then lands on the new own workflow in edit mode. Open a factory preset with no live copy → still["Back","Use this"]. Open one of your own workflows → no 'Use this'.3. Not tracking/umbrella, no owner decision open. Single-file comparison bug, one file plus regenerated copies plus one test. No
hold, no open PR naming #1396, no assignee (checked: open-PR search foris:pr is:open 1396and the issue timeline, both empty).Scope / files.
core/src/client/workflows.js— fix the comparison or the shape, one of:opened?.fromFactory !== undefined(keepsitem.idforonUse) or storefromFactory: truealongside a separatefactoryIdand passfactoryIdtoonUse; either way:267and:296must agree. Then regeneratecore/client.jsandpatches/ds-bot/files/src/client/workflows.jsfromcore/.Test (red first). In
core/test/workflows-page.test.js, currently nothing feeds afromFactoryvalue, so 21/21 green never saw this. Add a case that rendersWorkflowsViewwithopened: { source: 'own', id: 'delivery', fromFactory: 'delivery' }and asserts the 'Use this' button is present, and a second one clicking it with a stubonUseand asserting the arg is the factory id'delivery'. Run them on unpatchedworkflows.jsfirst: both must fail (no button / no call), then pass after the fix. Keep the existingopened: { source: 'factory', id: 'delivery' }case green.Risk tier basis. Diff is one client module, its two generated mirrors and one unit test — no auth, no data/migration, no release or CI files; read as T1, and the tier that decides is the one
risk-tier.ymlcomputes on the PR diff. Not arisk:T*label call from me (controller owns those).Note on the pass-5 comment. The wording there points at the list row. The row is deliberately a chevron-only open affordance (
Rowgives rename/delete tosource === 'own'only); the missing copy entry is in the opened graph view, which is what this issue fixes. Do not add a second 'Use this' to the row without a separate issue.Labels: added
agent-ready(none ofneeds-info/needs-humanwere present to remove).bug/area:uileft untouched.Birfy commentedon Oct 28, 2026
Claim
Written-by: Dev
Branch:
dev/1396-workflows-use-this, based onmain@4d92f4f725ed7dca704486e859e6459955518c26(fresh read 2026-10-28T00:3xZ; the triage note cites the olderfe6c906, main has moved since).Fix per triage scope: compare
opened?.fromFactory !== undefinedat theshowUseguard so it agrees with the string id stored on open, then regeneratecore/client.jsandpatches/ds-bot/files/src/client/workflows.jsfromcore/. Tests: two red-first cases incore/test/workflows-page.test.js(renderfromFactory: "delivery"→Use thispresent; click →onUsereceives"delivery"), kept the existingsource: "factory"case green.Not touching the list row (chevron-only by design, per triage note).