FN-5822: wire shared branch-group visibility and merge controls
Add dashboard and API support for viewing shared branch groups and triggering group merge actions. - add branch-group API routes and register them in integrated routers - extend dashboard legacy API client with branch-group fetch and merge-control actions - add BranchGroupCard UI + styles and surface it in task/detail/subtask views - add dashboard/API test coverage for branch-group routes and UI integration points - document branch-group behavior and add a changeset for @runfusion/fusion Files changed: .changeset/fn-5822-branch-group-dashboard.md | 5 + docs/dashboard-guide.md | 31 ++++++ packages/dashboard/app/api/legacy.ts | 54 +++++++++ .../dashboard/app/components/BranchGroupCard.css | 83 ++++++++++++++ .../dashboard/app/components/BranchGroupCard.tsx | 123 +++++++++++++++++++++ .../app/components/SubtaskBreakdownModal.tsx | 3 + packages/dashboard/app/components/TaskCard.tsx | 19 ++++ .../dashboard/app/components/TaskDetailModal.tsx | 4 + .../components/__tests__/BranchGroupCard.test.tsx | 96 ++++++++++++++++ .../__tests__/SubtaskBreakdownModal.test.tsx | 1 + .../app/components/__tests__/TaskCard.test.tsx | 16 ++++ .../components/__tests__/TaskDetailModal.test.tsx | 22 ++++ .../src/__tests__/routes-branch-groups.test.ts | 119 ++++++++++++++++++++ .../src/routes/register-branch-groups-routes.ts | 118 ++++++++++++++++++++ .../src/routes/register-integrated-routers.ts | 13 +++ packages/dashboard/vitest.config.ts | 4 +- 16 files changed, 709 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-5822 Fusion-Task-Lineage: 199c25b8-f6ec-43b4-8fab-509f23fb5ac7
This commit is contained in:
@@ -1112,3 +1112,34 @@ The merge-advance notice includes an explicit **Push to origin** action for the
|
||||
- Non-fast-forward and lease-stale failures surface actionable messaging with Smart Pull.
|
||||
- Every attempt records `mutationType: "push:origin"` run-audit metadata: `integrationBranch`, `remote`, `localSha`, `remoteSha`, `aheadCount`, `behindCount`, `forceWithLease`, `outcome`, optional `stderrPreview`, and `durationMs`.
|
||||
- Push remains explicit user authorization only through dashboard HTTP routes (no scheduler/heartbeat auto-push).
|
||||
|
||||
## Shared branch groups
|
||||
|
||||
The dashboard now exposes branch-group visibility and controls for shared planning/mission branches.
|
||||
|
||||
- `GET /api/branch-groups` lists groups with completion (`landed`/`total`) and tracked PR metadata.
|
||||
- `GET /api/branch-groups/:id` returns group details (shared branch, members, per-member landed state, completion, PR state).
|
||||
- `POST /api/branch-groups/assign` is the supported online grouping path to attach/detach tasks (`{ taskId, groupId|null, branchName? }`).
|
||||
- `POST /api/branch-groups/:id/promote` triggers the engine promotion flow (`promoteBranchGroup`) and returns promotion/PR status.
|
||||
|
||||
UI surfaces:
|
||||
|
||||
- Subtask planning interview shows a grouped indicator when `assignmentMode=shared`.
|
||||
- Task cards show grouped/shared branch metadata for grouped tasks.
|
||||
- Task detail renders a branch-group card with member landed progress.
|
||||
|
||||
The branch-group card is completion-gated: while members are still pending, it shows progress only. PR / merge controls are only revealed after all members are landed into the shared branch. When auto-merge is off, promote/open-PR is explicit user action (no automatic push-to-origin behavior).
|
||||
|
||||
### CLI-onboarding backfill runbook
|
||||
|
||||
Use the assign endpoint to place paused CLI-onboarding tasks into a single shared group rooted on `feature/cli-onboarding`:
|
||||
|
||||
```bash
|
||||
for id in FN-5805 FN-5806 FN-5807 FN-5808 FN-5809 FN-5810 FN-5811 FN-5812 FN-5813 FN-5814 FN-5815 FN-5816; do
|
||||
curl -sS -X POST "http://127.0.0.1:4040/api/branch-groups/assign" \
|
||||
-H 'content-type: application/json' \
|
||||
--data "{\"taskId\":\"$id\",\"branchName\":\"feature/cli-onboarding\"}"
|
||||
done
|
||||
```
|
||||
|
||||
If the endpoint is unavailable on the running dashboard build, the response will be `{"error":"Not found"}` until a build containing the branch-group router is deployed.
|
||||
|
||||
Reference in New Issue
Block a user