Commit Graph
23 Commits
Author SHA1 Message Date
Hermes 3847ef7b2d T14 fixup: route ordering + UUID guard for /api/agents/:id
Verification after commit d4c02a3 found Hono matching /:id BEFORE /activity
when the bare /api/agents/activity request hit the API — Postgres returned a
500 cast error because id='activity' was not a valid UUID.

Two changes:
1. Move GET /api/agents/activity registration to BEFORE GET /:id so Hono's
   matcher picks the static path before the param path.
2. Add a UUID-format guard at the top of GET /api/agents/:id — returns
   404 when id is not a UUID. Defense in depth: prevents future 500s if
   a similarly-shaped static route collides with /:id.

Parent: t_e1cbd87d
2026-08-01 04:24:20 +00:00
Hermes d4c02a3de2 T14/Bug #4 #5 #6 #8 #10: commit in-flight worker fixes (agents _all sentinel, settings useThemeStore, 5 detail route registrations)
Continuation of the T10 test report fixes (45d0810). The prior workers
for these bugs wrote the code but died before committing. This commit
captures their work and additionally restores a GET /:id/permissions
route that the prior helper-script accidentally deleted.

- Bug #4 HIGH: GET /api/agents/_all/activity now skips the WHERE clause
  when the SPA passes '_all' as the id.
- Bug #5 MED: Settings > Appearance tab now reads/writes useThemeStore
  (Zustand) so theme changes are consistent with the command palette.
- Bug #6 HIGH: /projects/:id detail page now exists. Plus 4 sibling
  detail pages (tasks/:id, habits/:id, notes/:id, canvas/:id) wired
  into the route tree.
- Bug #8 MED: GET /api/agents/activity (bare path) now returns the
  last 100 activity items instead of falling into /:id/activity with
  id='activity' (which failed the UUID cast).
- Bug #10 LOW: tasks/:id, habits/:id, notes/:id, canvas/:id detail
  pages are now committed (the worker that wrote them never committed).
- graph.tsx and index.tsx overlap with earlier committed fixes
  (t_cc5d9887 and t_296f0121); changes are additive and don't regress.

Also restores GET /api/agents/:id/permissions which the prior helper
script accidentally removed when reformatting agents.ts.

Parent: t_e1cbd87d
2026-08-01 04:13:25 +00:00
Hermes edec2d72d4 T11/Bug #1: fix login persistence — setCookie on /api/auth/credentials
Server now sets the session cookie on successful login. SPA at same
origin includes the cookie on every subsequent request, so the auth
middleware can verify and the user is no longer bounced back to /login.

Parent: t_e1cbd87d (T10 test report)
2026-08-01 03:57:53 +00:00
Hermes f617c39937 T6/Phase 4: 7 core entity pages (Tasks, Habits, Projects, Notes, Calendar, Graph, Search) 2026-08-01 02:10:18 +00:00
Hermes c277e3a14f T4/Phase 2C-13: port import/export routes to Hono (2 routes) 2026-08-01 01:47:51 +00:00
Hermes 39a74c5e3d T4/Phase 2C-12: port analytics routes to Hono (3 routes) 2026-08-01 01:47:49 +00:00
Hermes 910c28b095 T4/Phase 2C-11: port error log routes to Hono (2 routes) 2026-08-01 01:47:48 +00:00
Hermes 59c4fa4648 T4/Phase 2C-10: port custom fields routes to Hono (4 routes) 2026-08-01 01:47:46 +00:00
Hermes aa3629609a T4/Phase 2C-9: port tags routes to Hono (3 routes) 2026-08-01 01:47:45 +00:00
Hermes 99420b150b T4/Phase 2C-8: port daily notes routes to Hono (3 routes) 2026-08-01 01:47:43 +00:00
Hermes 0844dc77ac T4/Phase 2C-7: port canvas routes to Hono (5 routes) 2026-08-01 01:47:42 +00:00
Hermes 7243c31e1e T4/Phase 2C-6: port webhooks routes to Hono (5 routes) 2026-08-01 01:47:37 +00:00
Hermes d56993fac2 T4/Phase 2C-5: port agents routes to Hono (8 routes) 2026-08-01 01:47:35 +00:00
Hermes ea767bdbe3 T4/Phase 2C-4: port dashboard routes to Hono (4 routes) 2026-08-01 01:47:34 +00:00
Hermes 102f51ec1f T4/Phase 2C-3: port graph routes to Hono (4 routes) 2026-08-01 01:47:32 +00:00
Hermes 89dbe69137 T4/Phase 2C-2: port calendar routes to Hono (5 routes) 2026-08-01 01:47:28 +00:00
Hermes c1c95f727a T4/Phase 2C-1: port search routes to Hono (3 routes) + new DB tables 2026-08-01 01:47:25 +00:00
Hermes 23d2a96dd1 T3/Phase 2B-4: port notes routes to Hono (~7 routes) + wikilink service + route registration 2026-08-01 01:38:25 +00:00
Hermes ac90c1bd6d T3/Phase 2B-3: port projects routes to Hono (~12 routes) 2026-08-01 01:38:21 +00:00
Hermes 7686694737 T3/Phase 2B-2: port habits routes to Hono (~7 routes) 2026-08-01 01:38:18 +00:00
Hermes 93520a8002 T3/Phase 2B-1: port tasks routes to Hono (~10 routes) 2026-08-01 01:38:14 +00:00
Hermes e4a241b38f T2/Phase 2A: port auth + infrastructure routes to Hono (~8 routes)
- /api/health: DB ping + version + uptime
   - /api/auth/*: NextAuth -> Auth.js standalone (credentials + passkey)
   - /api/domains: full CRUD
   - /api/realtime: SSE with PostgreSQL LISTEN/NOTIFY
   - /mcp: JSON-RPC 2.0 (initialize, tools/list, tools/call, resources/*)

   Parent: t_e1cbd87d -> t_d8654a91 (T1)
2026-08-01 01:25:01 +00:00
Hermes fca56ab77e T1/Phase 1: scaffold Vite SPA + Hono API + Bun worker
- apps/web: Vite + React 19 + TanStack Router/Query + shadcn/ui
   - apps/api: Hono + Bun on :3001 with /api/health, /api/auth/*, /mcp stubs
   - apps/worker: Bun worker stub, DB connection, graceful SIGTERM
   - apps/web-legacy/: old Next.js code moved aside (preserved for T2-T8 reference)
   - Dockerfiles: api (Bun), worker (Bun), spa (multi-stage Caddy)
   - Caddyfile: serves dist + reverse-proxies /api/* + /mcp to api
   - docker-compose.yml: 4-service target (api, spa, db, worker)
   - packages/db/src/client.ts: shared Drizzle client for api + worker
   - db/client.ts: root-level alias for convenience

   Parent: t_e1cbd87d -> t_24c9c3fd (T0)
2026-08-01 01:15:31 +00:00