mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-03 21:24:05 +00:00
Fixes #12831. Adds a Control UI Activity tab at `/activity` under the Control nav group. The tab derives browser-local, memory-only activity entries from the existing `session.tool` / tool-event delivery path and stores only sanitized summaries, hidden-argument counts, and redacted/truncated output previews. Includes filtering, tool selection, clear, expand/collapse, keyboard-native disclosure rows, auto-follow scrolling, navigation/i18n/docs/changelog coverage, and focused regression tests. Follow-up tracks #54577, #37816, and #47386 remain distinct and open. Verification: - `pnpm ui:i18n:sync` - `git diff --check` - Focused Vitest coverage for Activity, gateway/tool stream, chat item rendering, navigation, and gateway agent events - Desktop/mobile browser smoke for sanitized Activity rendering and header de-duplication - Testbox `pnpm check:changed`: `tbx_01ksen33c79b8rywayf6cxww4r` Thanks @BunsDev.
294 lines
5.5 KiB
CSS
294 lines
5.5 KiB
CSS
.activity-page {
|
|
display: grid;
|
|
grid-template-rows: auto minmax(260px, 1fr);
|
|
align-content: start;
|
|
gap: 16px;
|
|
min-height: min(680px, calc(100vh - 180px));
|
|
}
|
|
|
|
.activity-toolbar {
|
|
display: flex;
|
|
align-items: end;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
.activity-toolbar__count {
|
|
flex: 0 0 auto;
|
|
align-self: center;
|
|
margin-left: auto;
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.activity-field {
|
|
display: grid;
|
|
gap: 5px;
|
|
min-width: 170px;
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.activity-field--search {
|
|
flex: 1 1 260px;
|
|
}
|
|
|
|
.activity-field input,
|
|
.activity-field select {
|
|
min-height: 36px;
|
|
}
|
|
|
|
.activity-status-filters,
|
|
.activity-actions {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.activity-status-filter,
|
|
.activity-autofollow {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
min-height: 36px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 0 10px;
|
|
color: var(--text);
|
|
background: var(--secondary);
|
|
font-size: var(--control-ui-text-sm);
|
|
line-height: 1;
|
|
}
|
|
|
|
.activity-status-filter:focus-within,
|
|
.activity-autofollow:focus-within,
|
|
.activity-entry__summary:focus-visible {
|
|
outline: 2px solid var(--focus);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.activity-status-filter input,
|
|
.activity-autofollow input {
|
|
margin: 0;
|
|
}
|
|
|
|
.activity-status-filter--running:has(input:checked) {
|
|
border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
|
|
background: var(--warn-subtle);
|
|
}
|
|
|
|
.activity-status-filter--done:has(input:checked) {
|
|
border-color: color-mix(in srgb, var(--ok) 42%, var(--border));
|
|
background: var(--ok-subtle);
|
|
}
|
|
|
|
.activity-status-filter--error:has(input:checked) {
|
|
border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
|
|
background: var(--danger-subtle);
|
|
}
|
|
|
|
.activity-stream {
|
|
min-height: 260px;
|
|
max-height: calc(100vh - 310px);
|
|
overflow: auto;
|
|
border-block: 1px solid var(--border);
|
|
background: color-mix(in srgb, var(--panel) 82%, var(--card));
|
|
}
|
|
|
|
.activity-empty {
|
|
display: grid;
|
|
place-items: center;
|
|
min-height: 220px;
|
|
padding: 24px;
|
|
color: var(--muted);
|
|
text-align: center;
|
|
}
|
|
|
|
.activity-entry {
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.activity-entry:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.activity-entry[open] {
|
|
background: color-mix(in srgb, var(--bg-elevated) 48%, transparent);
|
|
}
|
|
|
|
.activity-entry__summary {
|
|
display: grid;
|
|
grid-template-columns: 18px minmax(0, 1fr) auto;
|
|
gap: 10px;
|
|
align-items: center;
|
|
padding: 12px 14px;
|
|
cursor: pointer;
|
|
list-style: none;
|
|
}
|
|
|
|
.activity-entry__summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.activity-entry__summary::marker {
|
|
content: "";
|
|
}
|
|
|
|
.activity-entry__summary:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.activity-entry__chevron {
|
|
display: inline-flex;
|
|
width: 18px;
|
|
height: 18px;
|
|
color: var(--muted);
|
|
transition: transform var(--duration-fast) ease;
|
|
}
|
|
|
|
.activity-entry[open] .activity-entry__chevron {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.activity-entry__chevron svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.activity-entry__main {
|
|
display: grid;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.activity-entry__title,
|
|
.activity-entry__meta,
|
|
.activity-entry__facts {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.activity-entry__tool,
|
|
.activity-entry__text,
|
|
.activity-entry__facts span {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.activity-entry__text {
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
}
|
|
|
|
.activity-entry__meta {
|
|
justify-content: flex-end;
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.activity-status {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 22px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-full);
|
|
padding: 0 8px;
|
|
font-size: 11px;
|
|
font-weight: 650;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.activity-status--running {
|
|
border-color: color-mix(in srgb, var(--warn) 42%, var(--border));
|
|
color: var(--warn);
|
|
}
|
|
|
|
.activity-status--done {
|
|
border-color: color-mix(in srgb, var(--ok) 42%, var(--border));
|
|
color: var(--ok);
|
|
}
|
|
|
|
.activity-status--error {
|
|
border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
|
|
color: var(--danger);
|
|
}
|
|
|
|
.activity-entry__body {
|
|
display: grid;
|
|
gap: 10px;
|
|
padding: 0 14px 14px 42px;
|
|
}
|
|
|
|
.activity-entry__facts {
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
}
|
|
|
|
.activity-entry__facts span {
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 4px 7px;
|
|
background: var(--secondary);
|
|
}
|
|
|
|
.activity-entry__preview {
|
|
max-height: 280px;
|
|
margin: 0;
|
|
overflow: auto;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 10px;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
font-family: var(--mono);
|
|
font-size: var(--control-ui-text-sm);
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.activity-entry__note {
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-sm);
|
|
}
|
|
|
|
@media (max-width: 720px) {
|
|
.activity-page {
|
|
min-height: calc(100vh - 150px);
|
|
}
|
|
|
|
.activity-toolbar__count,
|
|
.activity-entry__meta {
|
|
white-space: normal;
|
|
}
|
|
|
|
.activity-toolbar__count {
|
|
flex-basis: 100%;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.activity-entry__summary {
|
|
grid-template-columns: 18px minmax(0, 1fr);
|
|
gap: 8px;
|
|
}
|
|
|
|
.activity-entry__meta {
|
|
grid-column: 2;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.activity-entry__body {
|
|
padding-left: 42px;
|
|
}
|
|
|
|
.activity-stream {
|
|
max-height: calc(100vh - 360px);
|
|
}
|
|
}
|