fix(web): label the Home activity summary as the last 24 hours (UF-056)

The summary always covers the last 24 hours, but it read "While you slept"
and "A calm night" at any time of day.
This commit is contained in:
shumeiko.it
2026-10-27 14:24:44 +01:00
parent 659c84bee2
commit 22846e4131
3 changed files with 18 additions and 6 deletions

View File

@@ -590,7 +590,7 @@ function composeOvernightStory(o: OvernightSummary): ReactNode {
return (
<>
Overnight, Waggle{' '}
In the last 24 hours, Waggle{' '}
{clauses.map((c, i) => (
<span key={i}>
{i > 0 && (i === clauses.length - 1 ? (clauses.length === 2 ? ' and ' : ', and ') : ', ')}
@@ -826,13 +826,15 @@ const HomeCockpit = ({ onContinue, onOpenWorkspaceDesktop, onCreateWorkspace, us
};
// Overnight hero copy: compose the story from real counts; degrade to a quiet
// line when there's no activity (the test stubs overnight → null).
// line when there's no activity (the test stubs overnight → null). The
// summary covers the last 24 hours whatever the time of day, so the copy
// says that instead of "overnight" (UF-056).
const hasOvernight = overnightHasActivity(overnight);
const overnightStatement = hasOvernight ? composeOvernightStory(overnight) : null;
const runChips = hasOvernight ? buildRunChips(overnight) : [];
const overnightEmpty = offline
? 'Your overnight summary needs the local service.'
: 'A calm night — nothing ran while you were away.';
? 'Your daily summary needs the local service.'
: 'Nothing ran in the last 24 hours.';
// Wave F (fix 2): factual hero deltas for a returning user — reuse the
// briefing's own card data (most recent activity + attention debt), no fetch.

View File

@@ -5,7 +5,7 @@ import { RunChip, type RunChipProps } from './RunChip';
interface OvernightHeroProps {
eyebrow?: string;
/** The "While you slept …" statement; embed honey spans for key numbers.
/** The last-24-hours statement; embed honey spans for key numbers.
* The caller owns the empty-night fallback line — the statement always
* renders, whether or not chips accompany it (H2: single-clause stories
* pass no chips, since a lone chip would just repeat the sentence). */
@@ -20,7 +20,7 @@ interface OvernightHeroProps {
* see PR3-BUILD-PLAN §5).
*/
export function OvernightHero({
eyebrow = 'While you slept',
eyebrow = 'Last 24 hours',
statement,
runs = [],
className,

View File

@@ -84,6 +84,7 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`.
| UF-053 | The user's chat bubble is squared on the wrong corner | Fixed | Web UI, chat |
| UF-054 | Settings and the status bar name different default models | Fixed | Web UI, models |
| UF-055 | Home greets the user by the assistant's name | Fixed | Sidecar, Web UI |
| UF-056 | Home calls the last 24 hours "While you slept" | Fixed | Web UI |
## Entries
@@ -555,3 +556,12 @@ Entries UF-010 to UF-019 come from the UI audit `anti-slop/audit-001-2026-10-14.
- Cause: both read the name from the identity row. At startup the sidecar fills that row with the assistant's own identity, named "Waggle", and onboarding only overwrites it when the user types a name.
- What we did: the name comes from profile.json, which the user states. The identity row is a fallback and its default assistant name is ignored, so with no name the greeting has none and the account row reads "Account". The agent package exports the default name as `DEFAULT_AGENT_NAME`. Server and web tests cover a profile name, a real identity name and the default.
- Recommendation: apply the same change in the main project, and keep the assistant's identity apart from the user's.
### UF-056. Home calls the last 24 hours "While you slept"
- Status: Fixed
- Found: 2026-10-14
- Where: at commit `b20b138`, `apps/web/src/components/os/warm/OvernightHero.tsx:23` (the "While you slept" label), `apps/web/src/components/os/apps/HomeCockpit.tsx:593` ("Overnight, Waggle …") and `:831` ("A calm night …"); the window is `OVERNIGHT_DEFAULT_HOURS = 24` in `packages/server/src/local/routes/home.ts:113`
- Symptom: at 21:41 Home says "While you slept" and "A calm night: nothing ran while you were away", although the user has been working all day.
- Cause: the summary always covers the last 24 hours, whatever the time of day, but the copy describes a night.
- What we did: the block is labelled "Last 24 hours", the story starts "In the last 24 hours, Waggle …" and the empty state reads "Nothing ran in the last 24 hours." The Dream Diary card keeps "While you slept": it shows the nightly memory run.
- Recommendation: apply the same change in the main project, or pass the time of the user's last visit as `since` and word the copy for that window.