diff --git a/AGENTS.md b/AGENTS.md index 1aa15b2..be6b800 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,33 @@ Keep durable pending messages across service restarts. Never resend a message whose delivery is uncertain automatically. Never launch a second agent for an existing session. Keep source and runtime data separate. Append changes to LOG.md. +## Execution and blockers + +For user-authorized work, proceed with implementation and verification. Review +findings are work to resolve, not a requirement to obtain another permission +or review-stage grant. Do not stop after a fixed number of correction rounds. +Do not wait for PM permission, a draft requirement status, a design hash verdict, +or an unchanged status report before doing independently executable work. + +When a check is demonstrably wrong, document the source-backed contradiction +and correct the check as a separate change without another permission wait. +Preserve the behavior being verified; do not weaken assertions, delete failing +checks or convert failures to passes merely to accept an implementation. +Rerun affected checks, including lint, after a relevant correction; fixed +per-session run limits do not prevent verification. Avoid unchanged reruns. + +A failed check blocks only the steps that depend on its result. Record the +failure and continue independent checks. Preserve the aggregate failure until +it is resolved; never relabel unrun checks as passed. Serialize heavy builds +when an actual competing job is running, without an idle reservation or a +separate permission gate. Use source-bound verification evidence. + +Communicate handoffs directly to the assigned next agent in the delivery chain. +Do not broadcast, fan out status messages, or revive a superseded blocker from +a delayed message. Missing recipients and uncertain delivery are explicit +routing states, not reasons to stop unrelated work. User approval requirements +for external or irreversible actions and unresolved approval holds still apply. + ## Changelog Default: every change a user of the bridge can observe (a command, a tool, an diff --git a/CHANGELOG.md b/CHANGELOG.md index 83bddc8..d820259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ User-facing changes to session-bridge. Newest first. Each version lists ## Unreleased +### Changes + +- Configure project delivery workflows with editable SVG blocks and persisted + issue playbooks. Independent checks keep moving after a failure; handoffs go + only to the assigned agent, with revision-bound evidence and restart recovery. + Automatic recovery notices identify the bridge as their author, not the user. + ### Fixes - Starting a session on macOS no longer brings Terminal or iTerm2 to the diff --git a/LOG.md b/LOG.md new file mode 100644 index 0000000..1965964 --- /dev/null +++ b/LOG.md @@ -0,0 +1,133 @@ +# Working log + +## 2026-11-30 - Issue: #119; Release: #121 + +Implemented declarative project workflows and persistent version-bound issue playbooks +in the existing Workflow/IssueStore owners. Added SVG editing, transactional evidence, +admin recovery and exact-target durable pipeline handoffs. Removed procedural +permission/round-count blockers so authorized independent delivery can continue. +Preserved approval holds, stale-attempt rejection and uncertain-send protection. + +Verified affected issues (81), domain (13), workflow service/property (4), phone/MCP +filters, frontend (23), formatting, Clippy and real CDP project save/restart isolation +(9 checks). Counts across filters overlap. See docs/design/119-verification.md for +commands, failure corrections, graph reach and runtime boundaries. No installation +or release publication performed. + +### CI correction - Issue: #119; Release: #121 + +macOS CI run 46431916822 failed the repository register import check (495 passed, +1 failed): REQ-059 was wrapped across lines instead of the established one-line +register format. Joined the entry without changing its words or the judging test. +Original job log retained in .wingbox/ci-macos-141893619095.log. Follow-up CI +verification pending; prior local passes do not imply CI acceptance. + +### UI CI correction - Issue: #119; Release: #121 + +Original UI CI had 79 passes, 2 failures and 11 skips. The new playbook event +list reused .issue-history before the actual lifecycle history. Gave it its own +.playbook__history class while retaining styling; existing QA assertions unchanged. +Direct CDP renderIssueDialog reproduction failed before (created/moved false, two +matches) and passed after (both true, one match). Node syntax and diff checks pass. +Rebuilt embedded UI verification remains with the replacement CI run. + +### State-filter CI correction - Issue: #119; Release: #121 + +CI b36929a passed Windows tests but exposed a macOS issue API regression: +state=["nowhere"] returned an empty page instead of the existing error. Restored +validation against the current workflow and each persisted pinned workflow, including +the no-store case. Existing tests unchanged. cargo test --test issues with one test +thread passed all 7, including the exact failing scenario; original CI failure retained +in .wingbox/ci-macos-b36929a.log. No unrelated source changed. + +All-target locked Clippy with warnings denied passed after the state-filter fix. +The rebuilt UI CI job on b36929a completed SUCCESS, confirming the history fix. + +### Ended-sender handoff - Issue: #119; Release: #121 + +Review found the durable dispatcher incorrectly required its original sender to +remain live. Resolve that sender from the bridge's existing private sessions.json +registry while preserving local parent identity and exact project checks. The target +must still be live, assigned to the same pinned generation, and permitted by the +existing role/independence checks; normal Send validation remains authoritative. + +Added a deterministic service regression: persist the intent while stopped, end the +sender, restart with the target live, require one receipt with original sender and +exact target, then restart again and require the same message ID. Old source timed +out as expected (.wingbox/119-sender-before-corrected.log). Corrected fixture omission +and private socket-directory setup separately; no production permission relaxation. +Full workflow suite passed 5/5 (.wingbox/119-sender-final.log), including the new case. +All-target locked Clippy with warnings denied passed after this correction. + +### Admin recovery handoff - Issue: #119; Release: #121 + +Review found queue_ready returned early for authenticated admin operations. Record +that origin as the existing internal user actor and dispatch through direct UserSend, +which derives the actual bridge user identity. No peer impersonation, channel or +broadcast fallback. Source/config/generation, exact target, hold and uncertain-send +checks remain unchanged. Update the wire description to state the user-origin path. + +New real-service admin_release_hold_notifies_assigned_agent_once failed before the +fix with a missing-notice timeout. Afterward workflow6/6 and delivery-store6/6 pass; +the test makes no agent mutation after release, requires exactly one user-origin +receipt to the assigned peer, and checks the same message ID after restart. The +existing scenario separately asserts the new user resumption intent and its original +peer successor intent. Initial wrong store-test filter selected zero and is not proof. +Logs: .wingbox/119-admin-before.log, 119-admin-after.log, 119-admin-store-final.log. +All-target locked Clippy with warnings denied and formatting passed after the fix. + +### Isolated generation regression - Issue: #119; Release: #121 + +Added a pure retry case that keeps source revision, configuration and target +unchanged, uses current aggregate CAS for both claims, and changes only generation +between the rejected stale claim and accepted current claim. This closes the review +gap where changing source and generation together could mask a missing generation +comparison. Production code unchanged; verification recorded after execution. +Focused delivery suite passed 14/14, including the generation-only case +(.wingbox/119-generation-only.log). Both claims use current CAS; changing only the +generation field changes refusal to acceptance. No source mutation was used. +All-target locked Clippy with warnings denied and formatting also passed. + +### Returning recipient reconciliation - Issue: #119; Release: #120 + +Reviewer found unresolved intents were never revisited when an assigned peer returned. +The regular drain now reconciles unresolved rows against the current roster. Store +resolution is transactional, checks the original source/configuration/generation and +step readiness, preserves sender identity, and queues only the affected step. Stale +intents become superseded; uncertain/dispatching rows remain protected across generations. + +The new real-service test failed before with a missing-successor timeout, then the +full workflow suite passed 7/7 after the fix. It restores the same registered peer +without an issue/playbook mutation, verifies one exact-target receipt, unchanged +execution state and no duplicate after restart. Added store regressions for stale +versions, repeated resolution and uncertain/dispatching suppression. Logs retained +under .wingbox/119-unresolved-before.log and 119-unresolved-after.log. +Delivery-store tests passed 8/8; all-target locked Clippy with warnings denied and +formatting passed. Refreshed Wingbox single-threaded after checks; saved reconcile +reach and test-module analysis in .wingbox/119-unresolved-reach.txt and +119-unresolved-test-analysis.txt. No runtime schema or public DTO changes. + + +## Issue #119 / Release #120: distinguish generated notification origin + +The actual native inbox regression first failed because an automatic admin-action +handoff rendered the UserSend header and user reply address. Original runtime +failure: /tmp/sb-119-origin-before/test.log (cargo exit 101, 0 passed, 1 failed). +The prior test's user-origin expectation was incorrect: the user authorized the +playbook action, but did not author the generated text. Its assertion is corrected +separately from the retained fail-first envelope evidence. + +A private daemon event now enqueues a project-scoped bridge identity. No public +request variant was added. Native rendering marks machine input explicitly; +public send cannot impersonate that identity or address it. Genuine user messages +retain their existing attribution. Existing handoff version/target checks and +uncertain-delivery behavior are unchanged. Receipt sender metadata survives restart. + +Pre-edit Wingbox outputs: /tmp/119-origin-preedit-impact.txt, +/tmp/119-machine-origin-impact.json and /tmp/119-origin-agent-boundaries.txt. +Post-edit graph is stale; exact source checks supplement it. Verification: workflow integration 7 passed; transport 5, domain 6 and discovery +20 unit tests passed; messaging 5, peer-auth 1, issues 7 and requirements 11 +service tests passed. cargo fmt --all --check, locked all-target workspace Clippy +with -D warnings, and git diff --check passed. Evidence and coverage limits are +retained in .wingbox/119-machine-origin/. Windows CI and full independent review +remain separate from these local results. diff --git a/README.md b/README.md index b721c6e..5b7cbcd 100644 --- a/README.md +++ b/README.md @@ -532,6 +532,36 @@ moved issue gets one `workflow` entry in its history. `show_issue` and the board list the moves an issue can make (`moves`, with what each needs), and `list_issues` lists the open states by default. +Project cards open **Configure workflow**. Select a stage or arrow in the SVG +editor to edit its properties; the tables provide the same controls by keyboard. +Add delivery checks to a stage, choose owner/reviewer/QA owner, and name any +prerequisites in that stage. Save creates a project override; **Use default** +previews the built-in workflow before an explicit save. + +Each issue snapshots its configured delivery plan. `show_issue` includes its +playbook version, source revision, ready steps, audit events and handoff states. +Use `update_issue` with a `playbook` operation and `expected_version` to bind a +revision, start a ready check, report its result or record a blocker. Start +carries the exact assigned session id, configuration version, source revision +and generation; completion also carries the returned attempt version. Read the +current issue after a conflict. A transport receipt never completes a check. +Independent checks remain ready when another branch fails. + +Only the admin page releases approval holds, interrupts abandoned attempts, +skips optional checks or adopts the selected configuration. Revision changes +and adoption invalidate old evidence while preserving unresolved approval holds +and history. Required checks guard forward moves and release. Configured issues +keep their pinned workflow; incompatible state-removal mappings refuse until +explicit adoption. Legacy empty plans keep the existing workflow-save behavior. + +Playbooks live in the project's `issues.db`. Readable derived exports are in +`/issues//playbook.json` and `events.jsonl`; they are never +imported as authority. An export failure is shown on the issue and a later read +regenerates it. Pipeline handoffs are durable direct messages to the exact +assigned next agent, never broadcasts. Missing targets are visible as unresolved +handoffs. A send with uncertain delivery requires inspection and is not resent +automatically. + A release is an issue of kind `release` with a version (`create_issue` with `kind: "release"` and `version`, or on the admin page's Issues tab), created and moved only by a release manager: a session acting as diff --git a/docs/design/119-acceptance.md b/docs/design/119-acceptance.md new file mode 100644 index 0000000..ff1f7c4 --- /dev/null +++ b/docs/design/119-acceptance.md @@ -0,0 +1,65 @@ +Issue #119 acceptance scenarios +============================== + +REQ-059. These cases exercise the bridge boundary and persisted state, not +merely the shape of the reducer's output. + +1. Project isolation. Open projects A and B without configuration. Both show + today's default. On A's configuration page, add a stage and guarded edge, + save and reload. A retains the override; B and a new C retain the default. +2. Dependency progress. Configure three implementation checks: unit, lint, and + acceptance (depends on unit). Fail unit with product evidence. lint remains + ready; acceptance cannot start. Passing lint does not make the issue pass. +3. Environment failure. Start unit then report an environment blocker before + assertions. Preserve the attempt and error. lint can run. A retry explicitly + starts a new attempt and cannot manufacture a PASS from the failed attempt. +4. Approval hold. Block unit for approval. Owner changes source revision. + unit remains held, start/complete/retry refuse, lint remains available. + Restart the daemon and repeat. Only an admin release with the current + version and note clears the hold, once; an identical stale request refuses. +5. Adoption. Change configuration while an issue has passing evidence and a + held step. Old evidence remains attached to its old configuration/revision. + Explicit admin adoption invalidates results and preserves the hold. A plan + omitting that held step is refused until explicit release, with no writes. +6. Concurrent workers. Two callers read playbook version N and attempt to + claim the same step. Exactly one commits; the other gets a conflict. A + different caller cannot complete the first caller's running attempt. +7. Restart. Start a step, restart the daemon, and read it. It is still running + with the same actor/revision; no process or command is launched or resent. + Explicit recovery records the interrupted attempt before retrying. +8. Stage guard. Try an ordinary forward issue move with required checks + incomplete. It refuses naming those checks. A declared rejection/fix or + cancellation remains available. Required skipped checks do not count as + PASS. Existing role, owner, WIP and evidence guards still apply. +9. Release guard. Freeze a release with an issue whose required check failed. + Attempt publication: release and all linked issues remain unchanged. Pass + all required checks on the exact revision and retry through normal guards. +10. Exports. Verify playbook.json and events.jsonl agree with the authoritative + database version. Remove/corrupt exports and regenerate. Force export I/O + failure after a committed mutation: return a visible warning and committed + version; no duplicated event. No export is loaded as authority. +11. SVG editor. Select a block by pointer and keyboard, edit its properties, + connect two stages, edit a guard, remove a connection, save, reload. Errors + name the invalid block/edge; markup in labels renders as text. Saved SVG + contains the current diagram. Config JSON and diagram stay equivalent. +12. Boundary refusals. Session/phone/control requests cannot save policy, + adopt a plan or release approval. Another project's session cannot update + the issue. Unknown fields, wrong types, cycles and unknown dependencies + refuse without writes. Actor/project/time come from trusted context. +13. Direct handoff. Complete developer step and verify exactly one message to + its assigned reviewer, none to project peers or a channel. The message + names issue/step/configuration/source/generation. A wrong or stale recipient + cannot claim. Missing target is a routing blocker, never a broadcast. +14. Handoff recovery. Crash before dispatch: the pending intent survives and + can dispatch once. Crash/lost reply after dispatching: mark uncertain and + never resend automatically. Delivered receipt alone leaves the step ready, + not passed. An independent addressed branch still progresses. +15. Late result. Actor starts A, admin interrupts it, then the same actor starts + B. Completing A with fresh aggregate CAS still refuses its old attempt token; + B remains running. A result from an old source revision also refuses. +16. Mixed snapshots. Old issue has an open active stage absent from the new + project workflow. It still participates in publication and WIP checks by + its snapshot. One failed linked guard leaves the whole publication intact. +17. Acceptance destination. Required steps with no release marker refuse + configuration validation. Empty and optional-only plans still support the + existing no-release workflow and explicit cancellation remains available. diff --git a/docs/design/119-declarative-delivery.md b/docs/design/119-declarative-delivery.md new file mode 100644 index 0000000..defa93f --- /dev/null +++ b/docs/design/119-declarative-delivery.md @@ -0,0 +1,156 @@ +Declarative delivery and issue playbooks +====================================== + +Issue: #119. Release: #121 (legacy #105). Requirement: REQ-059. +Base: github/main 593056e674ae1f99c887ba1bbc57ffb2498f12da. +Status: implemented under the user's instruction to fix and remove procedural blockers. +Normative payloads and lifecycle: [wire contract](119-wire-contract.md). +Behavioral scenarios: [acceptance](119-acceptance.md). + +Problem and scope +----------------- + +A failed check currently stops independent work through coordinator messages. +The issue board cannot reconstruct executable next steps or evidence provenance. +The bridge owns a declarative delivery plan and persistent execution state so +readiness follows dependencies, rather than a PM's temporary grant. + +The user's latest decision is authoritative: each project can override its +workflow on its project configuration page; today's workflow is the default. +This replaces #94's shared-only direction for this feature. #94's migration is +not a prerequisite. This change does not implement #85's automatic session +creation/closure or #34's arbitrary command execution. Agents run work and report +results; existing user approval boundaries remain. + +Boundaries +---------- + +System: the local Session Bridge and existing native sessions. +Container: the daemon owns project stores; the browser and MCP are adapters. +Component: workflow and playbook validation/reducers are pure Rust. IssueStore +owns atomic persistence; daemon adapters derive caller identity and project. +Code: src/workflow.rs remains the FSM owner. New delivery modules own step +configuration and execution, with no I/O in their domain functions. + +Contract +-------- + +The existing workflow JSON gains optional delivery configuration. Omission uses +an empty step plan and preserves current workflow behavior. A configured plan +contains steps with id, label, state, roles, depends_on, required, and +independent_of_owner, and assignee. State ids refer to the owning workflow. Step ids are +unique; dependencies are acyclic and reference existing steps within the same state; +inter-stage ordering belongs to the FSM. Every required step state must dominate +the release state: removing that state makes release unreachable from start. +A required plan must have a release marker. Configurations permitting shortcuts around required stages are refused. At most 100 steps, bounded text +and dependency lists. Unknown fields and invalid configurations are refused. + +Each issue has a playbook stored transactionally with its issue history. +New issues snapshot the selected configuration; migration initializes existing +issues without inventing PASS. The existing workflow engine evaluates snapshots. +Detail/board/move paths use the issue snapshot, not the latest project workflow. +Configured playbooks retain their snapshots when the project workflow changes. +A project save that maps away a configured issue's current stage refuses; move +it to a common state and explicitly adopt the selected configuration first. +Legacy empty plans retain existing workflow-save/remap behavior. Adoption is +bound to the playbook and selected configuration versions. An issue's +configuration snapshot and workflow version are pinned when initialized; +configuration edits affect new playbooks, not completed evidence. An explicit +user migration is required to adopt a new plan for an existing issue. Migration +records the old/new version and invalidates execution evidence; it never silently +reuses a PASS. Adoption is admin-user-only. An adoption that removes a step with +an unresolved approval hold is refused atomically; the user must release the +hold explicitly before removing that step. The issue row remains the sole authority for SDLC state. + +Playbook fields: configuration_version, configuration snapshot, source_revision, +version, steps and events. Step states: pending, running, passed, failed, +blocked, skipped. Ready is computed from the issue stage, prerequisites and +current results. Blocker kinds: product, environment, approval, scheduling, +release_order. Failed/blocked steps only block their descendants. Required steps +must pass before leaving their stage along an acceptance transition. Rejection +requires a declared not_pass guard; cancellation is a reason-guarded move to a +non-release final state. Caller-supplied not_pass alone cannot bypass checks. +The common move predicate checks all required steps on entry to the release +state, for ordinary moves and release publication. Publication checks only +linked issues it actually advances; cancelled nonparticipants remain excluded +and are never counted as PASS. Bulk publication and active-owner/WIP guards +resolve every issue using its own snapshot in the same transaction; no old +active stage disappears because the current project workflow lacks it. + +The existing show_issue response adds playbook, including ready steps and +missing transition requirements. update_issue accepts an optional playbook +operation, mutually exclusive with ordinary field edits: set_revision, start, +complete, block, retry. Operations carry expected_version. Completion includes +step, attempt_version, source_revision, result and evidence; both the running +attempt token and aggregate version must match. Role/owner checks use the live caller. Identity, +project, timestamp and role are never accepted from an agent's payload. +Evidence is bound to source_revision. A revision change resets all execution +results and requires a note, but preserves every unresolved approval hold. +Approval holds are persisted separately from execution results: source changes, +plan adoption, retries, stage changes and restart cannot clear them. set_revision +is allowed for the issue owner or admin user; it refuses while work is running +unless the admin user explicitly interrupts it, preserving the prior attempt. +Running steps survive restart and are not retried +automatically; an explicit retry records the interrupted/failed attempt. +Approval-blocked steps can only be resumed by the user on the admin page. +Agent messages and PASS reports never constitute approval. The authenticated +admin-only release_hold operation requires expected_version, step and note, +clears exactly that hold, and appends exactly one event. A repeated stale release +is refused. Independent steps remain eligible while that hold exists. + +Persistence and export +---------------------- + +Use the existing IssueStore migration mechanism; no live database editing. +Playbook updates, issue version/history and append-only delivery events commit +in one transaction. Stale versions refuse without writes. Project identity and +private permissions come from project_store::project_dir. + +Readable derived exports live at /issues//playbook.json +and events.jsonl. They are generated from committed state and replaced +atomically per file, carrying a common version. They are never imported or read +as live state. An export failure is surfaced as an export warning after a +successful database commit; it does not invite blindly replaying the operation. +Reads/restart can regenerate exports. The database remains recoverable even if +exports are missing or corrupt. + +Project configuration UI +------------------------ + +The Projects page opens the selected project's workflow configuration. Current +workflow is the default; saving creates a project override. The SVG editor uses +Camunda-style blocks, selectable transition arrows and a property panel. Users +add/remove stages and connections and edit roles, guards and delivery steps. +Diagram and JSON represent the same configuration. Keyboard controls accompany +pointer interactions; labels are text nodes, not markup. Save is explicit and +version-checked. BPMN import/export and an external BPMN engine are out of scope. + +Verification +------------ + +Pure tests: validation, cycle detection, dependency readiness, all step +transitions, role/independence checks, revision invalidation, stale updates. +Explicit bypass regression: block for approval, change revision as owner, try +start/complete/retry and confirm the hold persists; adopt a plan retaining the +step and confirm the hold persists; reject removal of its held step. Only the +admin release_hold permits progress. Repeat after restart while verifying an +independent branch can still run. +Store tests: migration, restart persistence, rollback, append-only history, +per-project isolation, explicit adoption and export recovery. +Adapter tests: derived caller/project, user-only configuration and approval +resume, existing tool compatibility, ordinary and release move guards. +Browser: edit a project-specific SVG workflow, save/reload, verify another +project stays unchanged; keyboard selection and visible validation errors. +Regression: reproduce independent check progress after one product/environment +failure, without converting the aggregate result to PASS. +Run affected tests only, cargo fmt --check and one final workspace Clippy. + +Pipeline messaging +------------------ + +Pipeline work follows the declared successor chain with direct, single-recipient +peer messages only. The wire contract defines exact target resolution, durable +handoff intent, stale-generation checks and uncertainty handling. The existing +message queue remains the transport owner; no broadcast fallback is introduced. +Only independent branches explicitly present in the plan can progress in +parallel, each with its own target. Message delivery never completes a step. diff --git a/docs/design/119-verification.md b/docs/design/119-verification.md new file mode 100644 index 0000000..db8494e --- /dev/null +++ b/docs/design/119-verification.md @@ -0,0 +1,85 @@ +# Issue: #119 - verification + +Release: #121. REQ-059. Base: 593056e674ae1f99c887ba1bbc57ffb2498f12da. + +Implemented project workflow overrides, SVG editing, version-pinned issue playbooks, +transactional evidence and targeted durable handoffs. Existing Workflow and IssueStore +remain the authorities. Removed procedural permission and fixed-round stop gates; +actual approval holds, identity checks and uncertain-delivery protection remain. + +## Executed checks + +Cargo commands used CARGO_BUILD_JOBS=1 and CARGO_TARGET_DIR=target-delivery. + +| Check | Result | Local evidence | +| --- | --- | --- | +| cargo test --lib issues:: -- --test-threads=1 | 81 passed | .wingbox/delivery-issues-final.log | +| Compiled library delivery:: tests | 13 passed | .wingbox/delivery-domain-final.log | +| Workflow, phone allowlists, MCP schema filters | 15, 17, 3, 1 passed; overlapping filters, not additive | .wingbox/delivery-other-unit.log | +| outbox_is_atomic_single_target_and_recovers_uncertain_without_resend | 1 passed after cross-generation regression added | .wingbox/delivery-outbox-final.log | +| cargo test --test workflow -- --test-threads=1 | 4 passed, real local service plus 64-case property check | .wingbox/delivery-workflow-final.log | +| cargo clippy --workspace -- -D warnings | passed | .wingbox/delivery-clippy-verified.log | +| cargo fmt --all -- --check; git diff --check | passed | final terminal output | +| Frontend Bun tests | 23 passed, 85 assertions | workflow UI agent evidence | +| node --check for admin.js and workflow.js | passed | terminal output | +| Real daemon and headless Chrome through CDP | 9 checks passed, no browser exceptions | /private/tmp/sb119-live-ui-xCLW6x/report.json | + +Browser checks cover actual SVG save, reload persistence, project isolation, sidebar +version and daemon restart persistence. Report SHA256: +59a8c9194eb35bf5f6b65a9f4e2269998affd3297e8256dce9a870cedb649ae4. +Synthetic-only screenshot: /private/tmp/sb119-live-ui-xCLW6x/workflow.png; +SHA256 6041a6fcc53c377bb3da3dcfb917b2a35887a3304a8239f2ad8cc415e56d0e9b. +Verified binary SHA256: +d618260018460f070937632286819392d0949a77dcd09155c93683c161c37143. + +Initial failures retained in .wingbox logs: checked SQL timestamp conversions; +private-directory test setup; historical migration fixture setup; empty-plan legacy +error precedence; expected MCP schema expansion; and large Reply enum size. Fixes +preserve assertions and compatibility. The schema snapshot changed only the intended +update_issue payload. Boxing the playbook fixed enum size without a lint suppression. + +## Graph and test reach + +Before edits, Wingbox impact queried workflow, IssueStore, projections, adapters, +phone allowlists, protocol and frontend owners. New files used their existing owner +boundary. Saved raw maps: delivery-impact-before.json, delivery-impact-extra-before.json, +delivery-dispatch-impact-before.json, delivery-adapters-before.json, +delivery-workflow-test-before.json, delivery-phone-tests-before.json, +delivery-schema-impact-before.json, store-delivery-impact-before.json, +store-delivery-tests-impact-before.json and store-delivery-projections-impact-before.json +under .wingbox. These accompany the local handoff, not the product. + +| Changed owner/files | Named dependents | Verification | +| --- | --- | --- | +| workflow.rs, delivery.rs, delivery/operations.rs, delivery/validation.rs | store, release, working, board, fields, rows, view, daemon, protocol | pure delivery tests, workflow tests, issues suite, workflow service test | +| issues/store.rs, store_delivery.rs | assignment, release, working, daemon and store/workflow tests | delivery_store_tests, issues suite, real restart test | +| issues/board.rs, release.rs, working.rs, view.rs | daemon issue lists, release and working projections | issues suite and mixed-version store cases | +| protocol.rs, mcp/issues.rs, daemon.rs, daemon/issues.rs, daemon/delivery.rs | MCP, control/admin dispatch, phone boundary | schema snapshot, allowlist tests, real service targeted handoff and refusal checks | +| admin.rs, admin/admin.js, admin/workflow.js, admin/index.html, admin/admin.css | admin page; workflow helper tests | Bun tests, syntax checks, real CDP flow | +| lib.rs | library consumers and integration tests | Cargo checks and workflow integration | + +Final commands: WINGBOX_JOBS=1 wingbox build .; wingbox diff_functions 593056e; +wingbox usages src/delivery/operations.rs::apply; +wingbox analyze src/issues/delivery_store_tests. Additional saved usages/analyze outputs +cover domain, store, service and UI tests. Queries used WINGBOX_AUTO_REFRESH=0. +The graph shows apply called by actual domain tests and store, and test modules import +production owners. It does not prove every dynamic JSON dispatch or DOM edge; real +service/browser checks supplement that limitation. HTML/CSS are not indexed. During +stale-graph intervals, named source reads and literal searches confirmed the answers. +No claim of complete static per-function coverage is made. + +MCP issue group: five existing tools retained; distinct jobs, consistent naming and +3-15 count each satisfied. Lifecycle retains show/update/move operations; recovery is +admin-only. No new broad tool or broadcast route. Full server tool inventory was not +re-audited. + +Modern Web Guidance informed explicit Save and labeled native forms: "DON'T trigger +validation errors ... on every keystroke." Existing page stack retained. + +## Limits + +Local source and isolated runtime verified. No installed daemon replacement, native +authenticated Codex turn, release publication or production migration performed. +Other Codex runtime issues were prioritized to root, not claimed fixed here. Existing +empty-plan workflow remapping is preserved; configured plans require explicit adoption. +Uncertain or dispatching handoffs never automatically resend across generations. diff --git a/docs/design/119-wire-contract.md b/docs/design/119-wire-contract.md new file mode 100644 index 0000000..c849d49 --- /dev/null +++ b/docs/design/119-wire-contract.md @@ -0,0 +1,226 @@ +Issue #119 wire and lifecycle contract +===================================== + +REQ-059. Implemented wire and lifecycle contract for issue #119 / release #121. + +Existing workflow JSON +---------------------- + +Add `delivery` (default `[]`) to `Workflow` alongside states/transitions. Each +step is `{id,label,state,roles,depends_on,required,independent_of_owner,assignee}`. +Steps belong only to open, non-release, non-final states, so a required check +can run before release entry. Ids use the existing StateId syntax. Defaults: roles/dependencies empty, +required true, independent_of_owner false. A step is execution within its +state; dependencies must be within the same state. Across-stage ordering is +already expressed by FSM transitions. This keeps readiness acyclic without +inventing an ordering for a cyclic FSM. Limits: 100 steps, 100 dependencies +per step, labels 1..100 characters, roles use current workflow role limits. + +Default selection is the existing default_workflow. Saving a project's +workflow through user_save_workflow creates/updates its override. A page +"Use default" action saves the current built-in definition explicitly using +the existing optimistic workflow version and removed-state mapping. It does +not edit any other project or invalidate an issue's existing evidence. + +Issue tools +----------- + +`show_issue(number)` adds `playbook` with: +- version (monotonic integer), configuration_version and configuration; +- generation and source_revision (null before work is bound to a revision); +- steps (id, execution, approval_hold) and events. +The issue view also carries ready_steps, handoffs and export_warning alongside +playbook. Empty optional view fields are omitted; an export warning gives a +recovery instruction and never changes the committed result. +The current issue.state is shown once on the existing issue view, not copied +as a second authoritative field of the stored playbook. + +`update_issue(number, playbook, note)` is mutually exclusive with ordinary +field edits. `playbook` is a tagged operation with `action` and +`expected_version`: +- set_revision: revision (1..200 printable characters); owner or admin user; +- start: step, generation, configuration_version, source_revision, + target_session_id; caller must be exactly that currently assigned native + session, with matching pinned generation/configuration/source, configured + role/independence and existing transactional holding/WIP checks. Refreshing + aggregate CAS does not make an old generation claim valid; +- complete: step, attempt_version, source_revision, result (pass/not_pass), + evidence (1..4000 characters); + only the caller that started this attempt or admin user; +- block: step, kind (product/environment/approval/scheduling/release_order), + reason (1..4000); assigned running caller or eligible caller of a ready step; +- retry: step, reason; eligible caller, only failed or non-approval blocked; + running attempts require admin recovery; records a new pending attempt. +Every operation requires note (1..4000), a current version, and a known issue. +The daemon derives project, live caller, roles and timestamp. Payloads cannot +set those. No new MCP tool; the existing update_issue schema gains one optional +object. Unknown properties and incomplete operation variants refuse. + +Admin-only issue operations +--------------------------- + +`user_update_playbook(project,number,operation,note)` uses the authenticated +admin path and the same CAS/reducer. In addition to the above: +- release_hold: step, expected_version; preserves evidence/attempt history; +- adopt: expected_version, configuration_version; adopts the current selected + project configuration only if its version matches, resets execution and + retains holds; removing a held step refuses; +- interrupt: step, expected_version, reason; marks a running attempt blocked + for scheduling without sending signals or stopping any native process. +No session, phone, LAN or control-socket path invokes these as the user. + +Atomicity and attempts +---------------------- + +Configuration, execution and events are one playbook aggregate in issues.db. +Every accepted operation increments its version once and appends one event. +Rejected/stale operations append nothing. Attempt identity is the start event's +version, owned by the derived caller. Complete requires both aggregate +expected_version and the exact running attempt_version and source_revision. +Refreshing aggregate CAS never authorizes an older attempt result: even the +same actor cannot complete replacement attempt B with attempt A's token. +Running block and admin interrupt also require the running attempt_version; +a ready-step block has no attempt token and refuses when the step is running. +Independent parallel steps may refresh the playbook version after a conflict; +they never silently replay a completion. + +Evidence invalidation never removes an approval_hold. Starting or completing a +held step refuses regardless of source/configuration version. Required skipped +steps do not satisfy gates; only an admin may skip an optional step with reason. +The backend stores events append-only and never executes a configured command. +An admin-only skip operation takes step, expected_version and reason; required +or approval-held steps cannot be skipped. start/complete/block/retry need a +bound revision. set_revision refuses empty or unchanged revisions. Only admin +can interrupt running work; roles alone cannot take over another attempt. + +Lifecycle and adoption +---------------------- + +An issue's playbook snapshots the workflow/configuration version. New issues +snapshot the selected project configuration. Existing issues are initialized +from their project's configuration by the migration path without fabricating +historical execution/PASS. An explicit admin adoption changes the snapshot; +ordinary workflow saves do not rewrite configured delivery snapshots or evidence. +For legacy workflows with an empty delivery plan, existing workflow-save/remap +behavior remains; there is no step evidence to reinterpret. Configured plans +remain pinned and incompatible state remaps refuse until explicit adoption. A configured playbook refuses a project save that maps away its current state. +Move it to a shared state and explicitly adopt the selected configuration first. +Empty legacy plans retain the existing project-save/remap behavior. Project +saves use the existing workflow-version CAS; explicit adoption additionally +uses the playbook version and selected configuration version. Adoption refuses +running attempts, a missing current state, or removing a held step; it preserves +other holds and invalidates execution evidence. No issue_versions field or +implicit fleet adoption is introduced. +The same workflow pure functions validate the snapshot and its moves: no second +FSM engine is introduced. Board/detail views expose the issue's pinned version +and allowed moves; project config shows the current default/override. + +A workflow containing required delivery steps must define a release state; +otherwise validation refuses. Empty and optional-only plans retain existing +no-release workflow compatibility. +Validation rejects paths from start to release that avoid a required step's +state (reachability with that state removed). An acceptance move requires its +current stage's required steps passed. +A move is a rejection only when its declared guard requires not_pass; a +cancellation is a declared reason-guarded move to a non-release final state. +Providing not_pass to an arbitrary transition does not bypass step checks. +Entering a stage resets that stage's execution records for a fresh visit, +preserving holds and prior events. A source revision change invalidates all +execution records. A common predicate checks all required steps across the pinned plan on any +entry to release, not just the last stage. Existing role/WIP/release guards +remain. Publication checks only linked issues it advances; cancelled issues +remain excluded. Close is never recorded as PASS. Direct ordinary release +moves use the same predicate. + +Every bulk move, publication and active-owner/WIP check resolves each issue +against its own pinned workflow inside the same transaction. Open-state, +release participation, move guards and active work cannot be classified using +the latest project workflow or another issue's snapshot. All affected issues +are validated before any writes; one refusal rolls back the entire operation. +Project-level WIP capacity uses the selected project configuration while +occupancy includes each issue whose own snapshot classifies it as active. + +Mixed-version release issues must agree on the release-state id before a +release card can publish. Otherwise publication refuses naming the issues and +requires explicit adoption; it never silently maps them or discards history. + +Initialization and schema compatibility +--------------------------------------- + +The existing migration mechanism adds playbooks and append-only event tables. +Missing playbooks are initialized in one transaction before the store opens. +The initialization event names the system/migration, not a historical actor, +and records no completed work. Normal issue creation writes its snapshot in +the same transaction. A missing row after migration is an integrity error, +not an empty-plan fallback. Release cards keep their existing release FSM; +their linked issues own delivery playbooks. + +Existing tool arguments remain valid. Omitting playbook performs an ordinary +update. Combining playbook with other field edits refuses. Expected playbook +version is mandatory, separate from the issue history version. A successful +operation increments both once. Admin operations use the same reducer and +transaction; privilege comes from the authenticated page, never a payload flag. + +Targeted pipeline handoffs +-------------------------- + +The user's additional requirement is direct peer-to-peer messaging only to the +target agent, following the delivery chain. This applies to pipeline-generated +work messages; it does not remove the user's existing general channel UI. + +Each delivery step declares assignee: owner, reviewer or qa_owner. This resolves +through the issue's local assignments to exactly one live parent session whose +role satisfies the step. Resolution captures its exact session_id, never merely +a display name. An absent/ambiguous/ended/wrong-role target produces a visible +routing blocker, never a broadcast, root fallback or automatic new session. +The property panel edits this assignment and shows its resolved recipient. + +On completion, an accepted stage move or authenticated admin recovery, ready steps produce durable +handoff intents in the same transaction as the playbook event. Each intent +names issue, step, configuration version, source revision, stage/attempt +generation, sender session id and exact target session id. A step becoming ready +again in the same generation produces no duplicate. The sender is the actual +session responsible for the accepted event. Authenticated admin actions retain a +user-origin marker and use the existing direct UserSend path, which derives the +real bridge user identity; they never impersonate an agent sender. +Same-agent successors remain ready locally; no self-message is sent. + +A daemon adapter drains pending intents after commit and on restart, using the +existing direct Send/UserSend paths and durable message store. A peer sender may +have exited: its registered local parent identity and project are checked against +the persisted bridge registry. Only the assigned destination must remain live. It rechecks the pinned +source/configuration/generation, readiness and exact target assignment before +sending. Stale intents become superseded; they are not redirected to a new +agent. Explicit assignment changes can create a new intent for the new target +only while the old intent is definitely unsent. A dispatched/uncertain intent +requires inspection before any manual replacement, retaining history. Uncertain +or dispatching intents suppress automatic replacement across generations too; +ready work can still be claimed explicitly after reading the current issue. + +Before crossing into Send, persist dispatching. Persist the returned receipt +and message id when known. A crash or lost reply in dispatching becomes +uncertain, never an automatic retry. Pending intents are retryable only before +that boundary. No channel routing, mentions expansion, team fanout or paired +project discovery is used. Each actual send has exactly one recipient. Unresolved intents are +reconciled during the regular drain when the live roster changes. Resolution checks +the original generation, configuration, source and current step readiness, retains +the original sender, and resolves only that step's current exact assignee. Stale +intents become superseded. Reconciliation changes routing state only and preserves +cross-generation dispatching/uncertain suppression and single-send deduplication. + +The message carries a compact structured handoff plus evidence references and +states that it is a pipeline notification, not additional user approval. The recipient reads the current +playbook and claims the matching ready step with CAS. Stale configuration/source +or generation cannot start work. Queued, delivered and step completion remain +separate states; a transport receipt never passes a check or moves an issue. +Unrelated ready branches retain their own addressed intents; failure of one +branch or recipient cannot block another independent branch. + +Execution policy +---------------- + +The user explicitly removed procedural blocking rules: design review and PM +slot grants are not permissions required before implementation. Resolve review +findings through implementation and verification. Failed checks block only +work that depends on their result; retain truthful aggregate outcomes. Native +approval holds, exact recipient checks and uncertain-send handling remain. diff --git a/docs/requirements.md b/docs/requirements.md index 2220b24..c80eda8 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -79,3 +79,5 @@ - REQ-052: A project's issues (REQ-043) include release cards: an issue of kind `release` with a version (unique in the project), a fixed lifecycle `planning -> frozen -> released`, or `closed` with a reason, and linked issues (each issue names at most one release in its `release` field, the only place the link is stored). The workflow marks one state as the release state (REQ-048; the default marks `released`). Freeze: a frozen release takes no new issue, and an issue leaves it only with a note by a release manager; at most one release per project is frozen. Barrier: an issue linked to an unreleased release never enters the release state on its own, and while a release is frozen no unlinked issue does either; without a frozen release issues move as before. Publishing (frozen -> released, with result PASS, evidence and a commit) is refused, with nothing changed, unless every linked issue is closed or one move from the release state with its guard met; it then moves the release and every linked open issue into the release state in one transaction, one history entry each. Closing a release unlinks its open issues. Release managers (create, freeze, unfreeze, publish, close) are a session acting as `project-manager`, the session that holds root, and the user on the admin page. The existing issue tools carry `kind`, `version` and `release`; no new tool; publishing records, it pushes and publishes nothing. `list_issues` filters by release; the Issues tab's release band, release filter and release actions (D-8, AC-15, AC-16) are not built yet (#31). Out of scope: several frozen releases, git tags and branches, release notes, the phone, paired laptops. Detail, with AC-1..AC-16 and D-1..D-9: [release-requirements.md](release-requirements.md). - REQ-053: Discovery (REQ-001) reads a Claude session record (`~/.claude/sessions/.json`) from its first complete JSON value and ignores any bytes after it, so a record that a shorter rewrite left with the tail of an earlier version still lists its session: it is shown, receives messages and is identified as the caller of its MCP tools (`send_message` no longer fails with "Cannot identify caller"). Only a complete first value with the fields discovery needs (`pid`, `sessionId`, `cwd`) is used; a record that is empty, cut short, not a JSON object, or has a missing or wrong field is ignored for that discovery as before, so no session, name, status, waiting label (REQ-042) or socket ever comes from part of a record. A record with trailing bytes is logged as a warning naming its path and the byte count ignored, an ignored record with its path and the parser's reason; each at most once per record file and process until the file changes, not on every discovery. A record is read as bytes, so a tail that is not UTF-8 is ignored too, and one bad record never stops the discovery of the others. The bridge never writes, repairs or deletes a Claude session record. Detail, with AC-1..AC-7: [claude-record-requirements.md](claude-record-requirements.md). - REQ-054: The admin page's Issues and Requirements tabs are consistent and cross-referenced. Consistent: both use the same view switcher (Board and List; the Requirements tree is a mode of List), one filter bar (search, issue, requirement, release, state or lane, owner, status and level, each only where it applies), the same card, row and detail panel design, and keep the view and filters in the page URL's hash in one format, so a view reloads, can be shared, and back and forward step through views. Cross-referenced: every issue number on the Requirements tab and every requirement id on the Issues tab opens the other tab with that item's detail open; Back returns to the previous tab's view, filters, scroll and selection; each detail lists the linked items of the other kind with their state or lane. A link to a filtered-out item opens its detail without changing filters; following links changes no data; all text, including the hash, is shown as text only. Built as one shared view module with REQ-043 A-1 and REQ-044 A-1 (A-2 is #23); the release filter waits for REQ-052's page (#31). Out of scope: the phone, other tabs, saved views. Detail, with AC-1..AC-8: [views-requirements.md](views-requirements.md). + +- REQ-059: Declarative project delivery workflows use the current workflow as default and allow project overrides through an editable SVG block diagram. Issues pin versioned playbooks in IssueStore with source-bound execution, retained approval holds, transactional audit events and readable derived project-home exports. Exact assigned agents claim a generation and complete an exact attempt; durable handoffs follow the configured chain peer-to-peer, without broadcasts or automatic uncertain-send retries. Failed checks block only their dependent work. User-authorized implementation does not wait for procedural review-round or PM permission gates. Details: [delivery contract](design/119-wire-contract.md). diff --git a/qa/admin/workflow-delivery.test.ts b/qa/admin/workflow-delivery.test.ts new file mode 100644 index 0000000..90ede92 --- /dev/null +++ b/qa/admin/workflow-delivery.test.ts @@ -0,0 +1,23 @@ +import { expect, test } from "bun:test"; +const W = require("../../src/admin/workflow.js"); + +/* REQ-059: Saving a visual edit preserves execution policy and resolves new stage keys without mutating the draft. */ +test("serializes delivery and WIP policy with the diagram's state identities", () => { + const draft = { + states: [{ _key: "~new1", id: "build", label: "Build", start: true, open: true, wip: false }], + transitions: [{ from: "~new1", to: "done", guard: { roles: ["reviewer"] } }], + delivery: [{ id: "check", label: "Check", state: "~new1", roles: ["developer"], depends_on: [], required: true, independent_of_owner: false, assignee: "owner" }], + }; + const before = JSON.stringify(draft); + const result = W.toConfiguration(draft); + expect(result.states[0]).toEqual({ id: "build", label: "Build", start: true, open: true, wip: false }); + expect(result.transitions[0].from).toBe("build"); + expect(result.delivery[0]).toEqual({ ...draft.delivery[0], state: "build" }); + result.delivery[0].roles.push("qa"); + expect(JSON.stringify(draft)).toBe(before); +}); + +/* REQ-059: Existing workflows without delivery configuration retain an empty plan on visual editing. */ +test("defaults an omitted delivery plan to empty", () => { + expect(W.toConfiguration({ states: [], transitions: [] }).delivery).toEqual([]); +}); diff --git a/src/admin.rs b/src/admin.rs index 9d08dcd..6b86001 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -185,6 +185,7 @@ fn allowed(request: &Request) -> bool { | Request::Workflow { .. } | Request::WorkflowCheck { .. } | Request::UserSaveWorkflow { .. } + | Request::UserUpdatePlaybook { .. } | Request::UserSetProjectGoal { .. } | Request::Requirements { .. } | Request::Requirement { .. } diff --git a/src/admin/admin.css b/src/admin/admin.css index 909fde8..7a22ba7 100644 --- a/src/admin/admin.css +++ b/src/admin/admin.css @@ -600,7 +600,7 @@ body.app-full .chat { height: 100%; min-height: 0; grid-template-rows: minmax(0, .issue-facts dt { color: var(--muted); } .issue-facts dd { margin: 0; } .issue-facts__reqs { display: inline-flex; flex-wrap: wrap; gap: 4px; } -.issue-criteria, .issue-history { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 13px; } +.issue-criteria, .issue-history, .playbook__history { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 13px; } .issue-history__time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 2px; } .issue-history__detail { display: block; color: var(--muted); white-space: pre-wrap; } .issue-move { margin-top: 14px; } @@ -834,3 +834,27 @@ button.assignee:focus-visible { outline: 2px solid var(--accent); outline-offset .issues-state-note[hidden] { display: none; } .issues-closed-link { margin: 0; font-size: 13px; } .issues-closed-link[hidden] { display: none; } + +/* REQ-059: selectable SVG workflow and its native properties controls. */ +.wf-node[role="button"], .wf-edge[role="button"] { cursor: pointer; } +.wf-node.wf-selected > rect, .wf-node[role="button"]:focus-visible > rect { stroke: var(--accent, #1f6feb); stroke-width: 4px; } +.wf-edge.wf-selected, .wf-edge[role="button"]:focus-visible { stroke: var(--accent, #1f6feb); stroke-width: 5px; } +.wf-edge[role="button"] { pointer-events: stroke; stroke-width: 3px; } +.wf-inspector { display: grid; align-content: start; gap: 8px; min-width: 15rem; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); } +.wf-inspector__name { margin: 0; font-weight: 600; } +.wf-property { display: grid; gap: 4px; font-size: 13px; } +.wf-property:has(input[type="checkbox"]) { display: flex; align-items: center; } +.wf-property input:not([type="checkbox"]), .wf-property select { width: 100%; min-width: 0; font: inherit; } +.wf-property :focus-visible { outline: 2px solid var(--accent, #1f6feb); outline-offset: 2px; } +.wf-delivery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 12px; } +.wf-delivery__step { display: grid; align-content: start; gap: 10px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; } +.wf-delivery__step > legend { font-size: 13px; font-weight: 600; } +.playbook__steps { display: grid; gap: 8px; padding-inline-start: 20px; } +.playbook__detail { display: block; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; } +@media (pointer: coarse) { .wf-inspector button, .wf-delivery button, .wf-property select, .wf-property input:not([type="checkbox"]) { min-height: 48px; } } + +.playbook__form { display: grid; gap: 8px; padding-block-start: 12px; } +.playbook__form > button { justify-self: start; } +@media (min-width: 1000px) { .wf__body:has(.wf-inspector:not([hidden])) { grid-template-columns: minmax(0, 1fr) 18rem; } .wf__body:has(.wf-inspector:not([hidden])) > .wf__moves { grid-column: 1 / -1; } } + +.wf__body > .wf__figure { align-self: start; } diff --git a/src/admin/admin.js b/src/admin/admin.js index 02b21f9..4f6180a 100644 --- a/src/admin/admin.js +++ b/src/admin/admin.js @@ -1944,6 +1944,11 @@ function renderProjects() { masterSelect.addEventListener("change", () => setMaster(project.project, masterSelect.value || null)); masterBox.append(masterSelect); head.append(masterBox); + const configure = element("button", "button button--quiet button--small", "Configure workflow"); + configure.type = "button"; + configure.dataset.qa = "project-workflow"; + configure.addEventListener("click", () => { openProjectWorkflow(project.dir).catch(showError); }); + head.append(configure); // Twin folders share the channel of their name, and so one master. const twins = projectViews.filter((p) => p.project === project.project && p.dir !== project.dir); if (twins.length) { @@ -3839,7 +3844,7 @@ function renderIssueDialog() { Views.detail($("issue-detail"), { title: view.title, badges: [state], - sections: [{ nodes: body }, { heading: "Requirements", nodes: [linked] }, { heading: "Acceptance criteria", nodes: [criteria] }, { heading: "History", nodes: [changes] }], + sections: [{ nodes: body }, ...(view.playbook ? [{ heading: "Delivery playbook", nodes: [renderPlaybook(view, missing)] }] : []), { heading: "Requirements", nodes: [linked] }, { heading: "Acceptance criteria", nodes: [criteria] }, { heading: "History", nodes: [changes] }], actions: [moveForm()], onBack: Views.openedByLink() ? () => history.back() : null, onClose: issueClosed, @@ -3847,6 +3852,123 @@ function renderIssueDialog() { renderMoveForm(); } +// REQ-059: persisted evidence is shown independently of message delivery. +function renderPlaybook(view, readOnly) { + const book = view.playbook; + const panel = element("div", "playbook"); + panel.dataset.qa = "issue-playbook"; + panel.append(element("p", null, `Configuration ${book.configuration_version}; playbook ${book.version}; source ${book.source_revision ?? "not set"}.`)); + if (view.export_warning) panel.append(element("p", "field__problem", view.export_warning)); + const steps = element("ol", "playbook__steps"); + for (const step of book.steps) { + const definition = book.configuration.delivery.find((item) => item.id === step.id); + const ready = view.ready_steps?.includes(step.id); + const item = element("li", "playbook__step"); + item.append(element("strong", null, definition?.label ?? step.id), `: ${step.execution.state}${ready ? " (ready)" : ""}`); + if (definition) item.append(element("span", "playbook__detail", `Stage ${definition.state}; target ${definition.assignee}: ${view[definition.assignee] ?? "unassigned"}${definition.required ? "; required" : "; optional"}`)); + if (step.approval_hold) item.append(element("span", "playbook__detail", `Approval hold: ${step.approval_hold}`)); + if (step.execution.actor) item.append(element("span", "playbook__detail", `Running attempt ${step.execution.attempt_version}, agent ${step.execution.actor}`)); + if (step.execution.evidence || step.execution.reason) item.append(element("span", "playbook__detail", step.execution.evidence ?? step.execution.reason)); + steps.append(item); + } + panel.append(steps); + if (view.handoffs?.length) { + panel.append(element("h4", "wf__subtitle", "Targeted handoffs")); + const handoffs = element("ol", "playbook__steps"); + for (const handoff of view.handoffs) { + const labels = { + unresolved: "Missing assigned agent", + pending: "Waiting to send", + dispatching: "Sending; delivery not yet confirmed", + superseded: "Superseded; will not send", + sent: "Submitted; not work completion", + uncertain: "Inspect delivery; do not resend", + }; + const item = element("li", "playbook__handoff"); + item.dataset.qa = `playbook-handoff:${handoff.id}`; + item.append(element("strong", null, handoff.step), `: ${labels[handoff.state] ?? handoff.state}`); + item.append(element("span", "playbook__detail", `Target: ${handoff.target || "Missing assigned agent"}; sender: ${handoff.sender}`)); + item.append(element("span", "playbook__detail", `Generation ${handoff.generation}; configuration ${handoff.configuration_version}; source ${handoff.source_revision}`)); + if (handoff.message_id) item.append(element("span", "playbook__detail", `Message: ${handoff.message_id}`)); + handoffs.append(item); + } + panel.append(handoffs); + } + const events = element("details", "playbook__events"); + events.append(element("summary", null, `Execution history (${book.events.length})`)); + const history = element("ol", "playbook__history"); + for (const event of book.events) history.append(element("li", null, `v${event.version}: ${event.actor} - ${event.action}: ${event.note}`)); + events.append(history); + panel.append(events); + if (!readOnly) panel.append(playbookRecoveryForm(view)); + return panel; +} + +function playbookRecoveryForm(view) { + const book = view.playbook; + const folder = openCard.folder; + const form = element("form", "playbook__form"); + form.setAttribute("aria-label", "Update delivery playbook"); + const action = document.createElement("select"); + action.name = "action"; + action.append(new Option("Set source revision", "set_revision"), new Option("Release approval hold", "release_hold"), new Option("Interrupt running attempt", "interrupt"), new Option("Retry failed or blocked step", "retry"), new Option("Skip optional step", "skip"), new Option("Adopt current project workflow", "adopt")); + const step = document.createElement("select"); + step.name = "step"; + step.append(...book.steps.map((item) => new Option(item.id, item.id))); + const stepField = workflowField("Step", step); + const revision = document.createElement("input"); + revision.name = "revision"; + revision.maxLength = 200; + revision.value = book.source_revision ?? ""; + const revisionField = workflowField("Source revision", revision); + const note = document.createElement("textarea"); + note.name = "note"; + note.required = true; + note.maxLength = 4000; + note.rows = 2; + const status = element("p", "field__problem"); + status.setAttribute("role", "status"); + const submit = element("button", "button button--small", "Apply update"); + submit.type = "submit"; + const showFields = () => { + stepField.hidden = ["set_revision", "adopt"].includes(action.value); + revisionField.hidden = action.value !== "set_revision"; + revision.required = !revisionField.hidden; + }; + action.addEventListener("change", showFields); + form.append(element("p", "schedule-form__hint", "Source changes and workflow adoption reset execution evidence but preserve approval holds. Interrupt records a stopped attempt; it does not stop the agent process."), workflowField("Action", action), stepField, revisionField, workflowField("Reason / note (required)", note), status, submit); + showFields(); + form.addEventListener("submit", async (event) => { + event.preventDefault(); + if (!form.reportValidity()) return; + submit.disabled = true; + status.textContent = ""; + try { + const operation = { expected_version: book.version, action: action.value }; + if (action.value === "set_revision") operation.revision = revision.value; + else if (action.value === "adopt") { + const latest = await call({ method: "workflow", project: folder }); + operation.configuration_version = latest.version; + } else { + operation.step = step.value; + if (["interrupt", "retry", "skip"].includes(action.value)) operation.reason = note.value; + if (action.value === "interrupt") { + const running = book.steps.find((item) => item.id === step.value)?.execution; + if (running?.state !== "running") throw new Error("Choose a running step to interrupt."); + operation.attempt_version = running.attempt_version; + } + } + await call({ method: "user_update_playbook", project: folder, number: view.number, operation, note: note.value }); + if (openCard?.folder === folder && openCard.number === view.number) await loadIssue(folder, view.number); + } catch (error) { + status.textContent = error.message; + } finally { + submit.disabled = false; + } + }); + return form; +} + // The Move menu (AC-23): only the allowed moves, each with what its guard // needs: the card's `moves` [{to, label, guard: [words]}] (REQ-048 AC-9). function cardMoves(view) { @@ -4033,6 +4155,7 @@ async function refreshWorkflow(force = false) { wfReply = await call({ method: "workflow", project: folder }); $("wf-problem").textContent = ""; renderWorkflowPane(force); + renderIssuesNav(); } catch (error) { $("wf-problem").textContent = `The workflow could not be read: ${error.message}`; } finally { @@ -4052,7 +4175,7 @@ function svgNode(name, attributes = {}, text) { // node (AC-11). function drawWorkflow(workflow, problems = { states: new Set(), transitions: new Set() }) { const drawn = Workflow.layout(workflow); - const svg = svgNode("svg", { xmlns: SVG_NS, viewBox: `0 0 ${drawn.width} ${drawn.height}`, width: drawn.width, height: drawn.height, role: "img", "aria-labelledby": "wf-svg-title wf-svg-desc", class: "wf-svg" }); + const svg = svgNode("svg", { xmlns: SVG_NS, viewBox: `0 0 ${drawn.width} ${drawn.height}`, width: drawn.width, height: drawn.height, role: wfDraft ? "group" : "img", "aria-labelledby": "wf-svg-title wf-svg-desc", class: "wf-svg" }); svg.append( svgNode("title", { id: "wf-svg-title" }, "Issue workflow"), svgNode("desc", { id: "wf-svg-desc" }, `${workflow.states.length} states and ${workflow.transitions.length} transitions; the list of moves names each.`), @@ -4068,6 +4191,7 @@ function drawWorkflow(workflow, problems = { states: new Set(), transitions: new const kind = `wf-edge${e.back ? " wf-edge--back" : ""}${e.any ? " wf-edge--any" : ""}${problems.transitions.has(e.index) ? " wf-edge--error" : ""}`; const path = svgNode("path", { d: e.d, class: kind, "marker-end": "url(#wf-arrow)", "data-transition": e.index }); path.append(svgNode("title", {}, `${e.from === Workflow.ANY_OPEN ? "any open state" : stateLabel(e.from)} to ${stateLabel(e.to)}${e.label ? `: ${e.label}` : ""}`)); + if (wfDraft) makeWorkflowSelectable(path, { kind: "transition", index: e.index }, `Edit transition from ${e.from} to ${e.to}`); edges.append(path); if (e.label) labels.append(svgNode("text", { x: e.lx, y: e.ly, class: "wf-label", "text-anchor": "middle" }, e.label)); } @@ -4088,12 +4212,169 @@ function drawWorkflow(workflow, problems = { states: new Set(), transitions: new const text = svgNode("text", { x: n.x + n.w / 2, y: n.y + n.h / 2, class: "wf-node__label", "text-anchor": "middle", "dominant-baseline": "middle" }); label.forEach((line, k) => text.append(svgNode("tspan", { x: n.x + n.w / 2, dy: k === 0 ? (label.length > 1 ? "-0.6em" : 0) : "1.2em" }, line))); group.append(text); + if (wfDraft && !n.pseudo) makeWorkflowSelectable(group, { kind: "state", index: workflow.states.findIndex((s) => s.id === n.id) }, `Edit stage ${n.label}`); nodes.append(group); } svg.append(edges, nodes, labels); return svg; } +// REQ-059: SVG selection and native controls edit the same draft. +function makeWorkflowSelectable(node, selection, label) { + node.setAttribute("role", "button"); + node.setAttribute("tabindex", "0"); + node.setAttribute("aria-label", label); + const selected = wfSelection?.kind === selection.kind && wfSelection.index === selection.index; + node.setAttribute("aria-pressed", String(selected)); + node.classList.toggle("wf-selected", selected); + const choose = () => { + wfSelection = selection; + for (const item of $("wf-graph").querySelectorAll('[role="button"]')) { + item.setAttribute("aria-pressed", String(item === node)); + item.classList.toggle("wf-selected", item === node); + } + renderWorkflowInspector(); + }; + node.addEventListener("click", choose); + node.addEventListener("keydown", (event) => { + if (!event.isComposing && ["Enter", " "].includes(event.key)) { + event.preventDefault(); + choose(); + $("wf-inspector").querySelector("input,select,button")?.focus(); + } + }); +} + +function workflowField(label, control) { + const wrap = element("label", "wf-property"); + if (control.type === "checkbox") wrap.append(control, ` ${label}`); + else wrap.append(element("span", "wf-property__label", label), control); + return wrap; +} + +function workflowText(value, onChange, maxLength = 100) { + const input = document.createElement("input"); + input.value = value ?? ""; + input.maxLength = maxLength; + input.addEventListener("change", () => { onChange(input.value); changed(); }); + return input; +} + +function workflowFlag(value, onChange) { + const input = document.createElement("input"); + input.type = "checkbox"; + input.checked = !!value; + input.addEventListener("change", () => { onChange(input.checked); changed(true); }); + return input; +} + +function renderWorkflowInspector() { + const panel = $("wf-inspector"); + panel.hidden = !wfDraft; + panel.replaceChildren(element("h4", "wf__subtitle", "Properties")); + if (!wfDraft || !wfSelection) { + panel.append(element("p", "schedule-form__hint", "Select a stage block or an arrow. The tables below provide the same controls.")); + return; + } + const selection = wfSelection; + if (selection.kind === "state") { + const state = wfDraft.states[selection.index]; + if (!state) { wfSelection = null; renderWorkflowInspector(); return; } + panel.append(element("p", "wf-inspector__name", `Stage: ${state.id || "new"}`)); + panel.append(workflowField("Label", workflowText(state.label, (value) => { + state.label = value; + renderDraftRows(); + }, 40))); + panel.append(workflowField("Open", workflowFlag(state.open, (value) => { state.open = value; }))); + panel.append(workflowField("Counts as work in progress", workflowFlag(state.wip !== false, (value) => { state.wip = value; }))); + panel.append(workflowField("Release stage", workflowFlag(state.release, (value) => { + for (const item of wfDraft.states) item.release = item === state && value; + }))); + panel.append(stateRules(state)); + const to = document.createElement("select"); + stateOptions(to, endpoint(wfDraft.states.find((item) => item !== state) ?? state), false); + const connect = element("button", "button button--small", "Connect stage"); + connect.type = "button"; + connect.addEventListener("click", () => { + wfDraft.transitions.push({ from: endpoint(state), to: to.value, guard: blankGuard() }); + wfSelection = { kind: "transition", index: wfDraft.transitions.length - 1 }; + changed(true); + }); + panel.append(workflowField("Connect to", to), connect); + const add = element("button", "button button--quiet button--small", "Add delivery step here"); + add.type = "button"; + add.addEventListener("click", () => addDeliveryStep(endpoint(state))); + panel.append(add); + } else { + const transition = wfDraft.transitions[selection.index]; + if (!transition) { wfSelection = null; renderWorkflowInspector(); return; } + const guard = transition.guard ?? (transition.guard = blankGuard()); + panel.append(element("p", "wf-inspector__name", `Transition ${selection.index + 1}`)); + for (const key of ["from", "to"]) { + const select = document.createElement("select"); + stateOptions(select, transition[key], key === "from"); + select.addEventListener("change", () => { transition[key] = select.value; changed(true); }); + panel.append(workflowField(key === "from" ? "From" : "To", select)); + } + const result = document.createElement("select"); + result.append(new Option("No result required", ""), new Option("PASS", "pass"), new Option("NOT PASS", "not_pass")); + result.value = guard.result ?? ""; + result.addEventListener("change", () => { guard.result = result.value || null; changed(true); }); + panel.append(workflowField("Required result", result)); + const note = document.createElement("select"); + note.append(new Option("Note", "note"), new Option("Reason", "reason")); + note.value = guard.note_label ?? "note"; + note.addEventListener("change", () => { guard.note_label = note.value; changed(true); }); + panel.append(workflowField("Ask for", note)); + panel.append(workflowField("Allowed roles (comma separated)", workflowText((guard.roles ?? []).join(", "), (value) => { + guard.roles = value.split(",").map((part) => part.trim()).filter(Boolean); + renderDraftRows(); + }, 4000))); + for (const [key, label] of GUARD_FLAGS) panel.append(workflowField(label, workflowFlag(guard[key], (value) => { guard[key] = value; }))); + const remove = element("button", "button button--danger button--small", "Remove connection"); + remove.type = "button"; + remove.addEventListener("click", () => { wfDraft.transitions.splice(selection.index, 1); wfSelection = null; changed(true); }); + panel.append(remove); + } +} + +function addDeliveryStep(state) { + let number = wfDraft.delivery.length + 1; + while (wfDraft.delivery.some((step) => step.id === `step-${number}`)) number++; + wfDraft.delivery.push({ id: `step-${number}`, label: "New check", state: state ?? endpoint(wfDraft.states.find((s) => s.open && !s.release && !s.start) ?? wfDraft.states[0] ?? { id: "" }), roles: [], depends_on: [], required: true, independent_of_owner: false, assignee: "owner" }); + changed(true); + $("wf-delivery").querySelector("fieldset:last-child input")?.focus(); +} + +function renderDeliverySteps() { + $("wf-delivery").replaceChildren(...(wfDraft.delivery ?? []).map((step, index) => { + const box = element("fieldset", "wf-delivery__step"); + box.dataset.qa = `wf-delivery:${index}`; + box.append(element("legend", null, `Step ${index + 1}`)); + for (const [key, label, limit] of [["id", "Id", 32], ["label", "Label", 100]]) { + box.append(workflowField(label, workflowText(step[key], (value) => { step[key] = value; }, limit))); + } + const state = document.createElement("select"); + stateOptions(state, step.state, false); + state.addEventListener("change", () => { step.state = state.value; changed(); }); + const assignee = document.createElement("select"); + assignee.append(...Workflow.ASSIGNEE_FIELDS.map(([value, label]) => new Option(label, value))); + assignee.value = step.assignee; + assignee.addEventListener("change", () => { step.assignee = assignee.value; changed(); }); + box.append(workflowField("Stage", state), workflowField("Target agent assignment", assignee)); + for (const [key, label] of [["roles", "Allowed roles (comma separated; empty allows any role)"], ["depends_on", "Prerequisite step ids (comma separated, same stage)"]]) { + box.append(workflowField(label, workflowText((step[key] ?? []).join(", "), (value) => { step[key] = value.split(",").map((part) => part.trim()).filter(Boolean); }, 4000))); + } + box.append(workflowField("Required for acceptance", workflowFlag(step.required !== false, (value) => { step.required = value; }))); + box.append(workflowField("Must be independent of the issue owner", workflowFlag(step.independent_of_owner, (value) => { step.independent_of_owner = value; }))); + const remove = element("button", "button button--quiet button--small", "Remove step"); + remove.type = "button"; + remove.addEventListener("click", () => { wfDraft.delivery.splice(index, 1); changed(true); }); + box.append(remove); + return box; + })); +} + // The same moves as text: "Review to QA: PASS, evidence, not owner". function workflowList(workflow) { return [...workflow.transitions.map((t, index) => { @@ -4115,6 +4396,19 @@ function workflowList(workflow) { })]; } +async function openProjectWorkflow(folder) { + if (wfDraft && board?.project !== folder) { + showError(new Error("Save or cancel the current workflow edits before switching projects.")); + return; + } + chooseBoardFolder(folder); + board = await call({ method: "issues", project: folder, include_closed: closedOpen }); + navSelection.issues = "workflow"; + showTab("issues"); + renderIssuesNav(); + await refreshWorkflow(true); +} + function renderWorkflowPane(force = false) { if (!wfReply) return; const key = JSON.stringify([wfReply, board?.project]); @@ -4124,6 +4418,7 @@ function renderWorkflowPane(force = false) { $("wf-title").textContent = project ? `Workflow of ${boardLabel(project, board.projects)}` : "Workflow"; $("wf-version").textContent = wfReply.default ? "the default (REQ-043's steps)" : `version ${wfReply.version}`; $("wf-edit").hidden = !!project?.missing || !!wfDraft; + $("wf-default").hidden = !!project?.missing || !wfReply.default_workflow; // While editing, the graph and the list show the draft (renderDraft). if (wfDraft) return; // A stored workflow that no longer validates (the bridge logs it too): @@ -4154,6 +4449,7 @@ let wfMoves = {}; let wfTimer = null; let wfAsked = 0; let wfNewKeys = 0; +let wfSelection = null; // A new state's transitions point at its draft-local key, not at its id, // so typing an id that passes through an existing one ("fix" on the way to @@ -4163,17 +4459,7 @@ function endpoint(state) { } // The draft as the bridge and the graph take it: keys replaced by ids. function draftOut() { - const ids = new Map(wfDraft.states.filter((s) => s._key).map((s) => [s._key, s.id])); - const id = (end) => (ids.has(end) ? ids.get(end) : end); - return { - states: wfDraft.states.map(({ id, label, start, open, rules, release }) => ({ - id, label, start, open, - // A-1: omitted when empty, as the bridge writes them. - ...(rules?.length ? { rules: rules.map((r) => ({ field: r.field, roles: [...r.roles] })) } : {}), - ...(release ? { release: true } : {}), - })), - transitions: wfDraft.transitions.map((t) => ({ from: id(t.from), to: id(t.to), guard: t.guard })), - }; + return Workflow.toConfiguration(wfDraft); } const GUARD_FLAGS = [["criteria", "criteria"], ["owner", "owner"], ["not_owner", "not owner"], ["evidence", "evidence"], ["commit", "commit"]]; @@ -4184,6 +4470,8 @@ function blankGuard() { function startEditing() { if (!wfReply) return; wfDraft = JSON.parse(JSON.stringify(wfReply.workflow)); + wfDraft.delivery ??= []; + wfSelection = null; wfBase = { version: wfReply.version, ids: new Set(wfReply.workflow.states.map((s) => s.id)) }; wfMoves = {}; wfCheck = { errors: [], warnings: [], moving: {} }; @@ -4193,13 +4481,15 @@ function startEditing() { $("wf-example-note").textContent = ""; renderDraft(); checkDraft(); - $("wf-editor-title").scrollIntoView({ block: "nearest" }); - $("wf-states").querySelector("input")?.focus(); + $("wf-graph").scrollIntoView({ block: "nearest" }); + $("wf-graph").querySelector('[role="button"]')?.focus(); } function stopEditing() { wfDraft = null; wfBase = null; + wfSelection = null; + $("wf-inspector").hidden = true; $("wf-editor").hidden = true; renderWorkflowPane(true); $("wf-edit").focus(); @@ -4207,7 +4497,10 @@ function stopEditing() { // A change to the draft: redraw, then ask the bridge (debounced). function changed(redrawRows = false) { - if (redrawRows) renderDraftRows(); + if (redrawRows) { + renderDraftRows(); + renderWorkflowInspector(); + } renderDraftGraph(); clearTimeout(wfTimer); wfTimer = setTimeout(checkDraft, 300); @@ -4219,7 +4512,7 @@ async function checkDraft() { try { const reply = await call({ method: "workflow_check", project: board.project, workflow: draftOut(), moves: wfMoves }); if (ask !== wfAsked || !wfDraft) return; - wfCheck = { errors: reply.errors ?? [], warnings: reply.warnings ?? [], moving: reply.moving ?? {} }; + wfCheck = { errors: reply.errors ?? [], warnings: reply.warnings ?? [], moving: reply.moving ?? {}, issue_versions: reply.issue_versions }; } catch (error) { if (ask !== wfAsked) return; wfCheck = { errors: [{ text: error.message }], warnings: [], moving: {} }; @@ -4244,6 +4537,7 @@ function renderDraft() { renderDraftRows(); renderDraftGraph(); renderChecks(); + renderWorkflowInspector(); } function stateOptions(select, value, withAny) { @@ -4326,6 +4620,7 @@ function renderDraftRows() { const end = endpoint(state); wfDraft.states.splice(index, 1); wfDraft.transitions = wfDraft.transitions.filter((t) => t.from !== end && t.to !== end); + wfSelection = null; changed(true); }); const problem = element("span", "wf-row__problem"); @@ -4409,6 +4704,7 @@ function renderDraftRows() { row.append(cellWith(from), cellWith(to, problem), cellWith(note), cellWith(result), cellWith(needs), cellWith(roles), cellWith(remove)); return row; })); + renderDeliverySteps(); } // The roles a rule may name: the role book's, and the built-in root. @@ -4571,7 +4867,7 @@ async function saveWorkflow(event) { return; } try { - wfReply = await call({ method: "user_save_workflow", project: board.project, version: wfBase.version, workflow: draftOut(), moves: wfMoves }); + wfReply = await call({ method: "user_save_workflow", project: board.project, version: wfBase.version, workflow: draftOut(), moves: wfMoves, ...(wfCheck.issue_versions ? { issue_versions: wfCheck.issue_versions } : {}) }); $("issues-note").textContent = `Workflow saved (version ${wfReply.version}).`; stopEditing(); refreshIssues(true); @@ -4616,6 +4912,17 @@ function saveWorkflowSvg() { document.addEventListener("DOMContentLoaded", () => { $("wf-save-svg").addEventListener("click", saveWorkflowSvg); $("wf-edit").addEventListener("click", startEditing); + $("wf-default").addEventListener("click", () => { + if (!wfReply?.default_workflow) return; + if (!wfDraft) startEditing(); + wfDraft = structuredClone(wfReply.default_workflow); + wfDraft.delivery ??= []; + wfSelection = null; + wfMoves = {}; + renderDraft(); + checkDraft(); + $("wf-save-problem").textContent = "Default workflow loaded as a draft. Save to use it for this project."; + }); $("wf-cancel").addEventListener("click", stopEditing); $("wf-editor").addEventListener("submit", saveWorkflow); $("wf-example-rules").addEventListener("click", useExampleRules); @@ -4624,6 +4931,7 @@ document.addEventListener("DOMContentLoaded", () => { changed(true); $("wf-states").querySelector("tr:last-child input")?.focus(); }); + $("wf-add-delivery").addEventListener("click", () => addDeliveryStep()); $("wf-add-transition").addEventListener("click", () => { const first = wfDraft.states[0] ? endpoint(wfDraft.states[0]) : ""; wfDraft.transitions.push({ from: first, to: first, guard: blankGuard() }); diff --git a/src/admin/index.html b/src/admin/index.html index aa123ab..77ac1d1 100644 --- a/src/admin/index.html +++ b/src/admin/index.html @@ -396,6 +396,7 @@

Workflow

+
@@ -405,13 +406,14 @@

Workflow

+

Moves

    -