P1: read the real gitea backlog into the app #36

Merged
christian merged 1 commits from p1/backlog-read into main 2026-07-08 21:00:33 +00:00
Owner

Summary

CommiTea now shows its own real backlog. This is the first end of the sync loop — the app reads live gitea data instead of demo fixtures, so the dogfood is real: The pot renders CommiTea's actual issues.

What's here

  • @commitea/core — the client (#1) gains listIssues (paginated, PRs excluded) and listMilestones; a pure lifecycle-v0 mapper places issues into columns from a single list read (closed→done, labelled/milestoned→triage, bare→diagnosis). steeping/review need the issue timeline (P1-5) and stay empty rather than guess. +10 unit tests (30 total in core).
  • Electron main — a gitea bridge over IPC. The token lives in main and never reaches the renderer (which is CSP-locked to 'self' anyway). Config resolves from env / .env.local; gated off under COMMITEA_E2E so the committed e2e suite stays deterministic on fixtures.
  • RendereruseBacklog() reconciles once on mount through the bridge; issuesToBoardColumns shapes real issues into The pot. Board takes optional real columns + a loading state and falls back to demo fixtures when no token is configured.

Verification

  • yarn typecheck clean (core + desktop)
  • 14 e2e green in fixture mode (unchanged behaviour without a token)
  • A gated live spec (GITEA_LIVE=1) launches against the real repo — the board renders the actual 25 open + 9 closed issues. Screenshot confirmed.

Next slices (P1)

  • #3 SQLite mirror + upsert (offline + perf; currently live-fetch only)
  • #2 ChangeSource poll/reconcile-on-a-timer
  • #5 lifecycle inference from the issue timeline → fills Steeping / In review

Config is dev-only for now (env / .env.local); wiring Settings/Onboarding to store it is a follow-up.

🤖 Generated with Claude Code

## Summary **CommiTea now shows its own real backlog.** This is the first end of the sync loop — the app reads live gitea data instead of demo fixtures, so the dogfood is real: The pot renders CommiTea's actual issues. ## What's here - **`@commitea/core`** — the client (#1) gains `listIssues` (paginated, PRs excluded) and `listMilestones`; a pure `lifecycle-v0` mapper places issues into columns from a single list read (closed→done, labelled/milestoned→triage, bare→diagnosis). `steeping`/`review` need the issue timeline (P1-5) and stay empty rather than guess. +10 unit tests (30 total in core). - **Electron main** — a gitea bridge over IPC. The token lives in main and never reaches the renderer (which is CSP-locked to `'self'` anyway). Config resolves from env / `.env.local`; **gated off under `COMMITEA_E2E`** so the committed e2e suite stays deterministic on fixtures. - **Renderer** — `useBacklog()` reconciles once on mount through the bridge; `issuesToBoardColumns` shapes real issues into The pot. Board takes optional real columns + a loading state and falls back to demo fixtures when no token is configured. ## Verification - `yarn typecheck` clean (core + desktop) - **14 e2e green** in fixture mode (unchanged behaviour without a token) - A **gated live spec** (`GITEA_LIVE=1`) launches against the real repo — the board renders the actual **25 open + 9 closed** issues. Screenshot confirmed. ## Next slices (P1) - **#3** SQLite mirror + upsert (offline + perf; currently live-fetch only) - **#2** `ChangeSource` poll/reconcile-on-a-timer - **#5** lifecycle inference from the issue timeline → fills Steeping / In review Config is dev-only for now (env / `.env.local`); wiring Settings/Onboarding to store it is a follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
christian added 1 commit 2026-07-08 20:58:21 +00:00
The app now displays its own live backlog instead of fixtures. First
end of the sync loop — the tap-root (#1) grows list reads and a read
path through the Electron main process.

- @commitea/core: client gains `listIssues` (paginated, PRs excluded)
  and `listMilestones`; a `lifecycle-v0` mapper (closed→done,
  labelled/milestoned→triage, bare→diagnosis — steeping/review await
  event inference in P1-5). +10 unit tests.
- main: gitea bridge over IPC (token stays in main, never the renderer);
  config from env / .env.local; gated off under COMMITEA_E2E so the
  committed e2e stays on fixtures. Preload exposes the typed bridge.
- renderer: useBacklog() reconciles once on mount; issuesToBoardColumns
  shapes real issues into The pot. Board takes optional real columns +
  a loading state, falling back to demo fixtures when unconfigured.

Verified: 14 e2e green (fixture mode) + a gated live spec that launches
against the real repo — the board renders the actual 25 open + 9 closed
issues (screenshot). SQLite mirror + reconcile-on-a-timer + lifecycle
event inference are the next slices (#2/#3/#5).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
christian merged commit ecf1bb16e8 into main 2026-07-08 21:00:33 +00:00
Sign in to join this conversation.
No description provided.