9370c04ac52a4b9d04e7bd662580cc6684024dae
The offline write-queue (packages/core/src/queue/write-queue-v0.ts, #33) was a tested pure module that nothing imported. Approving a change while gitea was unreachable made gitea:applyChange call the client directly and throw, losing the write. Now it's wired end to end: - queue-store.ts persists the queue next to the snapshot store (same degrade-to-empty-on-corruption discipline; injectable path for tests). - applyChange extracts the guarded write into applyChangeLive and, on unreachability (any error that is NOT a GiteaApiError rejection), enqueues the intent — coalesced by (issue, axis) — instead of throwing, returning { ok, queued, pending }. A genuine GiteaApiError still surfaces (a doomed write must not replay forever). - reconcile drains the queue once a successful read proves gitea is reachable, re-reading so the board reflects the replays; replays are idempotent (label plan.noop, assignee/milestone re-set). boot + stale reconcile report the pending count so the badge shows immediately offline. - Renderer: use-backlog threads `pending`; the OfflineBanner shows "N queued"; the chat approve message distinguishes a queued (offline) approval from an applied one. Also wires vitest into the desktop workspace (was missing, so the main-process suite couldn't run via `yarn test`) and fixes a stale Capture copy assertion left by the earlier posh-copy pass. Tests: queue-store.test.ts (persist/reload/coalesce/replay-drain, real core fns); 9 main-process + 169 core green; 12 demo e2e green. A one-off GITEA_LIVE smoke verified an online write lands+reverts and an offline approve queues+drains against the real repo (not committed, per the repo's no-mutating-test convention). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CommiTea
AI project manager built on Gitea. A deterministic scheduler does the math
(Monte Carlo forecasts over your own estimate-vs-actual history); the agent —
Reginald — captures work via interview, negotiates priorities, and explains the
consequences. Gitea holds human-authored intent; a pm-state repo holds
machine-derived state. The LLM never does math.
Structure
apps/desktop— Electron app (electron-vite, React, Tailwind)packages/core— pure TypeScript: label schema, scheduler, gitea client (no Electron imports)docs/PLAN.md— product plan (goals, phases, not-doing list)docs/design/— design handoff: tokens, component contracts, interactive prototype (docs/design/ui_kits/app/index.htmlvia a static server), brand voice rules indesign_system_readme.md
Development
yarn # install
yarn dev # electron app, logs tee to apps/desktop/desktop.log
yarn test # unit tests (vitest)
yarn typecheck
End-to-end (Electron + Playwright)
yarn workspace @commitea/desktop e2e # build, then drive the built app
yarn workspace @commitea/desktop e2e:only # reuse existing out/ build (tight loop)
yarn workspace @commitea/desktop e2e:report # open the last HTML report
Tests launch the built app (out/main/index.js) through Playwright's
_electron API — no browser project, no chromium download. Fixtures and page
objects live in apps/desktop/e2e/; screenshots land in
e2e/.artifacts/screens/ for visual review. Page objects use user-facing
locators (getByRole/getByText), never CSS/DOM structure.
Conventions
- Yarn 4 workspaces; ESM everywhere;
.jsextensions on relative imports @commitea/corestays pure — unit-testable without Electron or network- Design tokens are the source of truth (
apps/desktop/src/renderer/src/design/, mirrored fromdocs/design/); Tailwind maps onto the CSS custom properties, never redefines them - Reginald's voice rules live in
docs/design/design_system_readme.md— no emoji, no point-date forecasts, wit in sentences never in buttons
Description
Languages
TypeScript
97.8%
CSS
1.7%
JavaScript
0.4%