CommiTea foundation + P3 UI: gitea client, e2e harness, all product screens #35

Merged
christian merged 8 commits from p1/gitea-read-client into main 2026-07-08 20:42:13 +00:00
Owner

Summary

The first substantial slice of CommiTea: the data foundation, an autonomous E2E harness, and the complete P3 product UI (all 14 screens) recreated pixel-faithfully from the design handoff. The app boots into a working shell and every screen is live against fixture data — ready for P1's real gitea/scheduler data to flow in behind it.

What's in here (9 commits)

Area Detail
Design decisions Settled the 5 open architecture items (soft write-path, poll-only sync, lognormal cold-start priors, purity binds the SQLite cache) + sidecar formats + agent tool schemas. Dogfood backlog filed on this repo (10 labels, 5 milestones, 34 issues, 51 deps).
#1 Gitea read client @commitea/core createGiteaClient().getIssue() — injected fetch, normalized GiteaIssue, GiteaApiError. Unit-tested + verified against live issue #9.
E2E harness Playwright _electron — launches the built app, page objects + on-demand screenshots, no chromium download.
#14 Primitives All 15 design-system components ported verbatim.
#15 Shell Rail + main + Reginald chat panel; routing, theme, offline sim, States gallery, issue back-stack.
#16 Focus + Standup Now/Next/Later cards + burn-up cone; the typeset standup letter.
#17–#20 Screens Board/Gantt/Deps, Runway/Calibration/Milestone, Issue/Inbox, Capture.
#21 Screens Directives (consequence diff + ledger), Settings, full-window Onboarding.

P3 (UI views) is complete — every screen from the handoff is live.

Testing

  • yarn typecheck clean across core + desktop
  • 14 Playwright e2e green (nav, theme, offline, chat, board search + tabs, runway/calibration/milestone drill-ins, inbox, capture state machine, directive resolve, onboarding test gate, issue back-stack)
  • All 14 screens screenshot-verified in light; shell verified in dark

Notes

  • Branch name (p1/gitea-read-client) predates the scope — this PR is "foundation + full P3 UI".
  • Screens run on fixtures mirrored from the handoff's data.js; P1 (sync) and P4 (agent) replace those with real data. The chat panel is a fixture echo until P4.

🤖 Generated with Claude Code

## Summary The first substantial slice of CommiTea: the data foundation, an autonomous E2E harness, and the **complete P3 product UI** (all 14 screens) recreated pixel-faithfully from the design handoff. The app boots into a working shell and every screen is live against fixture data — ready for P1's real gitea/scheduler data to flow in behind it. ## What's in here (9 commits) | Area | Detail | |---|---| | **Design decisions** | Settled the 5 open architecture items (soft write-path, poll-only sync, lognormal cold-start priors, purity binds the SQLite cache) + sidecar formats + agent tool schemas. Dogfood backlog filed on this repo (10 labels, 5 milestones, 34 issues, 51 deps). | | **#1 Gitea read client** | `@commitea/core` `createGiteaClient().getIssue()` — injected `fetch`, normalized `GiteaIssue`, `GiteaApiError`. Unit-tested + verified against live issue #9. | | **E2E harness** | Playwright `_electron` — launches the built app, page objects + on-demand screenshots, no chromium download. | | **#14 Primitives** | All 15 design-system components ported verbatim. | | **#15 Shell** | Rail + main + Reginald chat panel; routing, theme, offline sim, States gallery, issue back-stack. | | **#16 Focus + Standup** | Now/Next/Later cards + burn-up cone; the typeset standup letter. | | **#17–#20 Screens** | Board/Gantt/Deps, Runway/Calibration/Milestone, Issue/Inbox, Capture. | | **#21 Screens** | Directives (consequence diff + ledger), Settings, full-window Onboarding. | **P3 (UI views) is complete** — every screen from the handoff is live. ## Testing - `yarn typecheck` clean across `core` + `desktop` - **14 Playwright e2e** green (nav, theme, offline, chat, board search + tabs, runway/calibration/milestone drill-ins, inbox, capture state machine, directive resolve, onboarding test gate, issue back-stack) - All 14 screens screenshot-verified in light; shell verified in dark ## Notes - Branch name (`p1/gitea-read-client`) predates the scope — this PR is "foundation + full P3 UI". - Screens run on fixtures mirrored from the handoff's `data.js`; **P1** (sync) and **P4** (agent) replace those with real data. The chat panel is a fixture echo until P4. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
christian added 7 commits 2026-07-08 19:42:31 +00:00
Resolve the five design-session open items from PLAN.md:
- decisions.md: soft write-path, poll-only sync (NAT), lognormal
  cold-start priors, purity test binds the SQLite cache
