Commit Graph
145 Commits
Author SHA1 Message Date
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
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
Hermes 9203aee758 T0: prep — branch baseline, snapshot DB schema, free disk
- Snapshot DB schema to .migration-baseline-schema.sql (ground truth for API port)
- Add BASELINE.md documenting current state before UI redesign
- Pre-flight cleanup: removed node_modules, .next, tsbuildinfo (~527 MB freed)
- Next.js web container stopped (big-bang per user decision)
- Bun 1.3.14 installed via official installer (see script/setup-bun.sh)

Parent: t_e1cbd87d
Follows: HermesBriefcase/Personal/Projects/Project-E-UI-Redesign-Spec.md
2026-08-01 01:08:30 +00:00
Hermes c1e0a083c2 merge: fix all 10 UX bugs (P0 root cause + 9 regressions/polish) — PR #11 2026-08-01 00:42:35 +00:00
Hermes 4c3c3249d4 fix(p2): Calendar view toggle - restore original T3 fix (view prop controlled) 2026-07-31 02:24:07 +00:00
Hermes d059beb7dc fix(p2): Calendar view toggle - key on BigCalendar dynamic import + defaultView 2026-07-31 02:20:40 +00:00
Hermes 0630a12597 fix(p2): Calendar view toggle - use view prop (controlled) as original T3 fix 2026-07-31 02:16:55 +00:00
Hermes e9d1380c88 fix(p2): Calendar view toggle - key on DragAndDropCalendar + view prop (clean) 2026-07-31 02:12:37 +00:00
Hermes 6454462317 fix(p2): Calendar view toggle - key on DragAndDropCalendar + view prop 2026-07-31 02:06:42 +00:00
Hermes bf37f9a488 fix(p2): Calendar view toggle - key on DragAndDropCalendar + view prop + onView handler 2026-07-31 01:56:25 +00:00
Hermes de06a9aa21 fix(p2): Calendar view toggle - key prop on DragAndDropCalendar forces remount 2026-07-31 01:47:47 +00:00
Hermes 4bf1c8bf4f fix(p2): Calendar view toggle - force Suspense remount with key prop 2026-07-31 01:37:59 +00:00
Hermes 08841abd68 fix(p2): Calendar view toggle - sync internal view state with parent prop via useEffect 2026-07-31 01:35:02 +00:00
Hermes ca8ff5d13b fix(p2): Calendar view toggle - use defaultView + key on parent dynamic import 2026-07-31 01:31:47 +00:00
Hermes aef02253db fix(p2): remove key prop from parent, keep view prop in wrapper 2026-07-31 01:29:27 +00:00
Hermes 9e80327be2 fix(p2): use view prop (controlled) + key on parent to force Calendar remount 2026-07-31 01:26:54 +00:00
Hermes ab6344d86d fix(p2): force Calendar remount on view change via key prop on parent 2026-07-31 01:24:08 +00:00
Hermes a18bddf784 fix(p2): use view prop (controlled) + key to force Calendar remount 2026-07-31 01:23:30 +00:00
Hermes a04fbff584 fix(p2): use defaultView + key prop to force Calendar remount on view change 2026-07-31 01:20:33 +00:00
Hermes e3c3054c38 fix(p2): force Calendar remount on view change with key prop 2026-07-31 01:17:05 +00:00
Hermes efe8db108d fix(p3): TipTap focus, Task List toast dedup, TaskCard a11y
Bug #10 (LOW): TipTap editor text input leaks into Search field.
The EditorContent wrapper had no tabIndex so the global keyboard
shortcut (which treats inputs/textareas/buttons as focused but
not contenteditable divs) sent typed text to the search field
instead of the editor. Adding tabIndex={0} makes the wrapper
focusable; TipTap's contentEditable=true then routes the
keyboard events to the editor.

Bug #1 (LOW): Task List view infinite toast loop. The catch block
fired toast.error on every realtime-triggered fetch failure with
no dedup, causing infinite toast spam on 429 or persistent
errors. Realtime subscription also called fetchTasks() on every
event with no debounce, amplifying the problem.

Fixes:
- Add lastErrorRef to track the last error message; only toast
  when the message class changes.
- Distinguish 429/rate-limited from generic 500 in the toast text.
- Reset lastErrorRef on successful fetch.
- Debounce the realtime-triggered refetch by 750ms so event
  bursts collapse to a single fetch.

Bug #8 (LOW): TaskCard in Board view not keyboard-focusable.
The TaskCard in tasks-kanban-view.tsx already has role=button,
tabIndex={0}, onKeyDown for Enter/Space, and aria-label. No
change needed; verified in the tree that the fix is present
(probably landed as part of an earlier leaf integration).

Bug #1 + Bug #8 + Bug #10 all addressed in this commit.

Note: Bug #9 (Search returns No results) is fixed by P0 (the
search route was patched to use resolveActiveDomain). Verified
working without further changes needed.
2026-07-31 01:06:31 +00:00
Hermes 78a9c50ef2 fix(p2): Calendar Week/Day views, Quick Capture, Canvas create
Bug #7 (MEDIUM): Calendar week/day view toggle broken. The
BigCalendarWrapper used defaultView (uncontrolled) so when the
parent updated the view state via onView, the calendar continued
to show the original view. Switched to view (controlled) so the
calendar re-renders with the correct view.

Bug #6 (MEDIUM): Dashboard Quick Capture button was dead. The
Add button had no onClick handler and the form was wired to
the wrong endpoint (per-type /api/tasks|habits|notes). Switched
to POST /api/quick-capture with {type, text} (the new endpoint
created by P0). Added Project to the type select. Added toast
feedback on success/error. Made the Add button type=button with
explicit onClick so it bypasses form-submit and the global
shortcut handler.

Bug #2 (MEDIUM): Canvas create -> page crash. Already fixed by
P0 (commit c3bce0b removed the hardcoded 'personal' domain
filter). The orphan modification to canvas/page.tsx is also
included here to keep the diff complete.

Bug #6 + Bug #7 + Bug #2 all fixed in this commit.
2026-07-31 01:06:20 +00:00
Hermes f388f124e8 fix(p1): wire New habit/New project buttons + fix Domain Add
Bug #3 (HIGH): New habit button on /habits did not open the create
dialog. The HabitCreateDialog was mounted but the topbar's
useCreateDialogStore had no consumer on /habits, so topbar clicks
were no-ops.

Bug #4 (HIGH): New project button on /projects had the same issue.

Fix: mount CreateItemDialog (type=habit or type=project) on each
page so the topbar store is consumed. Switch the page-level button
to use the store too. The existing local HabitCreateDialog /
ProjectCreateDialog still work as a fallback.

Bug #5 (HIGH): Domain Add button on /settings/domains opened the
Command Palette instead of creating the domain. Two-part cause:
1. The sticky topbar Quick add button was visually overlapping
   the form Add button (both anchored top-right). On click the
   topbar handleCreate fired and dispatched a synthetic Cmd+K
   opening the palette.
2. /api/domains POST required a slug field that the form did not
   send, returning 400.

Fix: hide the topbar Quick add button on pages without a relevant
quick-create (only show on /projects, /habits, /tasks). Make the
form Add button explicit type=button with stopPropagation as
defense in depth. Auto-generate the domain slug from the name
on the server when not provided.

Bug #3 + Bug #4 + Bug #5 all fixed in this commit.
2026-07-31 01:06:04 +00:00