Files
archie/ui/src/tasks/tasks.css
T
sam 1bead14717 fix(webui): wire the Logs page to per-task attempt-log detail
GET /api/tasks/{id}/logs was fully working -- internal/logging's
decode() already captures every JSON field generically (stage,
tokens, iterations, model, everything) -- but nothing in the
dashboard ever called it. The only Logs page hit the daemon-wide
feed, which never carries this per-stage/per-agent-run detail in the
first place. An operator could never see why a task took as long as
it did or its token spend breakdown, even though the daemon already
recorded and could already serve it.

Adds a collapsible attempt-log section to each task's existing
timeline drill-down, reusing the daemon-wide page's row rendering
(extracted to ui/src/base/log-row.js as the shared second consumer).
2026-09-02 21:26:52 +10:00

323 lines
5.4 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;
}
.task-logs-section {
margin-top: var(--sp-4);
}
.task-logs-section .task-decision-title {
display: flex;
align-items: center;
justify-content: space-between;
}
.task-log-list {
max-height: 40vh;
overflow-y: auto;
font-family: var(--font-mono);
font-size: var(--text-xs);
border-top: 1px solid var(--border);
margin-top: var(--sp-2);
}
.task-log-loading,
.task-log-error {
padding: var(--sp-3) 0;
color: var(--fg-muted);
}
/* 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;
}