- pm-state.md: sidecar layout + directive/capacity/calibration
  schemas + lifecycle inference table
- agent-tools.md: query_project read tool + three write tools

Also gitignore .env.* (protect the gitea PAT) and record the P0
actual: 10 labels, 5 milestones, 34 tracer-bullet issues + 51
dependencies filed on christian/commitea as the first managed project.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
createGiteaClient(config, fetchImpl).getIssue(index) fetches one issue
and normalizes raw gitea JSON to a typed GiteaIssue with scheduler
facts precomputed via extractLabelFacts. Network is an injected
FetchLike (core has no DOM lib; global fetch is structurally
assignable), so it unit-tests against a stub — no live calls in the
suite. Non-2xx responses throw GiteaApiError carrying status + body.

Closes P1-1. Verified end-to-end against the live repo's issue #9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Launches the built app (out/main/index.js) via Playwright's _electron
API — no browser project, no chromium download. Adds a launch fixture
(electronApp/window/app), an AppPage page object with a screenshot
helper for autonomous visual review, and a boot smoke suite (shell
renders, @commitea/core label-parse runs in the renderer, preload API
exposed). Scripts: e2e (build+run), e2e:only, e2e:report. Artifacts
gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verbatim port of the handoff primitives into components/ui/ — Icon,
Button, IconButton, Badge, Tag, Card, Tabs (core); Input, Select,
Checkbox, Radio, Switch (forms); Dialog, Toast, Tooltip (feedback).
Each keeps its injected token-referencing CSS byte-for-byte; the
handoff .d.ts contracts become the exported prop interfaces. Barrel at
components/ui/index.ts.

Adds a PrimitivesGallery (app root for now; real shell is P3-2) that
exercises every primitive with a light/dark toggle. Smoke suite asserts
the gallery, section coverage, theme flip, and dialog open/Escape;
screenshots captured for both themes. typecheck + 5 e2e green.

Closes P3-1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reimplements the handoff Shell in React/TS: 208px left rail (nav +
connection dot + Evening service theme switch), max-1120 main column,
330px Reginald chat panel. Routing across top-level views with an
issue drill-in + back-stack of one; data-theme owned by the shell.

- ChatPanel: fixture write-path — echoes a canned reply so layout +
  interactions are real; model router wiring lands in P4.
- states.tsx: EmptyState / OfflineBanner / ModelAwayState + the States
  specimen gallery, ported from the handoff.
- PlaceholderScreen stands in for not-yet-built views (P3-3+), keeping
  navigation live; it also exposes the issue drill-in for now.
- Gallery loses its own theme toggle (shell owns data-theme); reachable
  via a Primitives rail entry as a living reference.

Fixtures mirrored from the handoff's data.js. typecheck + 7 e2e green
(nav, theme, offline banner + disabled composer, chat echo, drill-in
back-stack); light/dark/states screenshots verified.

Closes P3-2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
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>
christian added 1 commit 2026-07-08 20:23:02 +00:00
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>
christian merged commit 103b6cc98d into main 2026-07-08 20:42:13 +00:00
Sign in to join this conversation.
No description provided.