Skip to content

feat(dashboard): pending-merge card + OK-to-resync (av-raf.4)#1508

Merged
christso merged 1 commit into
mainfrom
feat/av-raf-dashboard-pending-merge
Jun 25, 2026
Merged

feat(dashboard): pending-merge card + OK-to-resync (av-raf.4)#1508
christso merged 1 commit into
mainfrom
feat/av-raf-dashboard-pending-merge

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Phase 3 — Dashboard pending-merge UX (av-raf.4)

Final phase of the conflict-free results sync without force push epic (av-raf). Builds the Dashboard surface for the Layer 2 human-merge fallback that Phase 2 (#1507) added to core.

What this does

When a results push hits a genuine, non-auto-mergeable conflict, core pushes the local work to a timestamped temp branch (never canonical, never force) and returns a pending_merge block. The Dashboard now:

  • Renders a "Pending merge" card (warn tone) showing the temp branch, contributed run count, and the canonical target.
  • Provides an "Open merge on GitHub ↗" link (compare_url) — GitHub's PR/compare is the conflict surface; AgentV builds no merge/diff/accept UI.
  • Provides an "I merged it — resync" button that calls the confirm-merge endpoint (ancestor-guarded FF pull) to resume canonical sync. A premature click is a safe no-op.

Changes

  • lib/types.ts: snake_case pending_merge block on RemoteStatusResponse.
  • lib/project-sync-status.ts: PendingMergeView (camelCase, translated at boundary); needs_human_merge view gains the pending-merge card content; no "force" wording.
  • lib/api.ts: confirmRemoteResultsMergeApi (scoped + unscoped).
  • components/RunSourceToolbar.tsx: the card + GitHub link + resync button.
  • routes/index.tsx, routes/projects/$projectId.tsx: confirm-merge handlers wired.
  • Tests: pending-merge view for GitHub and non-GitHub remotes.

Verification

  • bun test apps/dashboard/125 pass / 0 fail
  • bunx tsc -b (after core build) → 0 errors
  • bun run lint → clean
  • Browser UAT pending per .agents/verification.md (evidence to agentv-private).

Deferred (non-goal here)

The "Merged remote (auto)" toast needs a precise core wire signal — the available pull+push flags don't reliably distinguish an auto-merge from a normal sync, so it is intentionally left out rather than shipping a misleading label.

Closes av-raf.4.

…sync

Phase 3 of conflict-free results sync (av-raf.4). When a results push hits a
genuine conflict, Layer 2 now pushes local work to a temp branch and returns a
`pending_merge` block. The Dashboard surfaces this as a "Pending merge" card with
an "Open merge on GitHub" link (the PR is the conflict surface — no merge UI in
AgentV) and an "I merged it — resync" button that calls the confirm-merge
endpoint to resume canonical sync.

- types.ts: add snake_case `pending_merge` block to RemoteStatusResponse
- project-sync-status.ts: translate to camelCase PendingMergeView; tailor the
  needs_human_merge view (warn tone, "Pending merge", GitHub merge guidance)
- api.ts: confirmRemoteResultsMergeApi client (scoped + unscoped)
- RunSourceToolbar.tsx: pending-merge card with GitHub link + resync button
- routes: wire confirm-merge handlers in both index and project views
- tests: pending-merge view (GitHub + non-GitHub remotes)

Deferred: "Merged remote (auto)" toast needs a precise core wire signal; the
pull+push heuristic is ambiguous, so it is left out of this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 39cb80d
Status: ✅  Deploy successful!
Preview URL: https://35156818.agentv.pages.dev
Branch Preview URL: https://feat-av-raf-dashboard-pendin.agentv.pages.dev

View logs

@christso christso marked this pull request as ready for review June 25, 2026 00:55
@christso christso merged commit 19bcba3 into main Jun 25, 2026
8 checks passed
@christso christso deleted the feat/av-raf-dashboard-pending-merge branch June 25, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant