open-swe/ui/src
seahaven-openswe[bot] a53a96d37b
feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80) (#130)
* feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80)

Adds a PUT /dashboard/api/plan/{thread_id} endpoint and PlanReview UI edit
mode so the thread owner can refine the published plan markdown by hand. The
edited markdown is re-published as "ready" (preserving reviewer comments),
mirrored into the sandbox plan.md, and handed to the agent as the source of
truth on approve.

Approve now reads the published plan content strictly (raise_on_error=True)
so a transient store failure aborts instead of silently dropping an edited
plan, matching the comment-read contract.

The banner-overlap fix (collapsed git-panel clearing the "Review plan" link)
was already ported in #128; this picks up the remaining edit-mode pieces.

Refs #80

* fix(plan): make approve_plan idempotent, dispatch before persisting, fix comment count

SH-128-03: approve_plan set status APPROVED before dispatching the follow-up
run and had no already-approved guard, so a failed dispatch left the plan stuck
approved-but-undispatched and a double-submit double-dispatched + double-posted
the Slack notice. And the Slack notice counted len(comments) including empty
comments _format_comments filters out.

- Return 409 when the plan is already approved (idempotent double-click/retry).
- Dispatch the implementation run BEFORE persisting APPROVED so a dispatch
  failure leaves the plan re-approvable. _dispatch_followup passes plan_mode
  explicitly, so the run is unaffected by the reorder.
- Count only non-empty comments in the Slack approval notice.

Fixed here (not on #128) because #128's approve_plan is rewritten on this
branch; #129 inherits it. Adds tests for the 409, the filtered count, and the
dispatch-before-status ordering.

---------

Co-authored-by: seahaven-openswe[bot] <296972425+seahaven-openswe[bot]@users.noreply.github.com>
Co-authored-by: Adam Moussa <adam@seahavenind.com>
2026-07-08 18:44:56 -04:00
..
components feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80) (#130) 2026-07-08 18:44:56 -04:00
lib feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80) (#130) 2026-07-08 18:44:56 -04:00
routes chore: cherry-pick deferred reviewer-misc upstream commits (#127) 2026-07-08 17:28:21 -04:00
styles feat(ui): reintroduce subtle blue accents on greyscale frontend (#1555) 2026-06-16 19:41:19 -07:00
client.tsx chore: cherry-pick clean upstream fixes + cherry-pick runbook (#117) 2026-07-03 11:48:40 -04:00
logo.svg feat: open-swe dashboard for per-user profile config (#1302) 2026-05-15 11:23:53 -07:00
router.tsx feat: open-swe dashboard for per-user profile config (#1302) 2026-05-15 11:23:53 -07:00
routeTree.gen.ts chore: cherry-pick deferred reviewer-misc upstream commits (#127) 2026-07-08 17:28:21 -04:00
styles.css Neutralize frontend: blue accents → neutral aesthetic (#1553) 2026-06-16 15:49:33 -07:00