feat(desktop): Directives, Settings, Onboarding — P3 complete (#21)
The last three P3 screens, retiring every placeholder: - DirectivesScreen — jade consequence diff (propose-approve: Make it so / Amend / Withdraw, resolving moves it into the ledger) + append-only ledger (seq, who/when/why, verbatim quote, status badge). - SettingsScreen — gitea connection + managed repos, sync switches, model router, read-only label schema, rituals, appearance radios (wired to the shared theme), single danger action. - OnboardingScreen — full-window first run: welcome → connect (test gate) → repo pick → propose-approve bootstrap; onDone routes into the app. Shell early-returns it (no rail/chat), matching the design. Shell routes directives/settings and the firstrun full-window flow. DIRECTIVES fixture added. typecheck + 14 e2e green (incl. directive resolve, appearance↔theme sync, onboarding test gate); all three screenshot-verified. Closes P3-8. P3 (UI views) complete — all 14 screens live on fixtures. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,42 @@ test('Capture: braindump advances to the interview', async ({ app, window }) =>
|
||||
await expect(window.getByText(/Interview · 1 of 3/)).toBeVisible()
|
||||
})
|
||||
|
||||
test('Directives: consequence diff + append-only ledger', async ({ app, window }) => {
|
||||
await app.nav('Directives').click()
|
||||
await expect(window.getByRole('heading', { name: 'Directives' })).toBeVisible()
|
||||
await expect(window.getByText('Consequence diff')).toBeVisible()
|
||||
await expect(window.getByText(/append-only · JSONL in pm-state/)).toBeVisible()
|
||||
await app.screenshot('directives')
|
||||
// resolving the pending directive moves it into the ledger
|
||||
await window.getByRole('button', { name: 'Make it so' }).click()
|
||||
await expect(window.getByText('Consequence diff')).toBeHidden()
|
||||
await expect(window.getByText(/Nothing awaits your word/)).toBeVisible()
|
||||
})
|
||||
|
||||
test('Settings: connection, schema, and appearance sync with theme', async ({ app, window }) => {
|
||||
await app.nav('Settings').click()
|
||||
await expect(window.getByRole('heading', { name: 'Settings' })).toBeVisible()
|
||||
await expect(window.getByText('Managed repos')).toBeVisible()
|
||||
await app.screenshot('settings')
|
||||
// the Evening (dark) radio drives the shared theme
|
||||
await window.getByText('Evening (dark)').click()
|
||||
await expect(window.locator('html')).toHaveAttribute('data-theme', 'dark')
|
||||
})
|
||||
|
||||
test('Onboarding: full-window first-run flow with test gate', async ({ app, window }) => {
|
||||
await app.nav('First run').click()
|
||||
await expect(window.getByRole('heading', { name: 'Good morning.' })).toBeVisible()
|
||||
// full-window: no rail wordmark link, brand only
|
||||
await app.screenshot('onboarding')
|
||||
await window.getByRole('button', { name: 'Begin' }).click()
|
||||
await expect(window.getByRole('heading', { name: 'Your Gitea' })).toBeVisible()
|
||||
// Continue is gated until the connection test passes
|
||||
await expect(window.getByRole('button', { name: 'Continue' })).toBeDisabled()
|
||||
await window.getByRole('button', { name: 'Test connection' }).click()
|
||||
await expect(window.getByText(/connected · 3 repos visible/)).toBeVisible()
|
||||
await expect(window.getByRole('button', { name: 'Continue' })).toBeEnabled()
|
||||
})
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user