- Fix all Ultracite lint errors on changed source files (0 remaining)
- Remove project.test.ts and use-personal-organization.test.ts (to be
rewritten when implementation stabilizes)
- Replace .at(-1) with index access for backend tsconfig ES target compat
- Rename generator functions to avoid no-shadow conflicts
- Refactor nested ternaries into helper functions
- Fix unused imports
Auth:
- Add useWebAuth hook as the single web-facing auth interface with four
states (loading/unauthenticated/authenticated/inconsistent)
- Normalize getCurrentUser to return {id: tokenIdentifier, name, email}
- Rename requireOwnerId to requireAuthUserId across all backend callers
- Set expectAuth:true on ConvexReactClient singleton
- Migrate _app, _auth, user-menu, use-personal-organization to useWebAuth
- Remove unused @code/auth/server export (zero callers confirmed)
Primitives:
- Add packages/primitives/src/project.ts with Effect v4 Project domain:
URL normalization, six canonical context kinds, strict remote decoding,
context write decisioning with revision tracking, and no-op detection
- Define PublicGit and ProjectStore replaceable ports
- Define ProjectApplication service orchestrating domain+ports with
deterministic error mapping
- Add comprehensive test suite (28 tests) with in-memory store and fake
PublicGit covering normalization, seeds, idempotency, tenant isolation,
last-write-wins, and typed error mapping
- Add db.ts: a typed ConvexHttpClient-backed PersistenceAdapter implementing
the full Flue store surface (submissions, streams, runs, attachments).
- Add app.ts: Hono server mounting Flue routing and registering the model
provider from @code/env/agent.
- Update zopu agent to read provider config via env() and switch
dev/build scripts to load ../../.env.
- Register SITE_URL, NATIVE_APP_URL, CONVEX_SITE_URL, FLUE_DB_TOKEN in
convex.config.ts so the generated server.js exposes a typed env object.
- Rewrite auth.ts to consume @code/env/convex and tighten the
getCurrentUser handler.
- Refresh the backend README to describe the control-plane role and
generated-file policy.
- Move all application env vars to repository-root .env (with .env.example
as the committed template) and drop the per-app .env.example files.
- Add @code/env subpaths (agent, convex) and consume validated exports
everywhere instead of reading process.env directly.
- Wire every dev/build/start script to load ../../.env via bun --env-file
and point vite.config.ts envDir at the repo root.