Commit Graph
62 Commits
Author SHA1 Message Date
bot-hermes d92311da6a Merge remote-tracking branch 'origin/wt/sweep-B' into integration/sweep-fixes 2026-08-06 13:57:53 +00:00
bot-hermes ca7a0d7ff7 fix(reports): honor passed token in report-service generate* helpers
The generateWeeklySummary/generateProjectHealth/generateHabitAnalysis/
generateTimeAudit helpers all had "const pb = token ? createAdminClient()
: createAdminClient();" — both branches return the admin client, so a
passed user token was silently discarded and every caller got admin-level
access. Use createPocketBaseClient(token) when a token is provided,
matching the sibling project-service.ts / note-service.ts pattern.
2026-08-06 13:56:29 +00:00
bot-hermes ab7735d6fc fix(graph): filter soft-deleted projects in getGraphData
projectIds query omitted isNull(projects.deletedAt), unlike the sibling
projectRows query, so sections of soft-deleted projects were loaded as
orphan nodes via inArray(sections.projectId, projectIds).
2026-08-06 13:56:22 +00:00
bot-hermes 2dec21d886 fix(tasks,habits): replace dead PocketBase stubs with Drizzle ORM + soft-delete + activity feed
GET/PATCH/DELETE for single task and habit used createPocketBaseClient(),
which is a dead stub, and DELETE did a hard delete violating the soft-delete
rule in AGENTS.md. Rewrite with Drizzle ORM: soft-delete (deleted_at),
activity feed insert via recordActivity(), Zod validation, parent-task
existence check, workspace access check, and 404 NOT_FOUND handling.
2026-08-06 13:53:33 +00:00
bot-hermes 2bb28fe65f fix(tasks): support status query param in list API and use it in today-tasks widget
The dashboard widget was filtering with a broken filter=status!=done query
param that the list API never interpreted, so completed tasks could appear.
Add a status= todo,in_progress filter to GET /api/tasks and update the widget
to use it (also fix domain badge to use domainId).
2026-08-06 13:53:29 +00:00
Hermes affdf1661d fix: map Drizzle camelCase fields to frontend snake_case fields in reports API 2026-08-02 02:26:36 +00:00
Hermes 7297b7075e fix: reports API - add DB table, rewrite routes with Drizzle, fix TipTap type errors
Added reports table to PostgreSQL and Drizzle schema. Rewrote reports API routes to use Drizzle ORM instead of PocketBase stub. Fixed shared schema to match frontend field names. Fixed TipTap v3 type errors in note-editor.tsx and report-editor.tsx (StarterKit cast+chain as any).
2026-08-02 02:22:31 +00:00
Hermes 0df6d1c1c8 feat: add Edit/Delete dropdown menus to habits, projects, and sections
- Habits page: Add DropdownMenu with Edit/Delete options, Edit dialog
  (name/description/frequency/difficulty), Delete confirmation
- Projects page: Add DropdownMenu with Edit/Delete options, Edit dialog
  (name/description/status), Delete confirmation
- Project detail page: Add DropdownMenu with Edit/Delete per section,
  Edit Section dialog (name/kind/status), Delete confirmation
2026-08-02 01:25:14 +00:00
bot-hermes 3708505b00 fix: remove completionMode/color/icon from habits route (not in schema) 2026-07-29 18:50:32 +00:00
bot-hermes f5121f3b8d fix: rewrite /api/tasks, /api/habits, /api/projects to use Drizzle ORM instead of PocketBase stub 2026-07-29 18:48:10 +00:00
bot-hermes 0de8f3837f fix: restore domainId prop to TasksKanbanView and TasksListView 2026-07-29 15:26:02 +00:00
bot-hermes bc27e3e4bc fix: wrap tasks page in RealtimeProvider to prevent useRealtimeContext error 2026-07-29 15:23:54 +00:00
bot-hermes dbce018ce5 fix: use sql tagged template for pg_notify instead of db.execute 2026-07-29 13:07:03 +00:00
bot-hermes 83befd6a84 fix: activity.ts pg_notify syntax and graph-service.ts sections empty inArray 2026-07-29 13:03:55 +00:00
bot-hermes 4089d7464c fix: use whitelist sort columns in domains route to fix TypeScript error 2026-07-29 12:59:20 +00:00
bot-hermes f5463f21b0 fix: rewrite /api/domains route to use Drizzle ORM instead of PocketBase stub 2026-07-29 12:57:06 +00:00
bot-hermes 700d1456ac fix: remove .unref() from middleware setInterval (Edge Runtime incompatibility) 2026-07-29 12:47:39 +00:00
bot-hermes ed3d3ae8d1 fix: rename [id] to [domainId] in domains API route to resolve Next.js param conflict 2026-07-29 12:44:41 +00:00
bot-hermes 326af9fd48 fix: rename [id] to [projectId] in projects API route to resolve Next.js param conflict 2026-07-29 12:39:08 +00:00
bot-hermes 4f0010fe40 Merge rrule import fix 2026-07-29 12:30:17 +00:00
Hermes Coding Manager 30e775a809 fix(worker): use CJS-compatible rrule import for Node ESM runtime
The rrule v2.8.1 package's main field points to a CJS bundle. When the worker
runs under Node 22 with "type": "module", Node resolves to the CJS main which
only has a default export. The previous 'import { RRule } from rrule' worked
during typecheck (TypeScript uses the .d.ts) but crashed at runtime:

  SyntaxError: The requested module 'rrule' does not provide an export named 'RRule'

