open-swe/ui/src/components/agents
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
..
messages chore: sync upstream/main, defer #1621 modular webhooks (#81) 2026-06-30 16:45:19 -04:00
ported feat: plan mode with model-driven entry and collaborative review (#1580) 2026-06-23 12:06:58 -07:00
subagents fix(ui): resolve eslint errors in dashboard components (#1538) 2026-06-15 17:29:38 -07:00
utils chore: cherry-pick clean upstream fixes + cherry-pick runbook (#117) 2026-07-03 11:48:40 -04:00
AgentGitPanel.tsx chore: sync upstream/main, defer #1621 modular webhooks (#81) 2026-06-30 16:45:19 -04:00
AgentPromptBar.tsx feat: add Agents chat UI for cloud threads (#1323) 2026-05-22 18:15:59 +00:00
AgentRunCard.tsx feat: track PR lifecycle state per thread for sidebar (#1492) 2026-06-11 12:21:59 -07:00
AgentsHome.tsx feat: plan mode with model-driven entry and collaborative review (#1580) 2026-06-23 12:06:58 -07:00
AgentsSidebar.tsx chore: sync upstream/main, defer #1621 modular webhooks (#81) 2026-06-30 16:45:19 -04:00
AgentsThreadsPage.tsx fix: optimize agent thread lists (#1570) 2026-06-18 10:09:22 -07:00
AgentThreadView.tsx feat: Add dashboard UI for workflow push approvals (#103) 2026-07-02 02:16:28 -04:00
AutomationEditor.tsx feat: post scheduled-run report to a configured Slack channel (#83) 2026-06-30 17:34:52 -04:00
AutomationsList.tsx feat: add automation template gallery (#1608) 2026-06-25 10:36:34 -07:00
AutomationTemplates.tsx feat: add automation template gallery (#1608) 2026-06-25 10:36:34 -07:00
OnboardingDialog.tsx Normalize frontend typography + enable font smoothing (#1546) 2026-06-16 14:56:11 -07:00
PlanReview.tsx feat: editable plan mode — owner hand-edits the plan before approval (#1610, #80) (#130) 2026-07-08 18:44:56 -04:00
PrHeader.tsx chore: sync upstream/main, defer #1621 modular webhooks (#81) 2026-06-30 16:45:19 -04:00
RepoSelector.tsx fix: stabilize agent selector defaults (#1414) 2026-06-04 21:06:25 +00:00
ReviewChat.tsx fix: reviewer reviews full diff; fix review UI scroll + dark-mode composer (#1575) 2026-06-18 19:24:52 -07:00
ReviewCommentsMenu.tsx feat: inline PR comments in the reviews UI (#1600) 2026-06-23 16:01:46 -07:00
ReviewMainBody.tsx chore: cherry-pick clean upstream fixes + cherry-pick runbook (#117) 2026-07-03 11:48:40 -04:00
ReviewSidebar.tsx chore: cherry-pick clean upstream fixes + cherry-pick runbook (#117) 2026-07-03 11:48:40 -04:00
ReviewTab.tsx feat: relocate review chunks and embed review in git panel (#1590) 2026-06-23 12:27:51 -07:00
ScheduleTriggerPicker.tsx Normalize frontend typography + enable font smoothing (#1546) 2026-06-16 14:56:11 -07:00
SidebarFilterMenu.tsx chore: cherry-pick clean upstream fixes + cherry-pick runbook (#117) 2026-07-03 11:48:40 -04:00
WorkflowApprovalCard.tsx feat: Add dashboard UI for workflow push approvals (#103) 2026-07-02 02:16:28 -04:00
z-index.ts feat: add Agents chat UI for cloud threads (#1323) 2026-05-22 18:15:59 +00:00