feat(desktop): complete the P3 screens — Board, Runway, Issue, Capture (#17–#20)

Ports the nine remaining design-handoff screens to typed TSX and wires
them into the shell, retiring the placeholders for every primary view.

- The pot (#17 / P3-4): BoardScreen 5-column kanban with live search +
  empty state, Tabs into GanttView (state bars, critical inset rules,
  dotted 80% tails, today rule) and DepsGraph (layered DAG, bezier edges,
  spruce critical path, milestone terminal).
- Runway (#18 / P3-5): RunwayScreen (range bars via RunwayBar, capacity,
  calibration teaser), CalibrationScreen (scatter + honest diagonal +
  ×1.18 fit, per-label/per-person bias), MilestoneScreen (stats strip,
  cone, grouped issues).
- Issue + Inbox (#19 / P3-6): IssueScreen (human intent left, machine-
  derived lifecycle/forecast/deps right, "writes as you" composer),
  InboxScreen (day-grouped, filter tabs, unread dots, mark-all-read).
- Capture (#20 / P3-7): CaptureScreen dump→interview→review→filed state
  machine with running clock.

Shell: openIssue now carries an IssueRef; adds readIds (inbox) + issue
state; routes board/runway/calibration/milestone/issue/inbox/capture and
the runway→calibration/milestone + issue back-stack. Focus/Standup pass
IssueRefs. Select/Input gain defaultValue (Capture's editable tray).
Fixtures mirrored from data.js. typecheck + 11 e2e green; all nine
screens screenshot-verified in light.

Closes P3-4, P3-5, P3-6, P3-7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Croissant Le Doux
2026-07-08 15:41:45 -04:00
parent 6879bedb13
commit 5176589f0c
17 changed files with 1658 additions and 65 deletions

View File

@@ -20,9 +20,11 @@ export class AppPage {
return this.page.getByText('CommiTea', { exact: true })
}
/** Navigate via a left-rail entry by its label. */
/** Navigate via a left-rail entry by its label. Scoped to the Primary rail so
* it never collides with in-screen breadcrumb buttons of the same name, and
* matches by prefix so count badges (e.g. "Inbox 3") still resolve. */
nav(label: string): Locator {
return this.page.getByRole('button', { name: label, exact: true })
return this.page.getByRole('navigation', { name: 'Primary' }).getByRole('button', { name: label })
}
/** Assert the shell has rendered. */

View File

@@ -13,33 +13,87 @@ test('Focus shows Now/Next/Later cards and the burn-up cone', async ({ window })
}
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 }) => {
test('Board: columns, search filter, and Gantt/Deps tabs', async ({ app, window }) => {
await app.nav('The pot').click()
await expect(window.getByRole('heading', { name: 'The pot' })).toBeVisible()
await expect(window.getByText('Diagnosis', { exact: true })).toBeVisible()
await expect(window.getByText('Steeping', { exact: true })).toBeVisible()
await app.screenshot('board')
await app.nav('States').click()
await expect(window.getByRole('heading', { name: 'States' })).toBeVisible()
await expect(window.getByText('The pot is empty')).toBeVisible()
await app.screenshot('shell-states')
await window.getByPlaceholder(/Search the pot/).fill('lifecycle')
await expect(window.getByText('Fix lifecycle inference on merge events')).toBeVisible()
await expect(window.getByText('Dark theme: cone fill too faint')).toBeHidden()
await window.getByPlaceholder(/Search the pot/).fill('')
await window.getByRole('tab', { name: 'Gantt' }).click()
await expect(window.getByText(/80% · Mar 312/)).toBeVisible()
await app.screenshot('gantt')
await window.getByRole('tab', { name: 'Dependencies' }).click()
await expect(window.getByText('critical path', { exact: true })).toBeVisible()
await app.screenshot('deps')
})
test('Runway: milestones, capacity, and drill-ins', async ({ app, window }) => {
await app.nav('Runway').click()
await expect(window.getByRole('heading', { name: 'Runway' })).toBeVisible()
await expect(window.getByText('Pilot-ready')).toBeVisible()
await expect(window.getByText('deadline/hard')).toBeVisible()
await app.screenshot('runway')
// milestone drill-in
await window.getByText('Beta', { exact: true }).click()
await expect(window.getByRole('heading', { name: 'Beta' })).toBeVisible()
await expect(window.getByText('42 issues · est 61d')).toBeVisible()
await app.screenshot('milestone')
await window.getByRole('main').getByRole('button', { name: 'Runway' }).click()
// calibration drill-in
await window.getByRole('button', { name: 'Full report' }).click()
await expect(window.getByRole('heading', { name: 'Calibration' })).toBeVisible()
await expect(window.getByText('The shape of hope')).toBeVisible()
await app.screenshot('calibration')
})
test('Inbox: notifications and mark-all-read', async ({ app, window }) => {
await app.nav('Inbox').click()
await expect(window.getByRole('heading', { name: 'Inbox' })).toBeVisible()
await expect(window.getByText(/window moved/)).toBeVisible()
await app.screenshot('inbox')
await window.getByRole('button', { name: 'Mark all read' }).click()
await expect(window.getByText('all read · nothing here rings twice')).toBeVisible()
})
test('Capture: braindump advances to the interview', async ({ app, window }) => {
await app.nav('Capture').click()
await expect(window.getByText("Tell me what you're planning")).toBeVisible()
await app.screenshot('capture')
await window.getByRole('button', { name: 'Brew tickets' }).click()
await expect(window.getByText(/Interview · 1 of 3/)).toBeVisible()
})
test('issue drill-in from a Focus card and back-stack of one', async ({ app, window }) => {
await window.getByRole('link', { name: 'Fix lifecycle inference on merge events' }).click()
await expect(window.getByText('#87 · stephen/commitea')).toBeVisible()
await expect(window.getByText('Machine-derived')).toBeVisible()
await app.screenshot('issue')
await window.getByRole('button', { name: 'Back' }).click()
await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible()
})
test('Evening service toggle flips the document theme', async ({ app, window }) => {
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()
await app.screenshot('shell-dark')
})
@@ -49,20 +103,6 @@ test('offline sim shows the banner and disables the composer', async ({ window }
await expect(window.getByRole('textbox')).toBeDisabled()
})
test('chat composer echoes a canned reply (fixture)', async ({ window }) => {
await window.getByRole('textbox').fill('Push pilots first')
await window.keyboard.press('Enter')
await expect(window.getByText('Push pilots first')).toBeVisible()
await expect(window.getByText(/Noted and logged as a directive/)).toBeVisible()
})
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()
await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible()
})
test('exposes the commitea preload API', async ({ app }) => {
const api = await app.preloadApi()
expect(api).toBeDefined()