Dashboard: surface force-merge events distinctly from normal approval merges #141
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As the operator, I want force-merged PRs (the MAX_ROUNDS auto-merge path from #137) to be visually distinct on the dashboard so that I can spot at a glance which merges landed without a clean reviewer approval and decide whether to follow up.
Context
After #137, hitting
MAX_ROUNDS=3REQUEST_CHANGES flips the normal "author fixes findings, reviewer approves, boss merges" chain into "boss squash-merges despite the open REQUEST_CHANGES". The two paths produce the same squash commit from outside, so the dashboard's task history can't distinguish them. That's fine for the majority case (force-merge should be rare), but when it does fire:Acceptance criteria
Event stream
src/webhook-handlers.ts::handleChangesRequestedcurrently callsdispatchMerge(repo, pr, { force: true }). Extend the call-site (ordispatchMergeitself) to emit aforce_merge_dispatchedevent onto the SSE stream alongside the normal dispatch event. Payload:{ repo, pr_number, reviewer, rounds }.TaskRecordfor the boss merge task gains an optional flag — e.g.force_merge: true— so the history surface can render it without re-fetching the PR. Wire it throughworker.enqueuemetadata if the simplest path lets us.UI
⚠ force-mergednext to the task title. Colour:--warningtoken (same as the disconnect banner's accent).by_daystrip: force-merged tasks count ascancelledfor success-rate purposes? No — force-merge is a successful operator-approved terminator. Render them as successes but with a tiny warning dot overlay. Or, cleaner: add aforce_mergedint field to the/statsby-day/by-agent aggregates and show it as a small subtitle ("23 tasks · 2 force-merged") on agent rows.Tests
dashboard-browser.test.ts: seed a task withforce_merge: true, assert the badge renders + tooltip has the right copy.dashboard-smoke.test.ts: structural check for the badge element.stats.test.ts: if the stats aggregates grow aforce_mergedcount, one fixture task with the flag set, assert the aggregate increments.Out of scope
References
src/review-loop.ts,src/webhook-ci.ts,src/webhook-handlers.ts).src/main.ts::broadcastSSE,logSDKMessage.src/main.ts::handleStats,src/task-store.ts.Dependencies
main.