Commit Graph
182 Commits
Author SHA1 Message Date
Hermes aa5da5d770 fix: restore selectedNoteId as state for re-render 2026-08-01 13:23:35 +00:00
Hermes 58e563f21d fix: remove selectedNoteId state entirely to prevent parent re-render focus stealing 2026-08-01 13:22:23 +00:00
Hermes a673d77d58 fix: prevent search input from receiving focus via onMouseDown preventDefault 2026-08-01 13:21:14 +00:00
Hermes dfaf0ff659 fix: add onMouseDown stopPropagation to title input 2026-08-01 13:19:30 +00:00
Hermes 2cf6638d9e fix: isolate note editor in memoized pane to prevent focus stealing on parent re-render 2026-08-01 13:18:08 +00:00
Hermes 456d637a24 fix: isolate note editor in memoized pane to prevent focus stealing on parent re-render 2026-08-01 13:16:05 +00:00
Hermes d9000c9f76 fix: restore selectedNoteId as state for re-render, keep ref for content 2026-08-01 13:11:31 +00:00
Hermes 7776668269 fix: remove all state changes on note selection to prevent focus stealing 2026-08-01 13:09:35 +00:00
Hermes 4a83ee88ba fix: add autoFocus to title input to reclaim focus after re-render 2026-08-01 13:09:25 +00:00
Hermes 82db10a10d fix: add tabIndex=-1 to search input to prevent auto-focus stealing from title input 2026-08-01 13:07:45 +00:00
Hermes d0d6002126 fix: use ref-based selectedNote to prevent re-render focus stealing 2026-08-01 13:07:20 +00:00
Hermes eeff700875 fix: TipTap focus leak - use uncontrolled NoteTitleInput with ref to prevent focus stealing on parent re-render 2026-08-01 13:05:31 +00:00
Hermes 3f1a1982ca fix: use uncontrolled inputs for note title and editor to prevent focus leak to search field 2026-08-01 13:04:24 +00:00
Hermes 420ebfe24a fix: isolate note title in memoized component, prevent search input stealing focus 2026-08-01 13:02:55 +00:00
Hermes 9b0c1fb447 fix: use onBlur for NoteEditor save instead of onInput to prevent focus stealing 2026-08-01 13:00:28 +00:00
Hermes a65b828c78 fix: isolate note title in memoized component to prevent focus leak to search field 2026-08-01 13:00:22 +00:00
Hermes 21efa311da fix: prevent NoteEditor re-render stealing focus - use key remount, onBlur save, stable ref 2026-08-01 12:58:46 +00:00
Hermes 8917f3ad19 fix: add missing quotes around className in NoteTitleInput 2026-08-01 12:58:34 +00:00
Hermes ec0fb10b3e fix: add missing quotes around className in NoteTitleInput 2026-08-01 12:57:53 +00:00
Hermes c35ea2b175 fix: isolate note title input in memoized component to prevent focus leak to search field 2026-08-01 12:57:32 +00:00
Hermes ee57195681 fix: stabilize handleContentChange callback via ref to prevent NoteEditor re-render stealing focus 2026-08-01 12:53:19 +00:00
Hermes 445f5e1257 fix: use uncontrolled input for note title to prevent focus leak to search field 2026-08-01 12:51:50 +00:00
Hermes ff2611ce18 fix: save note title on blur instead of every keystroke to prevent focus leak 2026-08-01 12:50:16 +00:00
Hermes 67214575fb fix: debounce note title save to prevent focus leak to search field 2026-08-01 12:49:27 +00:00
Hermes 35d063ea82 fix: R3 bugs - TipTap focus leak to search, Quick Captured opens palette, Calendar day view switching 2026-08-01 12:46:41 +00:00
Hermes 085f552c4b fix: calendar day view - separate Calendar instances per view to avoid react-big-calendar view switching bug 2026-08-01 12:40:23 +00:00
Hermes 6613ff058e fix: calendar day view - wrapper div key remount for forced reinit 2026-08-01 12:38:55 +00:00
Hermes d142db40c1 fix: calendar day view - test with regular Calendar (no DnD) 2026-08-01 12:35:01 +00:00
Hermes b9cce1e452 fix: calendar day view - toolbar onView directly sets page state, Calendar remounts via key 2026-08-01 12:33:39 +00:00
Hermes 60dd5a8280 fix: calendar day view - key-based remount workaround for react-big-calendar DnD 2026-08-01 12:32:13 +00:00
Hermes 4693f81095 fix: calendar day view - explicit onView override in toolbar 2026-08-01 12:30:30 +00:00
Hermes b7b7de64fb fix: add missing useRef import in calendar.tsx 2026-08-01 12:28:37 +00:00
Hermes 3a0df07296 fix: R3 bugs - TipTap focus leak, Quick Capture palette, Calendar day view 2026-08-01 12:26:43 +00:00
Hermes 118617c892 fix: MCP endpoint at /api/mcp (Bug #2) + REST API key auth (Bug #3)
Bug #2 (LOW): MCP endpoint was mounted at /mcp instead of /api/mcp,
inconsistent with all other API routes. Changed app.route("/mcp", ...)
to app.route("/api/mcp", ...) in apps/api/src/index.ts.

Bug #3 (MEDIUM): REST API endpoints only accepted JWT cookie/session
auth, not API key auth. Added authenticateApiKey() to authMiddleware
in apps/api/src/middleware/auth.ts so REST endpoints now accept
Authorization: Bearer <api_key> as a fallback after JWT verification.
2026-08-01 11:33:12 +00:00
Hermes a80207fc9a fix(calendar): day/week view toggle — controlled view prop + currentView in CustomToolbar 2026-08-01 05:34:35 +00:00
Hermes f337c63915 fix(Dockerfile.spa): exclude node_modules from COPY to avoid BuildKit cache mount conflict
The COPY apps/web step was failing with:
  cannot copy to non-directory: .../app/apps/web/node_modules/@hookform/resolvers
because the host node_modules symlink conflicted with BuildKits overlayfs
cache mount. Adding --exclude=node_modules sidesteps the conflict (the
node_modules in the image is freshly created by the earlier bun install).

Parent: t_e1cbd87d
2026-08-01 04:40:05 +00:00
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 2e451093b6 T14/Bug #3 HIGH: Postgres search_vector trigger + backfill
The tasks/notes/projects/habits/domains tables all have a tsvector
search_vector column and a GIN index, but nothing was populating it.
GET /api/search returned zero results for every query.

This migration adds a BEFORE INSERT OR UPDATE trigger on each of the
five searchable tables. The trigger function uses to_tsvector with
the appropriate title + description/content columns and is named
project_e_search_vector_<table>_update. Drops any pre-existing trigger
of the same name so re-running the migration is safe.

Backfills 64 existing rows.

Parent: t_e1cbd87d
2026-08-01 04:15:14 +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
T10 Tester 45d08102f8 T10/Phase 8: interactive test report — needs-fixes (2 CRITICAL + 3 HIGH + 3 MEDIUM) 2026-08-01 03:31:48 +00:00
Hermes bb64be5d56 T9/Phase 7: deploy 4-container compose + Caddy reverse proxy
- docker-compose.yml: 4 services (db, api, spa, worker), Next.js removed
- Dockerfile.api: Bun base, install, run
- Dockerfile.worker: Bun base, install, run
- Dockerfile.spa: multi-stage (Bun build -> Caddy serve), fixed lockfile + workspace stubs
- Caddyfile: serve SPA + reverse-proxy /api/* + /mcp, SPA fallback routing
- Old Node worker stopped, replaced with new Bun worker
- Old Next.js server on :3000 stopped
- BASELINE.md: Phase 7 Deploy section added
- DEPLOY.md: deploy/rollback/debug guide added
2026-08-01 02:43:22 +00:00
Hermes ef163a9d6f T8/Phase 6: OSS component swap polish
- Calendar: react-big-calendar w/ withDragAndDrop, date-fns localizer, custom event renderer (color tokens), custom toolbar, responsive (agenda on mobile), now indicator
- Graph: react-force-graph-2d w/ custom node/link canvas renderers, hover highlighting, search-to-fly, filter panel (entity + relationship types), ResizeObserver, 500-node cap, zoom controls
- Command palette: cmdk polish (recent items, @mention filter, settings/logout actions, mobile full-screen)
- Shortcuts: @github/hotkey for g+letter nav, n+letter create, ?, /, c; Cmd+K for palette
- README.md added with architecture, page list, shortcuts, dev guide
- Bundle: 369 KB gzipped (under 1.5 MB budget)
2026-08-01 02:34:37 +00:00
Hermes c18d7e9abe T7/Phase 5-1: Dashboard page (configurable widget grid, 8 widgets) 2026-08-01 02:21:24 +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 efcc748adb T5: remove stale T1 stub index.tsx (replaced by _app/index.tsx) 2026-08-01 02:00:40 +00:00
Hermes e86a7c0672 T5/Phase 3: SPA shell + navigation
- TanStack Router with type-safe file-based routes
- Sidebar: collapsible, workspace switcher, 12 nav links, user menu
- Topbar: search, quick-add, notifications, user avatar
- cmdk command palette: nav + create + search + @mentions
- Keyboard shortcuts: Cmd+K palette, g+t/h/p/n/c/g/s navigation, ? help
- Theme: dark default, accent picker (slate/blue/green/purple/orange), persisted to localStorage
- Auth: login -> /, logout -> /login, 401 redirect
- Placeholder pages for all 13 nav routes (real in T6/T7)
- Typed API client with useApiQuery/useApiMutation hooks
2026-08-01 02:00:24 +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