feat(ui): cellule agent stoppé — état explicite + reopen from scratch (#197, QA verte)

Surface UI du LayoutGrid pour un agent de cellule stoppé:

- Affichage d'un état explicite quand runtimeState vaut « stopped » ou « failedStart », avec actions refresh / reopen from scratch (freshStart) et état restarting pendant la relance.

- theme.css: styles .stopped-agent-cell (boutons primary/secondary, états disabled).

Consomme le contrat runtime issu de #196 (AgentRuntimeState stopped/failedStart, freshStart) déjà présent dans develop; aucune modification runtime ici.

Tests QA verts: LayoutGrid.test.tsx, LayoutGrid.chat.test.tsx (rejoué aussi: agent_lifecycle launch_fresh_start_ignores_existing_conversation_id_and_mints_new_one).
This commit is contained in:
2026-08-12 15:34:53 +02:00
parent 7b7b2cec85
commit cdb395307b
4 changed files with 689 additions and 5 deletions

View File

@ -101,3 +101,135 @@
left: 100%;
}
}
@layer components {
.stopped-agent-cell {
position: absolute;
inset: 0;
z-index: 1;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
padding: 28px 12px 12px;
background: var(--color-canvas);
color: var(--color-content);
}
.stopped-agent-cell__header {
display: flex;
min-width: 0;
align-items: flex-start;
gap: 8px;
}
.stopped-agent-cell__name {
min-width: 0;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 650;
line-height: 1.35;
}
.stopped-agent-cell__badge {
margin-left: auto;
flex-shrink: 0;
border: 1px solid var(--color-warning);
border-radius: 3px;
background: rgb(210 153 34 / 16%);
color: var(--color-warning);
padding: 1px 6px;
font-size: 11px;
font-weight: 650;
line-height: 1.35;
}
.stopped-agent-cell__content {
min-width: 0;
margin-top: 18px;
}
.stopped-agent-cell__message {
margin: 0;
font-size: 13px;
font-weight: 600;
line-height: 1.35;
}
.stopped-agent-cell__help {
margin: 4px 0 0;
color: var(--color-muted);
font-size: 12px;
line-height: 1.4;
}
.stopped-agent-cell__actions {
display: flex;
gap: 8px;
margin-top: auto;
}
.stopped-agent-cell__button {
min-height: 28px;
border: 1px solid var(--color-border-strong);
border-radius: 3px;
background: var(--color-surface);
color: var(--color-content);
padding: 3px 10px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
.stopped-agent-cell__button:hover:not(:disabled) {
background: var(--color-raised);
}
.stopped-agent-cell__button:disabled {
color: var(--color-faint);
cursor: default;
opacity: 0.75;
}
.stopped-agent-cell__button--primary {
border-color: var(--color-primary);
background: var(--color-primary);
color: var(--color-on-primary);
}
.stopped-agent-cell__button--primary:hover:not(:disabled) {
background: var(--color-primary-hover);
}
@media (max-width: 640px) {
.stopped-agent-cell {
padding: 34px 10px 10px;
}
.stopped-agent-cell__header {
flex-direction: column;
gap: 4px;
}
.stopped-agent-cell__badge {
margin-left: 0;
align-self: flex-start;
}
.stopped-agent-cell__content {
margin-top: 12px;
}
.stopped-agent-cell__actions {
flex-direction: column;
gap: 6px;
}
.stopped-agent-cell__button {
width: 100%;
}
}
}