open-swe/ui/src/components
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
..
agents feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80) (#130) 2026-07-08 18:44:56 -04:00
ui feat(open-swe): stream agent chat via @langchain/react v2 protocol (#1475) 2026-06-11 09:54:35 -07:00
AgentInstructionsPanel.tsx fix(ui): resolve eslint errors in dashboard components (#1538) 2026-06-15 17:29:38 -07:00
AppShell.tsx Normalize frontend typography + enable font smoothing (#1546) 2026-06-16 14:56:11 -07:00
AppSidebar.tsx feat: PR review page (#1495) 2026-06-11 16:11:10 -07:00
InstructionsEditor.tsx feat: repo-scoped dynamic sandbox snapshots (#1595) 2026-06-23 12:24:11 -07:00
PwaUpdateToast.tsx feat: prompt-mode PWA update toast instead of autoUpdate reload (#102) 2026-07-01 21:53:28 -04:00
RepoSnapshotsPanel.tsx feat: repo-scoped dynamic sandbox snapshots (#1595) 2026-06-23 12:24:11 -07:00
ReviewStylesPanel.tsx fix: review style prompts UX, stale runs, and OAuth refresh (#1321) 2026-05-21 17:44:04 +00:00
sidebar-layout.tsx feat: inline PR comments in the reviews UI (#1600) 2026-06-23 16:01:46 -07:00
SidebarUserMenu.tsx fix(ui): resolve eslint errors in dashboard components (#1538) 2026-06-15 17:29:38 -07:00