FN-5897: surface linked goals in mission read paths
Expose mission-linked goals across mission detail surfaces. - load linked goal records into mission hierarchy reads in core and return them from the mission detail API - show linked goals in mission detail views, add goal-chip navigation, and anchor highlighted goal cards in GoalsView - extend CLI mission output, docs, tests, and add a published changeset for the new read-path support Files changed: .changeset/fn-5897-linked-goals-read-paths.md | 5 +++ docs/missions.md | 6 ++- packages/cli/src/__tests__/extension.test.ts | 48 +++++++++++++++++++++- packages/cli/src/extension.ts | 10 +++++ packages/core/src/__tests__/mission-store.test.ts | 14 +++++++ packages/core/src/mission-store.ts | 29 +++++++++++++ packages/core/src/mission-types.ts | 4 ++ packages/dashboard/app/App.tsx | 16 +++++++- packages/dashboard/app/components/GoalsView.css | 6 +++ packages/dashboard/app/components/GoalsView.tsx | 42 +++++++++++++++++-- packages/dashboard/app/components/MissionManager.css | 44 ++++++++++++++++++++ packages/dashboard/app/components/MissionManager.tsx | 31 +++++++++++++- packages/dashboard/app/components/__tests__/GoalsView.test.tsx | 31 ++++++++++++++ packages/dashboard/app/components/__tests__/MissionManager.test.tsx | 45 ++++++++++++++++++++ packages/dashboard/app/components/mission-types.ts | 2 + packages/dashboard/src/__tests__/mission-e2e.test.ts | 4 ++ packages/dashboard/src/mission-routes.ts | 5 ++- 17 files changed, 332 insertions(+), 10 deletions(-) Fusion-Task-Id: FN-5897 Fusion-Task-Lineage: 5176270d-9885-447a-845b-4e0d69d531a0
This commit is contained in:
@@ -107,18 +107,20 @@ Fusion surfaces the persisted mission↔goal linkage through REST, CLI, and pi-e
|
||||
|
||||
| Endpoint | Purpose |
|
||||
|---|---|
|
||||
| `GET /api/missions/:missionId` | Return `MissionWithHierarchy`, including `linkedGoals` as an always-present array of `Goal` objects for the selected mission. |
|
||||
| `GET /api/missions/:missionId/goals` | List linked goals for a mission. Returns `{ goals }`. |
|
||||
| `PUT /api/missions/:missionId/goals` | Replace the full linked-goal set with body `{ goalIds: string[] }`. Duplicate ids are deduplicated before reconciliation. |
|
||||
| `POST /api/missions/:missionId/goals/:goalId` | Idempotently link one goal to a mission. |
|
||||
| `DELETE /api/missions/:missionId/goals/:goalId` | Idempotently unlink one goal from a mission. |
|
||||
|
||||
All four endpoints validate mission/goal identifier formats and return `404` for missing mission/goal rows.
|
||||
The mission detail payload keeps `linkedGoals` separate from the milestone tree so read paths can surface strategy context without traversing slices/features. All five endpoints validate mission/goal identifier formats and return `404` for missing mission/goal rows.
|
||||
|
||||
### CLI
|
||||
|
||||
- `fn mission goals <mission-id>` — list linked goals for a mission.
|
||||
- `fn mission link-goal <mission-id> <goal-id>` — idempotently link a goal.
|
||||
- `fn mission unlink-goal <mission-id> <goal-id>` — idempotently unlink a goal.
|
||||
- Mission detail screens in the dashboard render linked-goal chips in the mission header; selecting a chip opens the Goals view and scrolls/highlights the anchored goal card.
|
||||
|
||||
## Mission Planning Tools (pi extension)
|
||||
|
||||
@@ -128,7 +130,7 @@ The canonical per-parameter tool reference lives in `packages/cli/skill/fusion/r
|
||||
|---|---|
|
||||
| `fn_mission_create` | Create a mission with title/description, optional `baseBranch`, and optional auto-advance behavior. |
|
||||
| `fn_mission_list` | List missions and their current status. |
|
||||
| `fn_mission_show` | Show mission details with milestone/slice/feature hierarchy, including milestone/feature acceptance criteria and slice verification when present. |
|
||||
| `fn_mission_show` | Show mission details with milestone/slice/feature hierarchy, including a **Linked Goals** section plus milestone/feature acceptance criteria and slice verification when present. |
|
||||
| `fn_mission_list_goals` | List the goals linked to a mission. |
|
||||
| `fn_mission_link_goal` | Idempotently link a goal to a mission. |
|
||||
| `fn_mission_unlink_goal` | Idempotently unlink a goal from a mission. |
|
||||
|
||||
Reference in New Issue
Block a user