Use namespace-default import + destructure to handle both CJS and ESM at runtime
while preserving the static RRule reference. Verified with node --input-type=module
that RRule.fromString works correctly.

This was a deploy blocker: docker compose up kept restarting the worker.
2026-07-29 08:30:10 -04:00
bot-hermes 33f1009946 Merge v2 full rewrite (P1-P6) 2026-07-29 12:25:13 +00:00
Hermes Coding Manager 813c97a016 chore(integration): fix lint warnings (react-hooks/exhaustive-deps, react/no-unescaped-entities, unused-vars)
Leftover lint cleanups to make 'npm run lint' pass on the integrated branch:
- calendar/page.tsx: add eslint-disable for mount-only useEffect blocks
- import/route.ts: replace destructure-and-ignore with renames (_id, _created, _updated)
- settings-agents.tsx: escape apostrophe in JSX text
2026-07-29 08:16:22 -04:00
Hermes Coding Manager 0aef472252 chore(integration): drop dead 'cli' script referencing removed packages/cli 2026-07-29 08:10:08 -04:00
Hermes Coding Manager d7320be5e3 chore(integration): drop broken @project-e/cli, add eslint config
- Remove packages/cli (referenced dropped v1 'records' table, broken since 6c438ea)
- Remove packages/cli from root workspaces
- Add eslint + eslint-config-next to apps/web so 'npm run lint' runs
- Regenerate package-lock.json

This unblocks typecheck/build/lint for the v2 rewrite.
2026-07-29 08:09:59 -04:00
Hermes Coding Manager e604ff290b Phase 6: MCP + Webhooks + Worker + Polish 2026-07-29 08:06:13 -04:00
Hermes Coding Manager 41f514bf15 Phase 5: Calendar + Dashboard + Search 2026-07-29 08:06:12 -04:00
Hermes Coding Manager 71e81fb77a Phase 4: Notes + Graph + Wikilinks 2026-07-29 08:06:12 -04:00
Hermes Coding Manager c8ca0c5c43 Phase 3: Habits + Projects 2026-07-29 08:06:10 -04:00
Hermes Coding Manager 8dcf4ef0b8 Phase 2: Tasks 2026-07-29 08:06:07 -04:00
Hermes Coding Manager 7307332ff3 Phase 1: Foundation (schema + auth + realtime + shell) 2026-07-29 08:06:04 -04:00
mbatchelder e5b7d9e2ee feat: Phase 6 - MCP + Webhooks + Worker + Polish
- MCP server: stateless JSON-RPC 2.0 with 18 tools (tasks, habits, projects, notes, domains, search, activity)
- Webhooks API: CRUD routes under /api/domains/[domainId]/webhooks/ with test endpoint and deliveries log
- Webhook delivery: HMAC-SHA256 signed POST with retry (exponential backoff, max 6)
- Worker rewrite: Drizzle ORM instead of PocketBase, polls jobs table, handles webhook_delivery, recurring_spawn, ai_dispatch
- Rate limiting: token bucket per IP/API key (100 req/min REST, 300 req/min MCP)
- Keyboard help overlay: ? opens Radix Dialog with search/filter, Esc closes
- AI @mention stub: @agent in command palette dispatches CustomEvent
- Mobile responsive: bottom nav, single-column kanban, day view calendar, 44px touch targets
- Accessibility: skip-to-content link, focus rings, aria-labels, color contrast
- E2E tests: mcp.spec.ts, webhooks.spec.ts, realtime.spec.ts added
- Schema: api_keys and webhook_deliveries tables with migration
- Removed old PocketBase-style database.ts from worker
2026-07-29 08:03:28 -04:00
mbatchelder eba1d78fb9 feat: Phase 5 - Calendar + Dashboard + Search
Calendar:
- GET /api/domains/[domainId]/calendar/events?from=&to= — returns tasks, habits, projects, milestones
- PATCH /api/domains/[domainId]/tasks/[id]/schedule — drag-to-reschedule with activity feed
- Calendar UI with month/week/day views via react-big-calendar
- Drag-to-reschedule with SSE updates
- Filter by entity type and domain
- Keyboard shortcuts: t=today, m/w/d=view, ←/→=navigate
- Mobile: auto-switches to day view on small screens

