Merge story-31: View Upcoming Stories

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

# Conflicts:
#	frontend/src/api/workflow.ts
#	frontend/src/components/Chat.test.tsx
#	frontend/src/components/Chat.tsx
#	server/src/http/workflow.rs
This commit is contained in:
Dave
2026-02-19 15:54:02 +00:00
11 changed files with 521 additions and 2 deletions

View File

@@ -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(

View File

@@ -72,6 +72,15 @@ export interface TodoListResponse {
stories: StoryTodosResponse[];
}
export interface UpcomingStory {
story_id: string;
name: string | null;
}
export interface UpcomingStoriesResponse {
stories: UpcomingStory[];
}
const DEFAULT_API_BASE = "/api";
function buildApiUrl(path: string, baseUrl = DEFAULT_API_BASE): string {
@@ -134,6 +143,13 @@ export const workflowApi = {
getReviewQueueAll(baseUrl?: string) {
return requestJson<ReviewListResponse>("/workflow/review/all", {}, baseUrl);
},
getUpcomingStories(baseUrl?: string) {
return requestJson<UpcomingStoriesResponse>(
"/workflow/upcoming",
{},
baseUrl,
);
},
ensureAcceptance(payload: AcceptanceRequest, baseUrl?: string) {
return requestJson<boolean>(
"/workflow/acceptance/ensure",