fix(server): find slug plan files when plan-mode propose drops the slug #43

Merged
lucas merged 2 commits from 37-plan-mode-xd-propose-ignores-slug-plan-files-and-only-finds-local-plan-md into main 2026-10-20 11:28:22 +02:00
Collaborator

The deck's PlanModeBridge.#handlePlanPropose now passes the SDK's listPlanFiles scan to resolveApprovedPlan, so a plan at local://<slug>-plan.md is found even when the SDK can't derive the slug from the propose body (for example, a title containing /). Deck prompt text and protocol comments now describe the slug convention and treat local://PLAN.md only as the plan-mode state default.

Verification

  • bun test apps/server/src/bridge/plan-mode-bridge.test.ts: 22 pass, 0 fail. This includes the new test "propose finds the slug plan file by scan…" and the existing missing-plan-file test.
  • bun run typecheck (protocol, server, web): all exit 0.
  • Manual UI check from the plan: not run.

Closes #37

The deck's `PlanModeBridge.#handlePlanPropose` now passes the SDK's `listPlanFiles` scan to `resolveApprovedPlan`, so a plan at `local://<slug>-plan.md` is found even when the SDK can't derive the slug from the propose body (for example, a title containing `/`). Deck prompt text and protocol comments now describe the slug convention and treat `local://PLAN.md` only as the plan-mode state default. ## Verification - `bun test apps/server/src/bridge/plan-mode-bridge.test.ts`: 22 pass, 0 fail. This includes the new test "propose finds the slug plan file by scan…" and the existing missing-plan-file test. - `bun run typecheck` (protocol, server, web): all exit 0. - Manual UI check from the plan: not run. Closes #37
The deck's plan proposal handler didn't pass `listPlanFiles` to
`resolveApprovedPlan`, so when the SDK couldn't normalize the propose
body (a title containing `/`, or a multi-line body) the only candidate
left was `local://PLAN.md`. Scan the session-local dir like the TUI and
ACP handlers do.

Refs #37

Co-Authored-By: Claude Opus 5.5 via omp-deck
Inbox prompts and protocol comments still named `local://PLAN.md` as
the plan file, contradicting the SDK's slug convention. `PLAN.md` is now
described only as the plan-mode state default, and the stale "before the
rename" wording is gone (approval writes edits in place).

Refs #37

Co-Authored-By: Claude Opus 5.5 via omp-deck
lucas approved these changes 2026-10-20 11:28:16 +02:00
lucas merged commit 69dee5bb26 into main 2026-10-20 11:28:22 +02:00
lucas deleted branch 37-plan-mode-xd-propose-ignores-slug-plan-files-and-only-finds-local-plan-md 2026-10-20 11:28:23 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lucas/omp-deck!43
No description provided.