Dashboard:
- GET/PUT /api/domains/[domainId]/dashboard — layout stored in domain custom_fields
- 8 per-widget data endpoints (today-tasks, habit-checklist, weekly-stats, project-progress, upcoming-calendar, recent-notes, activity-feed, quick-capture)
- react-grid-layout with responsive breakpoints (12/8/4 cols)
- Drag-to-reorder, resize, add/remove widgets
- Edit mode toggle, per-workspace layout persistence
- Widget error boundary

Search:
- tsvector columns + GIN indexes on tasks, notes, projects, habits, domains
- GET /api/search?q=&types=&domain= — ranked results with ts_headline snippets
- Dedicated search page with grouped results, filters, recent searches (localStorage)
- Empty state with hints

Schema:
- Added custom_fields jsonb column to domains table (migration 0002)
- Removed stale root app/ directory

Build: passes, typecheck: passes, tests: 18/18 wikilink-parser tests pass
2026-07-29 07:32:47 -04:00
mbatchelder 40a26d2672 feat: Phase 4 - Notes + Graph + Wikilinks
- Wikilink parser: [[Title]], [[Title|Display]], [[entity_type:Title]] patterns
- Notes REST API: CRUD under /api/domains/[domainId]/notes/ with wikilink sync
- Note link service: idempotent wikilink resolution, backlinks, outgoing links
- Notes list page: search, filter (all/pinned/archived), domain selector
- Note editor: TipTap with backlinks panel and outgoing links display
- Graph data API: /api/domains/[domainId]/graph and /api/graph
- Graph view page: D3 force-directed graph with entity type filters, search, zoom
- Keyboard shortcuts: g g → graph, c n → new note
- 18 passing wikilink parser tests
- All API routes follow AGENTS.md contract (activity + pg_notify)
2026-07-29 06:56:23 -04:00
mbatchelder 064a46f97d feat: Phase 3 - Habits + Projects CRUD API, frontend, completions, sections
Habits REST API:
- GET/POST /api/domains/[domainId]/habits (list with filters, create)
- GET/PATCH/DELETE /api/domains/[domainId]/habits/[id] (detail, update, soft delete)
- POST /api/domains/[domainId]/habits/[id]/complete (completion + streak calc)
- GET /api/domains/[domainId]/habits/[id]/completions (list with date range)
- POST/DELETE /api/domains/[domainId]/habits/[id]/tags

Projects REST API:
- GET/POST /api/domains/[domainId]/projects (list with task counts, create)
- GET/PATCH/DELETE /api/domains/[domainId]/projects/[id] (detail with sections/tasks, update, soft delete)

Sections REST API:
- GET/POST /api/domains/[domainId]/projects/[projectId]/sections (list, create)
- GET/PATCH/DELETE /api/domains/[domainId]/projects/[projectId]/sections/[id]

Frontend:
- Habits page: checklist view, difficulty badges, streak display, filter
- Habit create dialog: name, description, frequency, difficulty, goal, unit, reminder, mood toggle
- Habit completion dialog: value, mood (1-5 emoji), notes
- Calendar heatmap: 365-day grid, color by value, hover tooltip
- Projects page: grid of cards with progress bars, status badges, tags
- Project detail page: sections board, drag tasks between sections
- Project create dialog: name, description, status, color picker, target date
- Section dialog: name, kind (section/milestone), status, target date

Keyboard shortcuts: c h (new habit), c p (new project), c s (new section)

