Finishing agent merge
This commit is contained in:
@@ -2,6 +2,7 @@ interface StoryTodos {
|
||||
storyId: string;
|
||||
storyName: string | null;
|
||||
items: string[];
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
interface TodoPanelProps {
|
||||
@@ -29,6 +30,7 @@ export function TodoPanel({
|
||||
onRefresh,
|
||||
}: TodoPanelProps) {
|
||||
const totalTodos = todos.reduce((sum, s) => sum + s.items.length, 0);
|
||||
const hasErrors = todos.some((s) => s.error);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -127,7 +129,7 @@ export function TodoPanel({
|
||||
Retry
|
||||
</button>
|
||||
</div>
|
||||
) : totalTodos === 0 ? (
|
||||
) : totalTodos === 0 && !hasErrors ? (
|
||||
<div style={{ fontSize: "0.85em", color: "#7ee787" }}>
|
||||
All acceptance criteria complete.
|
||||
</div>
|
||||
@@ -140,7 +142,7 @@ export function TodoPanel({
|
||||
}}
|
||||
>
|
||||
{todos
|
||||
.filter((s) => s.items.length > 0)
|
||||
.filter((s) => s.items.length > 0 || s.error)
|
||||
.map((story) => (
|
||||
<div key={story.storyId}>
|
||||
<div
|
||||
@@ -152,18 +154,32 @@ export function TodoPanel({
|
||||
>
|
||||
{story.storyName ?? story.storyId}
|
||||
</div>
|
||||
<ul
|
||||
style={{
|
||||
margin: "0 0 0 16px",
|
||||
padding: 0,
|
||||
fontSize: "0.85em",
|
||||
color: "#ccc",
|
||||
}}
|
||||
>
|
||||
{story.items.map((item) => (
|
||||
<li key={`todo-${story.storyId}-${item}`}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
{story.error && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: "0.8em",
|
||||
color: "#ff7b72",
|
||||
marginBottom: "4px",
|
||||
}}
|
||||
data-testid={`story-error-${story.storyId}`}
|
||||
>
|
||||
{story.error}
|
||||
</div>
|
||||
)}
|
||||
{story.items.length > 0 && (
|
||||
<ul
|
||||
style={{
|
||||
margin: "0 0 0 16px",
|
||||
padding: 0,
|
||||
fontSize: "0.85em",
|
||||
color: "#ccc",
|
||||
}}
|
||||
>
|
||||
{story.items.map((item) => (
|
||||
<li key={`todo-${story.storyId}-${item}`}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user