feat(desktop): Focus + Standup screens + burn-up cone (#16)

First real P3 screens, replacing the placeholders:
- FocusScreen — Now/Next/Later cards (Now = jade + Start/Defer footer),
  each with #id, label tags, steeping badge, agent-font rationale, and
  a title link that drives the shell issue drill-in. Milestone card
  wraps the burn-up cone.
- StandupScreen — typeset letter: overnight drift (dot + delta), per-
  person plan (initials avatars), warn-tint stale-blocker nag; sections
  settle in on a 90ms stagger, reduced-motion-safe.
- charts/chart.tsx — BurnUpCone (actual polyline, forecast cone with
  dashed 80% bounds, jade today rule) + RunwayBar (for P3-5). Fixed
  sample geometry until P2 feeds it.

Fixtures (today/focus/standup) mirrored from data.js. Shell routes
focus/standup to the real screens; the drill-in now starts from a Focus
card. Screenshot helper freezes animations so fade-in screens capture
settled. typecheck + 9 e2e green; light/standup/states verified.

Closes P3-3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Croissant Le Doux
2026-07-08 12:40:37 -04:00
parent f18c6d1078
commit 6879bedb13
7 changed files with 552 additions and 8 deletions

View File

@@ -1,13 +1,31 @@
import { expect, test } from './fixtures.js'
test('boots into the shell: rail, main, and Reginald panel', async ({ app, window }) => {
test('boots into the shell with the Focus screen', async ({ app, window }) => {
await app.expectLoaded()
await expect(window.getByText('Reginald', { exact: true })).toBeVisible()
// default view is Morning service
await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible()
await app.screenshot('shell-light')
})
test('Focus shows Now/Next/Later cards and the burn-up cone', async ({ window }) => {
for (const slot of ['Now', 'Next', 'Later']) {
await expect(window.getByText(slot, { exact: true })).toBeVisible()
}
await expect(window.getByText('Fix lifecycle inference on merge events')).toBeVisible()
await expect(window.getByText(/scope · 42 issues/)).toBeVisible()
await expect(window.getByText(/80% this lands/)).toBeVisible()
})
test('Standup renders the drift / plan / nag letter', async ({ app, window }) => {
await app.nav('Standup').click()
await expect(window.getByRole('heading', { name: 'Morning standup' })).toBeVisible()
await expect(window.getByText('Overnight drift')).toBeVisible()
await expect(window.getByText("Today's plan")).toBeVisible()
await expect(window.getByText('Stephen', { exact: true })).toBeVisible()
await expect(window.getByText(/Four days is a long steep/)).toBeVisible()
await app.screenshot('standup')
})
test('rail navigation switches the main view', async ({ app, window }) => {
await app.nav('The pot').click()
await expect(window.getByRole('heading', { name: 'The pot' })).toBeVisible()
@@ -19,7 +37,6 @@ test('rail navigation switches the main view', async ({ app, window }) => {
})
test('Evening service toggle flips the document theme', async ({ app, window }) => {
// the switch's real input is visually hidden — click the label text to toggle
await window.getByText('Evening service', { exact: true }).click()
await expect(window.locator('html')).toHaveAttribute('data-theme', 'dark')
await expect(window.getByRole('switch', { name: 'Evening service' })).toBeChecked()
@@ -39,11 +56,10 @@ test('chat composer echoes a canned reply (fixture)', async ({ window }) => {
await expect(window.getByText(/Noted and logged as a directive/)).toBeVisible()
})
test('issue drill-in and back-stack of one', async ({ window }) => {
await window.getByRole('button', { name: 'Preview an issue page' }).click()
test('issue drill-in from a Focus card and back-stack of one', async ({ window }) => {
await window.getByRole('link', { name: 'Fix lifecycle inference on merge events' }).click()
await expect(window.getByRole('heading', { name: 'Issue' })).toBeVisible()
await window.getByRole('button', { name: 'Back' }).click()
// returns to the view we drilled in from
await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible()
})