All write routes follow AGENTS.md contract (Drizzle + recordActivity + pg_notify).
Build, typecheck, and 15 new tests pass.
2026-07-29 06:37:37 -04:00
mbatchelder 1fcd12fc14 fix: exclude __tests__ from typecheck to avoid jest/next types conflict 2026-07-29 06:18:05 -04:00
mbatchelder d7762143bb test: add Vitest API tests for tasks routes
- Tests for GET, POST, PATCH, DELETE task routes
- Tests for dependency cycle detection
- Jest config with SWC transform and module aliases
2026-07-29 06:14:44 -04:00
mbatchelder b6e2ab415e feat: Phase 2 - Tasks CRUD API, kanban/list UI, dialogs, activity feed, keyboard shortcuts
- Tasks REST API under /api/domains/[domainId]/tasks/ with full CRUD, filtering, pagination
- Complete/uncomplete endpoints
- Bulk update endpoint for drag-to-reorder
- Dependencies API with cycle detection
- Tags API for task tagging
- Activity feed API scoped to workspace
- Updated kanban board view with 4 columns (todo/in_progress/done/cancelled)
- Updated list view with status column and workspace-scoped API calls
- Task create dialog with title, description, status, priority, due date, estimate
- Task detail panel (sheet) with full edit capabilities
- Task activity feed widget
- Keyboard shortcuts: c t (new task), e (edit), d (delete), Space (open), Esc (close), 1-4 (filter)
- All routes follow AGENTS.md contract: Drizzle writes + activity feed + pg_notify
2026-07-29 06:12:35 -04:00
mbatchelder b3ff23a5f0 feat: Phase 1 foundation - schema, auth, realtime, shell
- Rewrote Drizzle schema: 20 tables with enums, relations, indexes
- Generated migration with DROP TABLE records (v1 EAV removal)
- Added passkey auth routes (register/login)
- Added requireWorkspaceAccess helper
- Added seedDefaultData for Personal workspace + welcome note
- Updated SSE endpoint for v2 entities + workspace_id filtering
- Created recordActivity helper (insert + pg_notify)
- Updated sidebar: Graph replaces Reports, removed Analytics
- Updated command palette for v2 entities
- Created AGENTS.md with locked contract
- Created llm-wiki scaffold (5 stubs)
- Added inline AGENT INSTRUCTION comments to all 50 API route files
- Fixed globals.css border-border class conflict
- Updated database.ts stub for v1 compatibility
2026-07-29 05:53:13 -04:00
bot-hermes c5e996326c Merge PR #9: Full UX audit fixes 2026-07-28 22:00:19 +00:00
bot-hermes e21028a64c fix: search route - in-process substring match for cross-entity search 2026-07-28 21:54:50 +00:00
bot-hermes 9ddab4e5a5 fix: round 3 UI gaps - habit edit dialog, domain edit, empty states, domain name resolution 2026-07-28 15:02:01 +00:00
bot-hermes a06d34264d fix: compute project progress, task_count, completed_count in detail API 2026-07-28 14:41:07 +00:00
bot-hermes 945dd8904a fix: allow null due_date in task schema for PATCH updates 2026-07-28 14:20:03 +00:00
bot-hermes b76ba9f5c0 fix: notes page default domain should be empty (fetched from API) 2026-07-28 13:57:20 +00:00
bot-hermes 80834ef121 fix: notes page fetches domains on mount for domain name resolution 2026-07-28 13:54:18 +00:00
bot-hermes 640994c9c1 fix: projects page re-fetches on refreshKey change 2026-07-28 13:45:55 +00:00
bot-hermes b45248be87 fix: resolve domain UUIDs in tasks list view 2026-07-26 01:26:37 +00:00
bot-hermes af7d05be0f fix: 7 UX bugs across dashboard, tasks, projects, calendar, settings
- Dashboard: fetch project progress from /api/projects/[id]/progress
- Tasks List: add DropdownMenuTrigger to More options button
- Projects: add New project button with CreateItemDialog integration
- Settings: use color picker value when creating domains
- Calendar: use dynamic domain options instead of hardcoded list
- Dashboard: make View all button navigate to /tasks
- Dashboard: domain names already resolved via domainMap (verified working)
2026-07-26 01:22:41 +00:00
bot-hermes 953a947874 fix: resolve 15+ UX issues across the full app
- CreateItemDialog: shared Zustand store for dialog state
- TopBar: use store instead of router.push navigation
- TaskDetailPanel: dynamic domain fetch from /api/domains
- TodayTasksWidget: domain name resolution from UUIDs
- ProjectProgressWidget: fetch real progress, default to 0
- Calendar page: domain filter fetches from API dynamically
- Habits page: edit/delete dropdown with AlertDialog
- Projects page: domain name display + delete button
- Notes page: domain picker on creation, names in list
- Settings domains: add color picker input
- Tasks list view: MoreHorizontal wired to edit/delete
- HabitCard: domain resolution + edit/delete dropdown
- PocketBase compat: add JSDoc migration comment
2026-07-25 02:22:01 +00:00