Story 31: View Upcoming Stories
Add GET /workflow/upcoming endpoint that reads .story_kit/stories/upcoming/ and returns story IDs with names parsed from frontmatter. Add UpcomingPanel component wired into Chat view with loading, error, empty, and list states. 12 new tests (3 backend, 9 frontend) all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,28 @@ describe("workflowApi", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("getUpcomingStories", () => {
|
||||
it("sends GET to /workflow/upcoming", async () => {
|
||||
const response = {
|
||||
stories: [
|
||||
{ story_id: "31_view_upcoming", name: "View Upcoming" },
|
||||
{ story_id: "32_worktree", name: null },
|
||||
],
|
||||
};
|
||||
mockFetch.mockResolvedValueOnce(okResponse(response));
|
||||
|
||||
const result = await workflowApi.getUpcomingStories();
|
||||
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
"/api/workflow/upcoming",
|
||||
expect.objectContaining({}),
|
||||
);
|
||||
expect(result.stories).toHaveLength(2);
|
||||
expect(result.stories[0].name).toBe("View Upcoming");
|
||||
expect(result.stories[1].name).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("getReviewQueue", () => {
|
||||
it("sends GET to /workflow/review", async () => {
|
||||
mockFetch.mockResolvedValueOnce(
|
||||
|
||||
Reference in New Issue
Block a user