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:
@@ -101,6 +101,7 @@ function createMockMissionStore(options?: {
|
||||
|
||||
return {
|
||||
...mission,
|
||||
linkedGoals: [],
|
||||
milestones: missionMilestones.map((m) => ({
|
||||
...m,
|
||||
slices: Array.from(slices.values())
|
||||
@@ -1420,6 +1421,9 @@ describe("Mission API", () => {
|
||||
expect(res.body.title).toBe("Test Mission");
|
||||
expect(res.body).toHaveProperty("milestones");
|
||||
expect(Array.isArray(res.body.milestones)).toBe(true);
|
||||
expect(res.body).toHaveProperty("linkedGoals");
|
||||
expect(Array.isArray(res.body.linkedGoals)).toBe(true);
|
||||
expect(res.body.linkedGoals).toEqual([]);
|
||||
expect(res.body.milestones).toHaveLength(1);
|
||||
expect(res.body.milestones[0]).toHaveProperty("slices");
|
||||
expect(Array.isArray(res.body.milestones[0].slices)).toBe(true);
|
||||
|
||||
@@ -979,7 +979,10 @@ export function createMissionRouter(
|
||||
throw notFound("Mission not found");
|
||||
}
|
||||
|
||||
res.json(mission);
|
||||
res.json({
|
||||
...mission,
|
||||
linkedGoals: mission.linkedGoals ?? [],
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user