web: installable app, diff viewer history, calmer chat

- The diff viewer is a centered panel over a dim scrim (clicking outside closes),
  and the browser Back button closes the open viewer/audit/artifact viewer via a
  modal history entry. Transient sheets opt out (they must never undo an
  in-app navigation on close).
- The page is installable: web app manifest, 192/512/maskable icons, apple
  meta, and a shell service worker that never caches the socket or artifacts.
- Chat: operator bubbles are accent-tinted, agent bubbles neutral with an accent
  edge; the tool summary is a quiet line outside the message; the star and more
  controls are compact 20px corner icons inside the row.
- The Refresh button's tooltip shows the last data arrival (manual or socket),
  per destination.
This commit is contained in:
2026-10-20 01:26:20 +01:00
parent 2a8a5bf334
commit 9a450e0ebb
14 changed files with 259 additions and 23 deletions
+55 -14
View File
@@ -162,33 +162,50 @@
.chat-row-actions > .chat-menu-button,
.chat-row-actions > .chat-menu-panel { pointer-events: auto; }
}
.chat-row-actions button { padding: 3px 10px; font-size: 12px; }
.chat-row-actions .chat-menu-item { padding: 3px 10px; font-size: 12px; }
/* The local star: outline when unstarred, filled and accented when starred. */
.chat-star {
position: absolute;
top: 6px;
right: 8px;
min-width: 26px;
padding: 2px 5px;
top: 5px;
right: 6px;
width: 20px;
height: 20px;
min-width: 0;
min-height: 0;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-control);
background: var(--color-surface);
color: var(--muted);
font-size: 15px;
font-size: 13px;
line-height: 1;
}
.chat-star:hover { color: var(--color-text); }
.chat-star.starred { color: var(--color-accent); }
.chat-row .chat-menu-button {
position: absolute;
right: 8px;
bottom: 6px;
right: 6px;
bottom: 5px;
width: 20px;
height: 20px;
min-width: 0;
min-height: 0;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--color-surface);
border-radius: var(--radius-control);
font-size: 13px;
line-height: 1;
}
/* The row menu opens below the bottom-right button; the open row stacks above
its neighbours so the panel is not covered by the next row. */
.chat-row .chat-menu-panel { top: calc(100% + 4px); bottom: auto; right: 8px; }
.chat-menu-wrap { position: relative; }
.chat-row-actions.chat-menu-wrap { position: absolute; inset: 0; }
.chat-menu-button { min-width: 30px; font-size: 15px; line-height: 1; }
.chat-menu-panel {
position: absolute;
@@ -291,11 +308,32 @@
.chat-turn-user { justify-content: flex-end; }
.chat-turn-agent { justify-content: flex-start; }
.chat-bubble { max-width: min(560px, 100%); padding: 8px 12px; border-radius: var(--radius-card); }
.user-bubble { background: var(--surface-2); border: 1px solid var(--border); }
.agent-bubble { background: var(--surface); border: 1px solid var(--border); }
/* The operator's turns are accent-tinted and right-aligned; the agent's are the
neutral page surface with a quiet accent edge, so the two never look alike. */
.user-bubble {
background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
border-bottom-right-radius: 6px;
}
.agent-bubble {
background: var(--surface);
border: 1px solid var(--border);
border-left: 2px solid color-mix(in srgb, var(--accent) 48%, var(--border));
border-bottom-left-radius: 6px;
}
.chat-client { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.chat-user-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-tools { margin: 4px 0 8px; }
.chat-turn-agent { flex-direction: column; align-items: flex-start; }
/* The tool summary is a quiet line next to the message, not a chip inside it. */
.chat-tools { margin: 2px 0 10px; }
.chat-tool-chip {
padding: 2px 0;
border: 0;
background: transparent;
color: var(--muted);
font-size: 11px;
}
.chat-tool-chip:hover { color: var(--color-text); }
.chat-reasoning { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.chat-reasoning-toggle {
@@ -325,11 +363,14 @@
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
background: var(--surface-2);
font-size: 12px;
padding: 2px 0;
border: 0;
background: transparent;
color: var(--muted);
font-size: 11px;
cursor: pointer;
}
.chat-tool-chip:hover { color: var(--color-text); }
.chat-tool-chip-failed { border-color: var(--bad); color: var(--bad); }
.chat-tool-icon { font-size: 12px; line-height: 1; }
.chat-tool-icon-failed { color: var(--bad); }