mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 16:12:11 +00:00
Rebuild the Coach thinking row as one calm line
While a turn runs the Coach now shows a single row: a brain icon, the current step in the answer's text size with a shimmer passing through it and fading dots, and a chevron once there are steps to open. There is no running clock any more, and the interim table preview with its sparkline no longer renders under the row; interim tables stay in state until the answer's own results show them. When the answer is done the row reads "Thought process · N steps" with proper plurals, and "Answer needed" while a clarifying question waits. It never opens by itself, and a row opened during the run closes when the turn ends. Opened, the steps form a vertical list with an icon per kind of work on a thin connector line, and a reasoning round shows its summary under its title. The shimmer and the dots are a `text-shimmer` utility and a reusable WaitingText component, both still under reduced motion. The demo's write block now carries `meta.errorCode: "demo.readOnly"`, listed in the error-code catalogue, and the Coach answers it with an honest line instead of the provider-outage copy. Removes the interim preview component, the elapsed-seconds and summary helpers, and their message keys in all seven locales.
This commit is contained in:
1 parent
3df5754ab1
commit
dd72634791
32 files changed
+1069
-1312
No files matched your search
@@ -1032,6 +1032,60 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Live status text ────────────────────────────────────────────────
|
||||
* `text-shimmer`: a band of foreground light sweeps through muted text, for a
|
||||
* line that says something is still in progress (the Coach's thinking row).
|
||||
* The gradient is clipped to the glyphs; the band travels left to right once
|
||||
* every two seconds. Under reduced motion the text is plain muted text.
|
||||
*
|
||||
* `waiting-dot`: one of three trailing dots that fade in turn (the caller
|
||||
* staggers them by 0.2 s). Under reduced motion they stand still at full
|
||||
* opacity, which the global backstop below would not give them: it pins the
|
||||
* last frame, and the last frame is dim. */
|
||||
@keyframes text-shimmer {
|
||||
from {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0% 0;
|
||||
}
|
||||
}
|
||||
@utility text-shimmer {
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
var(--muted-foreground) 40%,
|
||||
var(--foreground) 50%,
|
||||
var(--muted-foreground) 60%
|
||||
);
|
||||
background-size: 250% 100%;
|
||||
background-repeat: no-repeat;
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
animation: text-shimmer 2s linear infinite;
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
animation: none;
|
||||
background-image: none;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
}
|
||||
@keyframes waiting-dot {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 0.2;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@utility waiting-dot {
|
||||
animation: waiting-dot 1.4s ease-in-out infinite;
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
animation: none;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Global reduced-motion backstop ──────────────────────────────────
|
||||
* Defensive catch-all so any animation/transition we forget to gate
|
||||
* per-component still collapses to near-instant when the user has asked
|
||||
|
||||
Reference in new issue
Block a user