Files
archie/ui/src/tasks/tasks.css
T
sam 0d500a4ca9 feat(webui): lifecycle-safe task controls with atomic retry and archive
Add cancel/stop/approve/reject/retry/abandon/archive to the dashboard task
action matrix, each guarded by an optimistic status check against the
store. Retry accounting (RetryCount, max_retries) is now atomic with the
status transition instead of a separate write. Archive removes a terminal
task's local record with a fail-safe audit event first. Add always-labelled
responsive navigation, mobile Jump-to search, and versioned Setup-complete
dismissal.

Fixes #53
2026-08-09 01:25:51 +10:00

298 lines
5.0 KiB
CSS

/* Tasks-only styles. */
.task-summary {
margin-bottom: var(--sp-5);
}
.task-filters {
display: flex;
gap: var(--sp-2);
align-items: center;
flex-wrap: wrap;
}
.task-search,
.task-filter {
font: inherit;
font-size: var(--text-sm);
color: var(--fg);
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
padding: var(--sp-2) var(--sp-3);
}
.task-search {
width: 220px;
}
.task-search:focus,
.task-filter:focus {
outline: 2px solid var(--accent-soft);
outline-offset: 1px;
}
.task-row {
cursor: pointer;
}
.task-expand {
width: 1.5rem;
height: 1.5rem;
margin-right: var(--sp-2);
padding: 0;
color: var(--fg-muted);
background: transparent;
border: 1px solid var(--border);
border-radius: 50%;
font: inherit;
line-height: 1;
cursor: pointer;
}
.task-expand:hover,
.task-expand:focus-visible {
color: var(--fg);
border-color: var(--accent);
}
.activity-row {
cursor: pointer;
}
.activity-row:hover td,
.activity-row:focus td {
background: var(--surface-hover);
}
.activity-row:focus {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
.task-source-link {
color: var(--accent);
text-decoration: none;
}
.task-source-link:hover {
text-decoration: underline;
}
.task-actions {
display: flex;
gap: var(--sp-1);
white-space: nowrap;
flex-wrap: wrap;
}
.btn-small {
padding: var(--sp-1) var(--sp-2);
font-size: var(--text-xs);
}
.btn-quiet {
color: var(--fg-muted);
}
.task-action-error {
max-width: 180px;
color: var(--danger);
font-size: var(--text-xs);
white-space: normal;
}
.task-decision {
margin-bottom: var(--sp-4);
padding: var(--sp-3);
border-left: 3px solid var(--accent);
background: var(--surface);
}
.task-detail-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--sp-3);
margin-bottom: var(--sp-4);
padding-bottom: var(--sp-3);
border-bottom: 1px solid var(--hairline);
}
.task-decision-title {
color: var(--fg);
font-weight: 600;
}
.task-decision-plan {
margin-top: var(--sp-2);
color: var(--fg-muted);
white-space: pre-wrap;
}
/* On phones the filter controls take their own row and full width instead of
crowding the card title. */
@media (max-width: 700px) {
.task-filters {
width: 100%;
}
.task-search {
width: 100%;
}
.task-filter {
flex: 1 1 100%;
}
/* The task table becomes stacked cards instead of forcing the action
column off-screen. It remains a semantic table for assistive technology;
only its visual layout changes. */
.table-scroll:has(.task-row) {
overflow: visible;
}
.table:has(.task-row),
.table:has(.task-row) tbody {
display: block;
}
.table-scroll > .table:has(.task-row) {
width: 100%;
min-width: 0;
}
.table:has(.task-row) thead {
display: none;
}
.task-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--sp-2) var(--sp-4);
margin-bottom: var(--sp-3);
padding: var(--sp-3);
border: 1px solid var(--hairline);
border-radius: var(--radius-lg);
background: var(--surface-glass);
}
.task-row td {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--sp-2);
padding: var(--sp-1) 0;
border: 0;
text-align: right;
}
.task-row td::before {
content: attr(data-label);
color: var(--fg-subtle);
font-size: var(--text-xs);
font-weight: 500;
text-align: left;
}
.task-row td:nth-child(3),
.task-row td:last-child {
grid-column: 1 / -1;
}
.task-row td:last-child {
align-items: flex-start;
}
.task-timeline-row,
.task-timeline-row td {
display: block;
width: 100%;
}
.task-timeline-row td {
margin: calc(var(--sp-2) * -1) 0 var(--sp-4);
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.task-detail-actions {
align-items: flex-start;
flex-direction: column;
}
}
@media (max-width: 480px) {
.task-row {
grid-template-columns: 1fr;
}
.task-row td:nth-child(3),
.task-row td:last-child {
grid-column: auto;
}
}
.task-timeline-row td {
background: var(--bg-raised);
padding: var(--sp-4);
}
.task-timeline-loading {
color: var(--fg-muted);
font-size: var(--text-sm);
}
.task-timeline-error {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--sp-2);
}
.task-timeline-error .task-timeline-title {
font-weight: 500;
color: var(--fg);
}
.task-timeline {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--sp-3);
}
.task-timeline-entry {
display: flex;
gap: var(--sp-3);
align-items: flex-start;
}
.task-timeline-dot {
width: 8px;
height: 8px;
margin-top: 5px;
flex: none;
border-radius: 50%;
background: var(--accent);
}
.task-timeline-kind {
font-size: var(--text-sm);
font-weight: 500;
color: var(--fg);
}
.task-timeline-detail {
font-size: var(--text-xs);
color: var(--fg-muted);
margin-top: 2px;
}
.task-timeline-when {
font-size: var(--text-xs);
color: var(--fg-subtle);
margin-top: 2px;
}