story-kit: merge 342_story_web_ui_button_to_delete_a_story_from_the_pipeline

This commit is contained in:
Dave
2026-03-20 09:10:56 +00:00
parent 3cfe25f97a
commit 60e1d7bf64
5 changed files with 180 additions and 6 deletions
+14
View File
@@ -213,6 +213,15 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
const [selectedWorkItemId, setSelectedWorkItemId] = useState<string | null>(
null,
);
const handleDeleteItem = React.useCallback(
(item: import("../api/client").PipelineStageItem) => {
api.deleteStory(item.story_id).catch((err: unknown) => {
console.error("Failed to delete story:", err);
});
},
[],
);
const [queuedMessages, setQueuedMessages] = useState<
{ id: string; text: string }[]
>([]);
@@ -1089,6 +1098,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
costs={storyTokenCosts}
onItemClick={(item) => setSelectedWorkItemId(item.story_id)}
onStopAgent={handleStopAgent}
onDeleteItem={handleDeleteItem}
/>
<StagePanel
title="To Merge"
@@ -1096,6 +1106,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
costs={storyTokenCosts}
onItemClick={(item) => setSelectedWorkItemId(item.story_id)}
onStopAgent={handleStopAgent}
onDeleteItem={handleDeleteItem}
/>
<StagePanel
title="QA"
@@ -1103,6 +1114,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
costs={storyTokenCosts}
onItemClick={(item) => setSelectedWorkItemId(item.story_id)}
onStopAgent={handleStopAgent}
onDeleteItem={handleDeleteItem}
/>
<StagePanel
title="Current"
@@ -1113,6 +1125,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
busyAgentNames={busyAgentNames}
onStartAgent={handleStartAgent}
onStopAgent={handleStopAgent}
onDeleteItem={handleDeleteItem}
/>
<StagePanel
title="Backlog"
@@ -1123,6 +1136,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
busyAgentNames={busyAgentNames}
onStartAgent={handleStartAgent}
onStopAgent={handleStopAgent}
onDeleteItem={handleDeleteItem}
/>
<ServerLogsPanel logs={serverLogs} />
</>