Files
clawd/memory/2026-01-29.md

219 lines
17 KiB
Markdown

# 2026-01-29
## Lessons Learned
- **Don't update Donovan in chat about task progress** — put comments and updates directly in the task (HammerQueue or wherever the task lives). He doesn't want chat noise for status updates.
- **Never expose services publicly without asking first** — I enabled hammer.donovankelly.xyz which exposed the Clawdbot Control UI to anyone. Always ask before making something internet-facing.
- **Never use HTTP for external communication** — all cross-server comms must be HTTPS. Added to TOOLS.md rules.
- **Always build and test before pushing** — run `bun run build` (or equivalent) locally before pushing to git. Dokploy builds from git, so broken code = failed deploys.
## Hammer Queue Webhook Fix Verified
- Cron job confirmed the webhook integration is working (3:59 AM UTC)
## Hammer Queue → Hammer Dashboard
- Renamed domain from queue.donovankelly.xyz to dash.donovankelly.xyz via Dokploy API
- Dokploy is at app.dokploy.com (cloud), API key in Bitwarden
- Compose ID: kBdwrcZodIRyNIvQ-wrzG
- Fixed TS build errors (unused var, useEffect return type) before successful deploy
- hammer.donovankelly.xyz Caddy proxy DISABLED — exposed Clawdbot Control UI without auth. Must add auth layer before re-enabling.
## Infrastructure
- Caddy on VPS (72.60.68.214) now proxies:
- `hammer.donovankelly.xyz/hooks/*` → gateway (hooks only, Control UI blocked)
- `ws.hammer.donovankelly.xyz` → gateway (WebSocket, token-auth)
- `app.todo.donovankelly.xyz` → todo frontend
- `api.todo.donovankelly.xyz` → todo backend
- Wildcard DNS `*.hammer.donovankelly.xyz` → 72.60.68.214 (set by Donovan)
- Hostinger firewall opened: SSH, HTTP, HTTPS (TCP)
- Cron job "task-worker" runs every 30min, picks up active tasks, spawns sub-agent to work
- Chat relay architecture: browser → dash backend `/api/chat/ws` (session auth) → `wss://ws.hammer.donovankelly.xyz` (token auth) → gateway
## Dashboard Improvements (Task Worker) - 6:00 AM UTC
- Added Dashboard overview page at `/` — stats grid, active task cards, up-next queue, recent activity feed, recently completed
- Added progress note input UI in TaskDetailPanel (textarea + Cmd+Enter + Add button)
- Added search bar and priority filter to Queue page
- Committed chat backend relay code (WebSocket proxy from dashboard to Clawdbot gateway)
- Gateway-relay.ts now falls back to VITE_WS_TOKEN env var
- Completed "Save/cancel button" task (was already implemented, just marked done)
- Chat still blocked: needs Caddy WSS proxy re-enabled on hammer.donovankelly.xyz (restricted to WS, not control UI)
- Three deploys to Dokploy
## Task Worker: Due Dates, Subtasks, Task Detail Page - 7:00 AM UTC
- Added `due_date` and `subtasks` JSONB columns to tasks schema
- Backend: full CRUD for subtasks (add/toggle/delete at /api/tasks/:id/subtasks)
- Backend: dueDate support in create/update task endpoints
- TaskDetailPanel: due date picker with overdue/due-soon badges, subtask checklist with progress bar
- New TaskPage component: full-page task view at /task/HQ-{number} routes
- Dashboard cards now link to /task/HQ-{number}, show subtask progress bars and due date badges
- Frontend types updated with assigneeName, assigneeId, dueDate, subtasks
- Drizzle migration 0001_mighty_callisto.sql (uses db:push on deploy)
- Deployed to Dokploy
- Chat still blocked: needs Caddy (no sudo access to install)
## Dashboard UX Polish (Task Worker) - 7:30 AM UTC
- Added Toast notification system (success/error/info) with auto-dismiss, context provider
- Added delete task functionality with confirmation dialog (TaskDetailPanel + TaskPage)
- Added due date badges and subtask progress bars to TaskCard in queue view
- Added Escape keyboard shortcut to close detail panels
- Integrated toast feedback into QueuePage (status changes, task creation) and TaskDetailPanel (save)
- TaskPage now has "Danger Zone" section with delete, and "copy link" shows toast
- Deployed to dash.donovankelly.xyz via Dokploy
## Dashboard UX Polish Batch 2 (Task Worker) - 8:00 AM UTC
- Enhanced CreateTaskModal: project selector, due date picker, priority toggle buttons, "More options" for source
- Project (📁) and assignee (👤) badges on TaskCard + dashboard active cards
- Status filter dropdown on QueuePage + clear filters button + filter count indicator
- Ctrl+N keyboard shortcut to create new task from queue page
- Assignee picker in TaskDetailPanel: quick-assign buttons for Hammer/Donovan/David
- Dashboard: Up Next and Recently Completed items now link to task detail pages, priority badges on Up Next
- Search now also matches assignee names
- Three commits pushed and deployed to Dokploy
## Projects Feature (HQ-17) - 5:00 AM UTC
- Built full Projects feature for Hammer Dashboard
- Backend: `projects` table (name, description, context, repos, links), full CRUD API at `/api/projects`
- Backend: added `projectId` FK on tasks table, supported in create/update task APIs
- Frontend: Projects page with card grid, detail view, context editor, repo list, task assignment
- Frontend: Project selector added to TaskDetailPanel (dropdown in task detail)
- Sidebar nav now: Queue → Projects → Chat
- Created initial projects: "Hammer Dashboard" (with full context), "Network App (NWM CRM)"
- Assigned 7 dashboard tasks to Hammer Dashboard project, 1 task to Network App
- HQ-17 completed, HQ-21 updated with progress
- All deployed to dash.donovankelly.xyz via Dokploy
## Chat WS Relay Fix + UX (Task Worker) - 8:30 AM UTC
- Fixed critical chat bug: docker-compose.dokploy.yml was reading `VITE_WS_URL` (not set) instead of `GATEWAY_WS_URL` (set to wss://ws.hammer.donovankelly.xyz)
- Backend gateway-relay.ts also had wrong default and VITE_ env var fallback — cleaned up
- Fixed Elysia TS errors in all error handlers (ElysiaCustomStatusResponse missing .message)
- Chat UX improvements: thinking indicator (bouncing dots), tap-to-show timestamps, double-click thread rename, auto-resize textarea
- Deployed to Dokploy — chat should now connect to gateway via ws.hammer.donovankelly.xyz
- This should unblock Phase 2 of HQ-21 (Chat integration)
## Kanban Board View (Task Worker) - 9:30 AM UTC
- Built KanbanBoard component with 4 status columns: Active, Queued, Blocked, Done
- HTML5 drag-and-drop to move tasks between columns (changes task status)
- Cards show priority badge, project, assignee, due date, subtask progress bar
- View toggle (list/board) in Queue page header with list and board SVG icons
- View preference persisted to localStorage
- Status filter dropdown auto-hides in board view (columns are the filter)
- Deployed to dash.donovankelly.xyz via Dokploy
## Dashboard Polish: Code Splitting, Activity Log, Session Browser (Task Worker) - 9:00 AM UTC
- **Code splitting**: All route pages now lazy-loaded via React.lazy + Suspense. Main JS bundle reduced from 520KB → 266KB (49% reduction). Each page loads on demand.
- **Activity Log page** (`/activity`): Full timeline of all progress notes across all tasks. Grouped by day, filterable by task status (active/completed/queued/blocked). Timeline dot UI with linked task references.
- **Gateway Session Browser**: Chat sidebar now has expandable "Gateway Sessions" section. Fetches real Clawdbot sessions from the gateway relay. Users can click any session (telegram, cron, etc.) to add it as a local thread and chat in that session context.
- Sidebar nav now: Dashboard → Queue → Projects → Activity → Chat
- Deployed to Dokploy via API
## Dark Mode + UX Polish (Task Worker) - 10:30 AM UTC
- Full dark mode support on TaskPage (header, status colors, cards, sidebar, forms, all interactive elements)
- Task descriptions now render as Markdown using ReactMarkdown + remark-gfm (same setup as ChatPage)
- Inline description editing: click "Edit" button or "click to add" for empty descriptions, with markdown hint
- Inline title editing: click task title to edit in-place, Enter to save, Escape to cancel
- Committed previously uncommitted useTheme hook (light/dark/system toggle) and dark mode classes across all components
- Build clean, pushed and deployed to Dokploy
## Task Estimates + Velocity Chart (Task Worker) - 11:30 AM UTC
- Added `estimatedHours` integer column to tasks schema (backend/db)
- Backend: create/update endpoints support estimatedHours field
- New `/api/tasks/stats/velocity` endpoint: 14-day daily completions, weekly velocity avg, estimate totals for active+queued tasks
- Dashboard: Velocity chart widget with CSS-only 7-day bar chart, this-week count, avg/week, estimated hours remaining
- TaskDetailPanel: estimated hours input (number field + clear button)
- CreateTaskModal: estimated hours in "More options" advanced section
- TaskCard, KanbanBoard, TaskPage: ⏱ estimate badge when hours > 0
- Route ordering fix: stats/velocity placed before /:id to avoid parametric route match
- Deployed to Dokploy
## Tags, Sort, Command Palette (Task Worker) - 11:00 AM UTC
- **Tags system**: Added JSONB `tags` column to tasks schema, full backend CRUD, chip editor UI in TaskDetailPanel (Enter/comma to add, Backspace to remove), tag badges on TaskCard, KanbanBoard, TaskPage
- **Sort controls**: Queue page can sort by priority, due date, created, updated, or name, with asc/desc toggle. Persisted to localStorage.
- **Tag filter**: Dropdown in queue header populated from all existing tags across tasks
- **Keyboard shortcuts modal**: Press `?` to toggle. Lists Ctrl+K, Ctrl+N, Esc, Ctrl+Enter, etc.
- **Command palette** (Ctrl+K): Global task search with arrow key navigation, shows active/recent tasks by default, Enter to open task
- **Sidebar notification badges**: Amber badge for active tasks count, red badge for blocked tasks on Queue nav item
- **Backend**: `progressNotes` now updatable via PATCH body (not just POST /notes endpoint)
- 4 commits pushed, 4 deploys to Dokploy
## Network Matching Feature (Task Worker) - 12:30 PM UTC
- Built the last missing MVP feature for the Network App (CRM)
- **Backend** (network-app-api):
- `services/matching.ts`: Rule-based scoring engine comparing clients on industry, interests, location, tags, complementary roles
- Smart filtering: related industry groups, same-company exclusion
- AI intro suggestion generation (Claude/GPT via LangChain)
- `routes/network.ts`: 4 endpoints — `/matches`, `/matches/:clientId`, `/intro`, `/stats`
- **Frontend** (network-app-web):
- `NetworkPage.tsx`: Match cards with score badges, category icons, reason lists, AI intro button
- Stats dashboard: total clients/matches/avg score, top connectors list
- Category filtering (industry/interests/location/business/social) + min score selector
- Added "Network" to sidebar nav between Emails and Settings
- Both repos pushed, builds clean
- Task HQ-3 set to active and assigned to Hammer
## Recurring Tasks Feature (Task Worker) - 12:00 PM UTC
- Added `recurrence` JSONB field to tasks schema (frequency: daily/weekly/biweekly/monthly, autoActivate: boolean)
- Backend: when recurring task is completed, auto-spawns next instance with same title/description/assignee/project/tags, unchecked subtasks, computed next due date
- Optional autoActivate flag to immediately activate next instance (vs queuing it)
- Frontend: recurrence picker buttons in CreateTaskModal (More Options) and TaskDetailPanel
- 🔄 recurrence badges on TaskCard, KanbanBoard, TaskPage, DashboardPage
- Applied recurrence to existing "Email Monitoring (Recurring)" and "Todo App Check (Recurring)" tasks (daily)
- Pushed and deployed to Dokploy
## Network App: Reports, Export, Notifications (Task Worker) - 1:00 PM UTC
- Built Reports & Analytics page (/reports): overview stats grid, 12-month client growth & email activity bar charts, engagement breakdown (engaged/warm/cooling/cold stacked bar), industry & tag distribution charts, at-risk client lists
- CSV Client Export: download button triggers browser file download of all clients with full field set
- Notification Bell: header icon with live count badge, dropdown with overdue follow-ups, upcoming events, stale clients, pending drafts. Priority-sorted, dismissable, auto-refreshes every 5 min
- Backend: 6 new API endpoints in /reports route (overview, growth, industries, tags, engagement, notifications, export/clients)
- Added Reports nav item to sidebar between Network and Settings
- Both repos pushed and deployed to Dokploy (API: UKrNvUyMCdaSWkl6DcAGA, Web: Sa1LrtH5uu-a7chrtebXb)
## Network App: Command Palette, Dark Mode, Pinned Clients (Task Worker) - 1:30 PM UTC
- **Command Palette (Ctrl+K)**: Global search component searching clients, pages, and actions. Arrow key navigation, grouped results (Pages/Clients/Actions), keyboard hints footer. Search trigger button with ⌘K hint in header bar.
- **Dark Mode**: Full theme toggle (light/dark/system) with localStorage persistence. useTheme hook, ThemeToggle component. Applied across Layout sidebar/header, DashboardPage, ClientsPage, ClientDetailPage, LoginPage, Modal. Tailwind v4 `@custom-variant dark` for class-based dark mode. Updated index.css with dark body styles.
- **Pinned/Favorite Clients**: usePinnedClients hook (localStorage-backed). Star button on ClientDetailPage header and Dashboard recent clients. Pinned clients grid section on Dashboard. No backend changes needed.
- Built clean, pushed to git, deployed web frontend to Dokploy (Sa1LrtH5uu-a7chrtebXb)
## Network App: Full Dark Mode + Calendar View (Task Worker) - 2:00 PM UTC
- Added dark mode (`dark:` variants) to ALL remaining pages: SettingsPage, EventsPage, EmailsPage, NetworkPage, ReportsPage, AdminPage, ForgotPasswordPage, ResetPasswordPage, InvitePage
- Added dark mode to components: Badge, CSVImportModal, EmptyState, NotificationBell, EmailComposeModal, ClientForm
- Built monthly calendar view for Events page: month grid with event type color dots, prev/next month navigation, today highlight, click day to see events
- Fixed: sub-agent had reverted lazy-loaded code splitting in App.tsx — restored React.lazy + Suspense for all route pages
- Build clean, pushed, deployed to Dokploy (Sa1LrtH5uu-a7chrtebXb)
## nKode Dokploy Setup (HQ-27) - 3:45 PM UTC
- Task: Set up Dokploy project for nKode stack (frontend + backend + db)
- Found existing nKode project (rqBLzpkkE9b7hlQHh6tBG) already had frontend + backend as individual Dokploy apps
- Frontend: app.nkode.donovankelly.xyz (nkode-web.git, main branch) - serving ✅
- Backend: api.nkode.donovankelly.xyz (nkode-rs.git, fix/frontend-auth-rebuild branch) - responding ✅
- Added Postgres 16 Alpine database (postgresId: -kClddhuQsAWjy-ZP4anV, container: nkode-db-4wkbe1)
- Updated backend env with DATABASE_URL pointing to internal Postgres
- Stored DB creds in Bitwarden shared vault ("nKode Postgres (Dokploy)")
- Cleaned up duplicate empty nKode project (wCTz9G4sWGVuxBwwx0LEk)
- Redeployed backend with new env vars
- Used individual Dokploy apps + managed Postgres (not compose) — better for independent deploys and auto-TLS
## nKode Backend: Health Endpoint (HQ-29) - 4:20 PM UTC
- Task activated via cron: Dockerize nkode-rs and deploy to api.nkode.donovankelly.xyz
- Found backend already deployed and running (OIDC discovery working, all routes operational)
- Dockerfile already existed (multi-stage: rust:1.88-bookworm → debian:bookworm-slim)
- Env vars configured: DATABASE_URL, CORS_ORIGINS, RUST_LOG, OIDC_ISSUER
- Added GET /health endpoint returning {"status":"ok"} (routes.rs + main.rs)
- Pushed to feat/health-endpoint branch (main is protected, needs PR approval)
- Temporarily switched Dokploy to build from feat branch, deployed, verified /health returns 200
- Switched Dokploy back to main branch
- PR #9 open: https://git.infra.nkode.tech/dkelly/nkode-rs/pulls/9 — needs Donovan to approve & merge
## That2ndGuy Pitch Deck (Task Worker) - 4:30 PM UTC
- Activated HQ task for That2ndGuy Valuetainment pitch deck (high priority, David's request)
- Researched golf apparel market: $4.8B (2025), 6%+ CAGR to $7B+ by 2032
- Key stat: 47.2M US golf participants, 18-34 now largest on-course demo at 6.3M
- Mapped competitive landscape: Malbon Golf, Eastside Golf, Bogey Boys, Metalwood, Students Golf — none scaled to mainstream DTC
- Created 13-slide investor pitch deck: problem, market, demographics, competition, brand positioning, product line, GTM, revenue projections, ask ($250K seed), Valuetainment partnership value
- Files at projects/that2ndguy-pitch/ (PITCH-DECK.md + MARKET-RESEARCH.md)
- Set to blocked: needs David's brand-specific details (logo, products, founder story) + visual design for actual slides
- that2ndguy.com domain not yet live
## Shared Services Registry Completed (Task Worker) - 4:35 PM UTC
- Created comprehensive infrastructure inventory at notes/reference/shared-services-registry.md
- Documented: 2 VPS hosts, 9 subdomains, 7 Dokploy services + 3 Postgres DBs, 13 Gitea repos, all API keys/accounts
- Identified gaps: no transactional email (Resend/SendGrid), no Stripe, no analytics, no error tracking
- Task completed and pushed to notes repo