Files
DemonGatanjieu-Anomalous_Mo…/web/styles/16-activity.css
T
DemonGatanjieuandClaude Opus 5.5 376284e647 feat(activity): log what Anomalous changed on the canvas and in files
A new Activity page on the rail (and the home page's recent list) shows, by day,
what the plugin changed. Record only; undo comes later (AD-018).

- api/activity_log.py keeps the newest 500 entries in the ComfyUI user folder.
  A middleware records this plugin's and Anomalous_TTS's write requests after
  they succeed (including the 200 + {"status": "error"} style as failure), from
  one route table; the log never fails the request it records.
- activity_canvas.js: a press inside Anomalous snapshots the canvas; the next
  press or key outside it (or the next press inside) logs the difference, so
  every button, drag and dialog that writes nodes is covered and the user's own
  edits are not. Opening another workflow is logged as that. <html> carries an
  Anomalous class and does not count as the plugin's interface.
- activity_diff.js: pure snapshot and difference; activity_log.js: client and
  wording; ui_activity.js: the page (filters, details, find on canvas, clear)
  and the home list.
- Tests: tests/activity_diff.mjs, tests/test_activity_log.py (local).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 00:00:28 +08:00

195 lines
3.6 KiB
CSS

/* Activity log: the activity page and the home page's recent list. */
#anomalous-activity-panel {
flex: 1;
flex-direction: column;
overflow-y: auto;
}
.anomalous-activity {
display: flex;
flex-direction: column;
gap: 12px;
width: min(860px, 100%);
margin: 0 auto;
padding: 20px 24px 32px;
box-sizing: border-box;
}
.anomalous-activity-lead {
margin: 0;
color: #8b8f98;
font-size: 0.82em;
line-height: 1.6;
}
.anomalous-activity-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.anomalous-activity-filters {
display: flex;
gap: 6px;
}
.anomalous-activity-chip,
.anomalous-activity-clear,
.anomalous-activity-locate {
padding: 4px 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
background: transparent;
color: #9ca3af;
font-size: 0.8em;
cursor: pointer;
}
.anomalous-activity-chip:hover,
.anomalous-activity-clear:hover,
.anomalous-activity-locate:hover {
border-color: rgba(255, 255, 255, 0.25);
color: #e5e7eb;
}
.anomalous-activity-chip.active {
border-color: rgba(165, 180, 252, 0.45);
background: rgba(165, 180, 252, 0.12);
color: #e0e7ff;
}
.anomalous-activity-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.anomalous-activity-day {
margin: 10px 0 2px;
color: #6b7280;
font-size: 0.75em;
font-weight: 600;
letter-spacing: 0.4px;
}
.anomalous-activity-entry {
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 9px;
background: rgba(255, 255, 255, 0.025);
}
.anomalous-activity-head {
display: flex;
align-items: baseline;
gap: 10px;
min-width: 0;
padding: 8px 12px;
font-size: 0.85em;
}
.anomalous-activity-head.is-expandable {
cursor: pointer;
}
.anomalous-activity-head.is-expandable:hover {
background: rgba(255, 255, 255, 0.04);
}
.anomalous-activity-time {
flex-shrink: 0;
color: #6b7280;
font-variant-numeric: tabular-nums;
}
.anomalous-activity-source {
flex-shrink: 0;
padding: 0 6px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.06);
color: #9ca3af;
font-size: 0.85em;
}
.anomalous-activity-entry.is-canvas .anomalous-activity-source {
background: rgba(165, 180, 252, 0.14);
color: #c7d2fe;
}
.anomalous-activity-summary {
overflow: hidden;
color: #e5e7eb;
white-space: nowrap;
text-overflow: ellipsis;
}
.anomalous-activity-details {
display: flex;
flex-direction: column;
gap: 2px;
padding: 0 12px 10px;
}
.anomalous-activity-details[hidden] {
display: none;
}
.anomalous-activity-change {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
padding: 3px 0;
color: #9ca3af;
font-size: 0.8em;
}
.anomalous-activity-change-text {
flex: 1;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.anomalous-activity-locate {
flex-shrink: 0;
padding: 1px 9px;
}
.anomalous-activity-more,
.anomalous-activity-note {
color: #6b7280;
font-size: 0.78em;
}
.anomalous-activity-empty {
padding: 18px 12px;
color: #6b7280;
font-size: 0.85em;
text-align: center;
}
/* Home page: the latest few, one line each. */
.anomalous-home-recent {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 10px;
}
.anomalous-home-recent-head {
display: flex;
align-items: baseline;
justify-content: space-between;
color: #9ca3af;
font-size: 0.85em;
font-weight: 600;
}
.anomalous-activity-list.is-compact .anomalous-activity-empty {
padding: 10px;
}