77 Commits

Author SHA1 Message Date
2b9d44cc23 docs(readme): test direct push to main
remove husky pre-commit branch guard -- github
ruleset handles branch protection now
2026-02-16 01:53:59 -07:00
d7a3218ea0
fix(ui): make compass logo link to dashboard home (#96)
The logo in the org switcher is now a separate clickable link
to /dashboard (fullscreen chat). The org name + chevron still
opens the workspace dropdown independently.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-16 01:27:57 -07:00
2b95ae8f15
Unified sidebar header + 5 new themes (#95)
* refactor(ui): unify org switcher with compass header

Merge the separate COMPASS branding and org switcher into a
single clean sidebar header element. The compass logo now lives
inside the org switcher trigger alongside the active org name.

Removes redundant SidebarMenu block from app-sidebar header.
Simplifies the org dropdown to just icon + name + checkmark.

* feat(themes): add 5 new presets

Warm Luxury, Black & White, Tweeter, Orang, and Catppuccin.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-16 00:00:42 -07:00
a0afbf3d70
fix(seed): set organization_id on all seed data (#94)
Customers, vendors, and projects were inserted without
organization_id, making them invisible to org-scoped queries
after multi-tenancy was added. All seed rows now belong to
org-1 (Open Range Construction).

Includes UPDATE statements at the bottom so re-running the
seed fixes existing orphaned rows.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 23:02:35 -07:00
b1f6780166
fix(auth): delete demo cookie in middleware (#93)
The demo cookie deletion in getCurrentUser() was a no-op from
Server Component context (cookies().delete() only works in
Server Actions and Route Handlers). The cookie persisted for
its full 24h lifetime, causing middleware to short-circuit auth
checks even when a real WorkOS session existed.

- Middleware: real session now takes priority over demo cookie,
  stale cookie actively deleted via Set-Cookie on response
- auth.ts: remove early demo-first check and dead deletion code,
  WorkOS session checked before demo fallback
- /demo route: clear compass-active-org so demo doesn't inherit
  a real user's workspace selection

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 22:45:34 -07:00
c75b043259
fix(auth): demo cookie no longer overrides real session (#91)
* feat(security): add multi-tenancy isolation and demo mode

Add org-scoped data isolation across all server actions to
prevent cross-org data leakage. Add read-only demo mode with
mutation guards on all write endpoints.

Multi-tenancy:
- org filter on executeDashboardQueries (all query types)
- org boundary checks on getChannel, joinChannel
- searchMentionableUsers derives org from session
- getConversationUsage scoped to user, not org-wide for admins
- organizations table, members, org switcher component

Demo mode:
- /demo route sets strict sameSite cookie
- isDemoUser guards on all mutation server actions
- demo banner, CTA dialog, and gate components
- seed script for demo org data

Also: exclude scripts/ from tsconfig (fixes build), add
multi-tenancy architecture documentation.

* fix(auth): real session takes priority over demo cookie

The demo cookie was checked unconditionally before WorkOS auth,
so logging in with real credentials after visiting /demo still
returned the demo user. Now getCurrentUser() tries WorkOS first
and only falls back to the demo cookie when no real session
exists. Clears the stale cookie on real login.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 22:21:54 -07:00
ad2f0c0b9c
feat(security): add multi-tenancy isolation and demo mode (#90)
Add org-scoped data isolation across all server actions to
prevent cross-org data leakage. Add read-only demo mode with
mutation guards on all write endpoints.

Multi-tenancy:
- org filter on executeDashboardQueries (all query types)
- org boundary checks on getChannel, joinChannel
- searchMentionableUsers derives org from session
- getConversationUsage scoped to user, not org-wide for admins
- organizations table, members, org switcher component

Demo mode:
- /demo route sets strict sameSite cookie
- isDemoUser guards on all mutation server actions
- demo banner, CTA dialog, and gate components
- seed script for demo org data

Also: exclude scripts/ from tsconfig (fixes build), add
multi-tenancy architecture documentation.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 22:05:12 -07:00
49518d3633
docs(readme): rewrite to reflect current platform (#89)
* docs(readme): rewrite to reflect current platform

The README was referencing PostgreSQL, Prisma, pnpm, Redis,
BullMQ, and construction-specific features that no longer
reflect the actual stack or positioning. Rewritten to align
with the landing page messaging and current tech stack.

* docs(agents): update with new modules and commands

Add testing, desktop, and tauri commands. Expand module
listings with voice, offline sync, desktop, and MCP.
Update project structure tree and add tauri/tiptap gotchas.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 20:49:04 -07:00
143e6b2c46
feat(voice): add Discord-style user bar controls (#88)
Add voice state management, device picker, connection
panel, and mic/headphone/settings controls to sidebar
footer. Voice channels are now clickable (UI state only,
no WebRTC yet).

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 20:22:24 -07:00
d4914c1a46
feat(conversations): add @mentions support (#87)
Add @user, @channel, @here, and @Compass agent mentions
to the conversations module. TipTap Mention extension with
suggestion popup, message_mentions junction table for
efficient querying, push notifications for mentioned users
respecting notifyLevel preferences, and edit support with
mention re-extraction. Also fix crypto.randomUUID fallback
for non-secure contexts.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 19:22:30 -07:00
21edd5469c
feat(ui): redesign landing page and polish dashboard (#86)
Dark cartographic landing page with compass rose animation,
feature cards, modules ticker, and gantt showcase section.
Unified contacts page, settings page routing, sidebar
updates, and VisibilityState type fix in people table.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 18:07:13 -07:00
909af53711
fix(ui): make dashboard context menu work everywhere (#85)
Move DashboardContextMenu to wrap SidebarProvider so the
right-click menu triggers across the entire dashboard
viewport including sidebar, header, and main content.

- MainContent now forwards refs and spreads props for Radix
  asChild compatibility
- FeedbackWidget hoisted above SidebarProvider so
  DashboardContextMenu can access useFeedback from wider
  scope
- NavFiles uses useFilesOptional to avoid crash when
  rendered outside FilesProvider (sidebar is in dashboard
  layout, not files route layout)

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 16:58:33 -07:00
77130dea9b
fix(conversations): replace isomorphic-dompurify with edge-compatible sanitizer (#84)
isomorphic-dompurify depends on jsdom which requires Node.js APIs not
available in Cloudflare Workers. Replaced with a simple regex-based
sanitizer that works in edge runtime.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 16:31:14 -07:00
c2167376bb
Nicholai/fix conversations context (#83)
* fix: extract useConversations hook to dedicated context file

Move the conversations context and hook from the layout file to
src/contexts/conversations-context.tsx. Next.js layouts cannot export
hooks or types - only the default component export is allowed.

* fix(build): prevent esbuild from bundling memory-provider

The memory-provider module imports better-sqlite3, a native Node.js
module that cannot run in Cloudflare Workers. This causes OpenNext
build failures when esbuild tries to resolve the module.

Changes:
- Use dynamically constructed import path to prevent static analysis
- Remove memory provider from getServerDb (never used on Cloudflare)
- Add memory-provider to serverExternalPackages in next.config.ts

* fix(lint): rename module variable to loadedModule

The variable name 'module' is reserved in Next.js and causes ESLint
error @next/next/no-assign-module-variable.

* fix(conversations): use drizzle query for organization members

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 14:33:23 -07:00
d24fb34075
fix(schedule): make Actions dropdown functional with filtering, export, and project switching (#80)
Co-authored-by: Avery Felts <averyfelts@Averys-MacBook-Air.local>
2026-02-15 14:14:34 -07:00
d5a28ee709
fix: extract useConversations hook to dedicated context file (#82)
* fix: extract useConversations hook to dedicated context file

Move the conversations context and hook from the layout file to
src/contexts/conversations-context.tsx. Next.js layouts cannot export
hooks or types - only the default component export is allowed.

* fix(build): prevent esbuild from bundling memory-provider

The memory-provider module imports better-sqlite3, a native Node.js
module that cannot run in Cloudflare Workers. This causes OpenNext
build failures when esbuild tries to resolve the module.

Changes:
- Use dynamically constructed import path to prevent static analysis
- Remove memory provider from getServerDb (never used on Cloudflare)
- Add memory-provider to serverExternalPackages in next.config.ts

* fix(lint): rename module variable to loadedModule

The variable name 'module' is reserved in Next.js and causes ESLint
error @next/next/no-assign-module-variable.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-14 20:56:58 -07:00
40fdf48cbf
feat: add conversations, desktop (Tauri), and offline sync (#81)
* feat: add conversations, desktop (Tauri), and offline sync

Major new features:
- conversations module: Slack-like channels, threads, reactions, pins
- Tauri desktop app with local SQLite for offline-first operation
- Hybrid logical clock sync engine with conflict resolution
- DB provider abstraction (D1/Tauri/memory) with React context

Conversations:
- Text/voice/announcement channels with categories
- Message threads, reactions, attachments, pinning
- Real-time presence and typing indicators
- Full-text search across messages

Desktop (Tauri):
- Local SQLite database with sync to cloud D1
- Offline mutation queue with automatic replay
- Window management and keyboard shortcuts
- Desktop shell with offline banner

Sync infrastructure:
- Vector clock implementation for causality tracking
- Last-write-wins with semantic conflict resolution
- Delta sync via checkpoints for bandwidth efficiency
- Comprehensive test coverage

Also adds e2e test setup with Playwright and CI workflows
for desktop releases.

* fix(tests): sync engine test schema and checkpoint logic

- Add missing process_after column and sync_tombstone table to test schemas
- Fix checkpoint update to save cursor even when records array is empty
- Revert claude-code-review.yml workflow changes to match main

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-14 19:32:14 -07:00
27269be7bf
fix(ci): grant write permissions to Claude GitHub Action (#74)
Update workflow permissions to allow Claude to create branches,
push commits, and create PRs when tagged in issues or comments.

- contents: write - create branches and push commits
- pull-requests: write - create PRs and comments
- issues: write - update issue comments

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-12 16:22:53 -07:00
528e5cd55c
Add Claude Code GitHub Workflow (#73)
* "Claude PR Assistant workflow"

* "Claude Code Review workflow"
2026-02-12 16:02:46 -07:00
91ff64b45a
docs(sidebar): add comprehensive sidebar component documentation (#72)
- Add docs/development/sidebar.md with full architecture explanation
- Cover desktop expanded/collapsed states and mobile sheet rendering
- Document the gap-and-container pattern for layout stability
- Explain collapsed state centering, mobile-specific sizing
- Document the flicker bug fix in useIsMobile hook
- Add animation performance notes (will-change, ease-out)
- Include component reference and common patterns
- Update AGENTS.md with conversations module (WIP) and schema count
- Add sidebar.md to docs/README.md development section

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-12 15:26:34 -07:00
0d1b4714dc
fix(ui): sidebar layout and mobile improvements (#71)
- Fix mobile state initialization bug that caused flickering
  (undefined -> false instead of !!undefined)
- Increase mobile sidebar width from 18rem to 20rem with 85vw max
- Add mobile-specific larger touch targets (44px min height)
- Increase icon and text sizes on mobile for better usability
- Fix collapsed sidebar button centering by reducing padding
- Remove fragile manual translate offsets on lg buttons
- Improve animation performance with will-change and ease-out
- Hide collapsed text instead of translating off-screen

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-12 15:16:03 -07:00
89b0f8e88e
fix(ui): sidebar icon centering and local dev setup (#68) 2026-02-12 08:12:35 -07:00
337117f895
feat(ui): add streaming state and loading skeleton support (#70)
implement short-term generative UI improvements:

- Add StreamingState type ("started" | "streaming" | "done") to ComponentContext
- Add loadingComponent field to catalog for Card, StatCard, DataTable, SchedulePreview
- Create skeleton components (CardSkeleton, StatCardSkeleton, etc.) with animate-pulse
- Add PropSkeleton component for different prop types (text, badge, table-row, etc.)
- Add useStreamingProps/useStreamingProp hooks to track prop arrival during streaming
- Add ComponentLoadingWrapper for prop-level skeleton display (opt-in via enablePropSkeletons)
- Fix JSON parse errors in API routes when request body is incomplete

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-12 06:36:21 -07:00
33b427ed33
feat(ui): improve mobile sidebar and dashboard layout (#67)
* feat(ui): improve mobile sidebar and dashboard layout

- Enlarge compass logo on dashboard page (size-14 idle, size-10 active)
- Reposition logo higher with -mt-16 margin
- Add 6rem spacing between logo and chat
- Remove feedback hover button from bottom right
- Add event-based feedback dialog opening for mobile sidebar
- Remove feedback buttons from site header (mobile and desktop)
- Add mobile theme toggle button to header
- Increase mobile menu hitbox to size-10
- Reduce search hitbox to separate clickable area
- Remove redundant Compass/Get Help/Assistant/Search from sidebar
- Rename "People" to "Team"
- Add mobile-only feedback button to sidebar footer
- Reduce mobile sidebar width to 10rem max-width
- Center sidebar menu icons and labels on mobile
- Clean up mobile-specific padding variants

* chore: add local development setup system

- Create .dev-setup directory with patches and scripts
- Add apply-dev.sh to easily enable local dev without WorkOS
- Add restore-dev.sh to revert to original code
- Document all changes in README.md
- Store cloudflare-context.ts in files/ as new dev-only file
- Support re-apply patches for fresh development sessions

This allows running Compass locally without WorkOS authentication
for development and testing purposes.

---------

Co-authored-by: Avery Felts <averyfelts@Averys-MacBook-Air.local>
2026-02-11 12:49:51 -07:00
04180d4305
feat(settings): redesign modal with improved layout and Agent tab (#66)
* feat(settings): redesign modal with improved layout and Agent tab

- Unified desktop/mobile layout using single Dialog component
- Desktop: 2-column grid (nav 180px | content)
- Mobile: Single column with dropdown navigation
- Fixed modal height to prevent content stretching
- Removed AI chat panel (commented out for future use)
- Renamed 'Slab Memory' to 'Agent' tab
- Added mock Agent settings: Signet ID (ETH) input and Configure button
- Added useChatStateOptional hook to chat-provider for safe context usage
- Fixed provider order in dashboard layout

* chore: add auth-bypass.ts to gitignore for local dev

---------

Co-authored-by: Avery Felts <averyfelts@Averys-MacBook-Air.local>
2026-02-11 00:55:45 -07:00
67412a0b00
feat(header): move feedback button to left (#65)
Place the feedback trigger in the header's left action area on desktop and mobile so it stays visible next to navigation controls.

Use a message-circle icon with a labeled button style, remove the old top-right header placement, and update the dialog copy to clarify that submissions go directly to developers for review.

Co-authored-by: Avery Felts <averyfelts@Averys-MacBook-Air.local>
2026-02-10 21:08:15 -07:00
dc0cd40b13
feat(agent): add Claude Code bridge integration (#60)
Add local daemon that routes inference through user's own Anthropic
API key with filesystem and terminal access. Includes WebSocket
transport, MCP tool adapter, and API key auth.

Key components:
- compass-bridge package: local daemon with tool registry
- WebSocket transport for agent communication
- MCP API key management with HMAC auth and scoped permissions
- Usage tracking (tool calls, duration, success/failure)
- Settings UI for Claude Code configuration
- Migration 0019: mcp_api_keys and mcp_usage tables
- Test suite for auth and transport layers

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-09 00:29:00 -07:00
a7494397f2
docs(all): comprehensive documentation overhaul (#57)
Restructure docs/ into architecture/, modules/, and
development/ directories. Add thorough documentation
for Compass Core platform and HPS Compass modules.
Rewrite CLAUDE.md as a lean quick-reference that
points to the full docs. Rename files to lowercase,
consolidate old docs, add gotchas section.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 19:17:37 -07:00
a25c8a26bc
fix(agent): improve chat message rendering (#56)
Refactor ChatMessage to use AI SDK type guards and
render parts in natural order. Collapse reasoning by
default so thinking tokens don't flood the screen.
Cap reasoning content height during streaming. Add
tool workflow guidance to system prompt.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 13:28:32 -07:00
b24f94e570
feat(dashboards): agent-built custom dashboards (#55)
Persist agent-generated UIs as bookmarkable dashboards
with CRUD, sidebar nav, and iterative editing support.
Max 5 per user. Fresh data on each visit via saved queries.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 09:02:19 -07:00
404a881758
docs(claude): add mobile, themes, plugins, drive (#54)
Document recent features added since initial CLAUDE.md:
- Capacitor mobile app architecture and native hooks
- Plugin/skills system with registry pattern
- Visual theme system with 10 presets + AI generation
- Google Drive integration via service account
- Updated agent harness to reflect unified chat arch
- Expanded project structure and schema file listing

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 02:27:53 -07:00
861cf51d8d
feat(native): Capacitor mobile app for iOS + Android (#50)
* feat(native): Capacitor mobile app shell with native features

Adds iOS + Android native app via Capacitor WebView wrapper
pointing at the live deployment. Includes push notifications,
biometric auth, camera with offline photo queue, offline
detection, status bar theming, keyboard handling, and deep
linking. Zero server-side refactoring required -- web deploys
update the app instantly.

* docs(native): add developer documentation for iOS and Android

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 02:06:59 -07:00
421aad8d23
fix(agent): add error handling and plugin tools (#53)
* fix(agent): add error handling and plugin tools

Replace useless try/catch with streaming-aware error
callbacks. streamText is lazy so errors occur during
streaming, not at call time. Now unwraps RetryError
to extract the actual APICallError with status code
and response body from OpenRouter.

Also adds API key validation, model ID fallback, and
includes plugin tools in the streamText call.

* chore(db): fix file permissions on 0015 snapshot

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-07 02:06:41 -07:00
59688b972f
fix(db): resolve conflict markers in 0016 snapshot (#52)
PR #51 was merged with unresolved conflict markers in
drizzle/meta/0016_snapshot.json, producing invalid JSON.
Reconstructed the correct snapshot from the clean 0015
snapshot + the 0016 migration SQL (custom_themes +
user_theme_preference tables).

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 23:26:10 -07:00
b5211d181d
feat(theme): visual theme system with presets and AI tools (#51)
* feat(theme): visual theme system with presets, custom themes, and AI tools

Runtime theming engine with 10 preset palettes, user custom themes
persisted to D1, animated circle-reveal transitions via View Transition
API, and AI agent tools for generating/editing themes incrementally.

- Theme library: types, presets, CSS injection, font loading, animation
- Theme provider with localStorage cache for instant load (no FOUC)
- Server actions for theme CRUD and user preference persistence
- Agent tools: listThemes, setTheme, generateTheme, editTheme
- Appearance tab extracted from settings modal
- Migration 0015: custom_themes + user_theme_preference tables
- Developer documentation in docs/theme-system.md

* fix(db): make migration 0016 idempotent

tables were already created as 0015 before renumber.
use IF NOT EXISTS so the migration is safe to re-run.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 22:32:21 -07:00
017b0797c7
feat(files): Google Drive integration (#49)
* feat(files): wire file browser to Google Drive API

replace mock file data with real Google Drive integration
via domain-wide delegation (service account impersonation).

- add google drive REST API v3 library (JWT auth, drive
  client, rate limiting, token cache)
- add schema: google_auth, google_starred_files tables,
  users.googleEmail column
- add 16+ server actions for full CRUD (browse, upload,
  download, create folders, rename, move, trash/restore)
- add download proxy route with google-native file export
- add folder-by-ID route (/dashboard/files/folder/[id])
- refactor use-files hook to fetch from server actions
  with mock data fallback when disconnected
- update all file browser components (upload, rename,
  move, context menu, breadcrumb, drag-drop, nav)
- add settings UI: connection, shared drive picker,
  user email mapping
- extract shared AES-GCM crypto from netsuite module
- dual permission: compass RBAC + google workspace ACLs

* docs(files): add Google Drive integration guide

covers architecture decisions, permission model,
setup instructions, and known limitations.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 22:18:25 -07:00
e3b708317c
feat(agent): AI model config with admin controls (#48)
* feat(agent): add AI model config with admin controls

per-user model selection with admin cost ceiling and
toggle. models filter/sort by output token cost. adds
usage tracking, provider icons, and settings UI.

* docs: add openclaw discord integration notes

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 20:36:31 -07:00
f8faabd508
feat(agent): localize date/time in system prompt (#45)
Send the user's IANA timezone (Intl API) as x-timezone header
from the chat transport. The system prompt now formats date
and time in the user's local timezone instead of UTC.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 18:08:16 -07:00
3e5b351b19
refactor(agent): replace monolithic prompt with section builders (#44)
Extract the ~227-line template literal in buildSystemPrompt()
into 11 composable section builders with a data-driven tool
registry. Adds PromptMode support (full/minimal/none) for
future use without drowning in conditionals. Fixes the unsafe
`as` cast on catalog entries with proper type narrowing.

Same persona, same tools, same behavior — just structured.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 17:57:44 -07:00
8b34becbeb
feat(agent): AI agent harness with memory, GitHub, audio & feedback (#37)
* feat(agent): replace ElizaOS with AI SDK v6 harness

Replace custom ElizaOS sidecar proxy with Vercel AI SDK v6 +
OpenRouter provider for a proper agentic harness with multi-step
tool loops, streaming, and D1 conversation persistence.

- Add AI SDK agent library (provider, tools, system prompt, catalog)
- Rewrite API route to use streamText with 10-step tool loop
- Add server actions for conversation save/load/delete
- Migrate chat-panel and dashboard-chat to useChat hook
- Add action handler dispatch for navigate/toast/render tools
- Use qwen/qwen3-coder-next via OpenRouter (fallbacks disabled)
- Delete src/lib/eliza/ (replaced entirely)
- Exclude references/ from tsconfig build

* fix(chat): improve dashboard chat scroll and text size

- Rewrite auto-scroll: pin user message 75% out of
  frame after send, then follow bottom during streaming
- Use useEffect for scroll timing (DOM guaranteed ready)
  instead of rAF which fired before React commit
- Add user scroll detection to disengage auto-scroll
- Bump assistant text from 13px back to 14px (text-sm)
- Tighten prose spacing for headings and lists

* chore: installing new components

* refactor(chat): unify into one component, two presentations

Extract duplicated chat logic into shared ChatProvider context
and useCompassChat hook. Single ChatView component renders as
full-page hero on /dashboard or sidebar panel elsewhere. Chat
state persists across navigation.

New: chat-provider, chat-view, chat-panel-shell, use-compass-chat
Delete: agent-provider, chat-panel, dashboard-chat, 8 deprecated UI files
Fix: AI component import paths (~/  -> @/), shadcn component updates

* fix(lint): resolve eslint errors in AI components

- escape unescaped entities in demo JSX (actions, artifact,
  branch, reasoning, schema-display, task)
- add eslint-disable for @ts-nocheck in vendor components
  (file-tree, terminal, persona)
- remove unused imports in chat-view (ArrowUp, Square,
  useChatPanel)

* feat(agent): rename AI to Slab, add proactive help

rename assistant from Compass to Slab and add first
interaction guidance so it proactively offers
context-aware help based on the user's current page.

* fix(build): use HTML entity for strict string children

ReasoningContent expects children: string, so JSX
expression {"'"} splits into string[] causing type error.
Use &apos; HTML entity instead.

* feat(agent): add memory, github, audio, feedback

- persistent memory system (remember/recall across sessions)
- github integration (commits, PRs, issues, contributors)
- audio transcription via Whisper API
- UX feedback interview flow with auto-issue creation
- memories management table in settings
- audio waveform visualization component
- new schema tables: slab_memories, feedback_interviews
- enhanced system prompt with proactive tool usage

* feat(agent): unify chat into single morphing instance

Replaces two separate ChatView instances (page + panel) with
one layout-level component that transitions between full-page
and sidebar modes. Navigation now actually works via proper
AI SDK v6 part structure detection, with view transitions for
smooth crossfades, route validation to prevent 404s, and
auto-opening the panel when leaving dashboard.

Also fixes dark mode contrast, user bubble visibility, tool
display names, input focus ring, and system prompt accuracy.

* refactor(agent): rewrite waveform as time-series viz

Replace real-time frequency equalizer with amplitude
history that fills left-to-right as user speaks.
Bars auto-calculated from container width, with
non-linear boost and scroll when full.

* (feat): implemented architecture for plugins and skills, laying a foundation for future implementations of packages separate from the core application

* feat(agent): add skills.sh integration for slab

Skills client fetches SKILL.md from GitHub, parses
YAML frontmatter, and stores content in plugin DB.
Registry injects skill content into system prompt.
Agent tools and settings UI for skill management.

* feat(agent): add interactive UI action bridge

Wire agent-generated UIs to real server actions via
an action bridge API route. Forms submit, checkboxes
persist, and DataTable rows support CRUD operations.

- action-registry.ts: maps 19 dotted action names to
  server actions with zod validation + permissions
- /api/agent/action: POST route with auth, permission
  checks, schema validation, and action execution
- schema-agent.ts: agent_items table for user-scoped
  todos, notes, and checklists
- agent-items.ts: CRUD + toggle actions for agent items
- form-context.ts: FormIdProvider for input namespacing
- catalog.ts: Form component, value/onChangeAction props,
  DataTable rowActions, mutate/confirmDelete actions
- registry.tsx: useDataBinding on all form inputs, Form
  component, DataTable row action buttons, inline
  Checkbox/Switch mutations
- actions.ts: mutate + confirmDelete handlers that call
  the action bridge, formSubmit now collects + submits
- system-prompt.ts: interactive UI patterns section
- render/route.ts: interactive pattern custom rules

* docs: reorganize into topic subdirectories

Move docs into auth/, chat/, openclaw-principles/,
and ui/ subdirectories. Add openclaw architecture
and system prompt documentation.

* feat(agent): add commit diff support to github tools

Add fetchCommitDiff to github client with raw diff
fallback for missing patches. Wire commit_diff query
type into agent github tools.

* fix(ci): guard wrangler proxy init for dev only

initOpenNextCloudflareForDev() was running unconditionally
in next.config.ts, causing CI build and lint to fail with
"You must be logged in to use wrangler dev in remote mode".
Only init the proxy when NODE_ENV is development.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-06 17:04:04 -07:00
e9faea5596
feat(agent): replace ElizaOS with AI SDK v6 harness (#36)
* feat(agent): replace ElizaOS with AI SDK v6 harness

Replace custom ElizaOS sidecar proxy with Vercel AI SDK v6 +
OpenRouter provider for a proper agentic harness with multi-step
tool loops, streaming, and D1 conversation persistence.

- Add AI SDK agent library (provider, tools, system prompt, catalog)
- Rewrite API route to use streamText with 10-step tool loop
- Add server actions for conversation save/load/delete
- Migrate chat-panel and dashboard-chat to useChat hook
- Add action handler dispatch for navigate/toast/render tools
- Use qwen/qwen3-coder-next via OpenRouter (fallbacks disabled)
- Delete src/lib/eliza/ (replaced entirely)
- Exclude references/ from tsconfig build

* fix(chat): improve dashboard chat scroll and text size

- Rewrite auto-scroll: pin user message 75% out of
  frame after send, then follow bottom during streaming
- Use useEffect for scroll timing (DOM guaranteed ready)
  instead of rAF which fired before React commit
- Add user scroll detection to disengage auto-scroll
- Bump assistant text from 13px back to 14px (text-sm)
- Tighten prose spacing for headings and lists

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-05 18:07:25 -07:00
abb2ac6780
feat(agent): add AI chat and fix dashboard 500s (#35)
* feat(agent): add AI chat panel and dashboard updates

Add ElizaOS-powered agent chat panel with streaming,
voice input, markdown rendering, and page-aware context.
Update dashboard layout with context menu and refactored
pages. Add agent memory schema, new UI components,
and fix lint errors across AI-related files.

* fix(auth): use Host header for SSO redirect URI

nextUrl.origin returns http://localhost:3000 on CF Workers,
breaking OAuth callbacks. Use Host header to derive the
correct production origin for WorkOS redirect URI.

* fix(auth): add Toaster to auth layout, fix error codes

Auth pages had no Toaster component so toast.error() calls
were invisible. Also return 401 for auth errors instead of
generic 500 from the login API.

* fix(dashboard): force-dynamic on all dashboard routes

All dashboard routes use headers() via auth, causing
static-to-dynamic runtime errors on CF Workers (500s).
Add force-dynamic to layout and server component pages.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-05 16:10:25 -07:00
a0f7852845
feat(agent): add AI chat panel and dashboard updates (#34)
* feat(agent): add AI chat panel and dashboard updates

Add ElizaOS-powered agent chat panel with streaming,
voice input, markdown rendering, and page-aware context.
Update dashboard layout with context menu and refactored
pages. Add agent memory schema, new UI components,
and fix lint errors across AI-related files.

* fix(auth): use Host header for SSO redirect URI

nextUrl.origin returns http://localhost:3000 on CF Workers,
breaking OAuth callbacks. Use Host header to derive the
correct production origin for WorkOS redirect URI.

* fix(auth): add Toaster to auth layout, fix error codes

Auth pages had no Toaster component so toast.error() calls
were invisible. Also return 401 for auth errors instead of
generic 500 from the login API.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-05 15:56:06 -07:00
a0dd50f59b
feat(auth): add user profiles and improve auth security (#33)
- Wire up real user data to sidebar, header, and account modal
- Add functional profile editing (first name, last name) via WorkOS API
- Add password change functionality via WorkOS API
- Add logout functionality to sidebar and header dropdowns
- Migrate from manual WorkOS SDK to @workos-inc/authkit-nextjs
- Add server-side input validation with Zod schemas for all auth routes
- Add shared validation schemas for auth, users, teams, schedule, financial
- Fix 30-second auto-logout by properly handling refresh tokens
- Add SidebarUser type and toSidebarUser helper for UI components
- Add getInitials utility for avatar fallbacks
- Document rate limiting configuration for Cloudflare WAF
- Fix login page Suspense boundary for Next.js 15 compatibility
- Remove obsolete workos-client.ts in favor of authkit helpers

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-05 08:20:51 -07:00
2985d23d17
feat: add auth, people, netsuite, financials, and mobile UI (#31)
* ci: retrigger build

* ci: retrigger build

* fix(auth): use AuthKit hosted login instead of custom forms

* fix(auth): replace AuthKit with direct JWT session
and add SSO providers

Remove authkit-nextjs dependency from middleware and
auth.ts. Custom login forms now set a raw JWT cookie
that middleware and getCurrentUser() read directly via
JWT payload decode. Add Google, Microsoft, GitHub, and
Apple SSO via WorkOS getAuthorizationUrl + code exchange
callback. Login route now upserts users in DB after
authentication.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 17:23:14 -07:00
d30decf723
feat(ui): add mobile support and dashboard improvements (#30)
* feat(schema): add auth, people, and financial tables

Add users, organizations, teams, groups, and project
members tables. Extend customers/vendors with netsuite
fields. Add netsuite schema for invoices, bills,
payments, and credit memos. Include all migrations,
seeds, new UI primitives, and config updates.

* feat(auth): add WorkOS authentication system

Add login, signup, password reset, email verification,
and invitation flows via WorkOS AuthKit. Includes auth
middleware, permission helpers, dev mode fallbacks,
and auth page components.

* feat(people): add people management system

Add user, team, group, and organization management
with CRUD actions, dashboard pages, invite dialog,
user drawer, and role-based filtering. Includes
WorkOS invitation integration.

* feat(netsuite): add NetSuite integration and financials

Add bidirectional NetSuite REST API integration with
OAuth 2.0, rate limiting, sync engine, and conflict
resolution. Includes invoices, vendor bills, payments,
credit memos CRUD, customer/vendor management pages,
and financial dashboard with tabbed views.

* feat(ui): add mobile support and dashboard improvements

Add mobile bottom nav, FAB, filter bar, search, project
switcher, pull-to-refresh, and schedule mobile view.
Update sidebar with new nav items, settings modal with
integrations tab, responsive dialogs, improved schedule
and file components, PWA manifest, and service worker.

* ci: retrigger build

* ci: retrigger build

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 16:39:39 -07:00
fbd31b58ae
feat(netsuite): add NetSuite integration and financials (#29)
* feat(schema): add auth, people, and financial tables

Add users, organizations, teams, groups, and project
members tables. Extend customers/vendors with netsuite
fields. Add netsuite schema for invoices, bills,
payments, and credit memos. Include all migrations,
seeds, new UI primitives, and config updates.

* feat(auth): add WorkOS authentication system

Add login, signup, password reset, email verification,
and invitation flows via WorkOS AuthKit. Includes auth
middleware, permission helpers, dev mode fallbacks,
and auth page components.

* feat(people): add people management system

Add user, team, group, and organization management
with CRUD actions, dashboard pages, invite dialog,
user drawer, and role-based filtering. Includes
WorkOS invitation integration.

* feat(netsuite): add NetSuite integration and financials

Add bidirectional NetSuite REST API integration with
OAuth 2.0, rate limiting, sync engine, and conflict
resolution. Includes invoices, vendor bills, payments,
credit memos CRUD, customer/vendor management pages,
and financial dashboard with tabbed views.

* ci: retrigger build

* fix: add mobile-list-card dependency for people-table

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 16:36:19 -07:00
6a1afd7b49
feat(people): add people management system (#28)
* feat(schema): add auth, people, and financial tables

Add users, organizations, teams, groups, and project
members tables. Extend customers/vendors with netsuite
fields. Add netsuite schema for invoices, bills,
payments, and credit memos. Include all migrations,
seeds, new UI primitives, and config updates.

* feat(auth): add WorkOS authentication system

Add login, signup, password reset, email verification,
and invitation flows via WorkOS AuthKit. Includes auth
middleware, permission helpers, dev mode fallbacks,
and auth page components.

* feat(people): add people management system

Add user, team, group, and organization management
with CRUD actions, dashboard pages, invite dialog,
user drawer, and role-based filtering. Includes
WorkOS invitation integration.

* ci: retrigger build

* fix: add mobile-list-card dependency for people-table

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 16:28:43 -07:00
2f613ef453
feat(auth): add WorkOS authentication system (#27)
* feat(schema): add auth, people, and financial tables

Add users, organizations, teams, groups, and project
members tables. Extend customers/vendors with netsuite
fields. Add netsuite schema for invoices, bills,
payments, and credit memos. Include all migrations,
seeds, new UI primitives, and config updates.

* feat(auth): add WorkOS authentication system

Add login, signup, password reset, email verification,
and invitation flows via WorkOS AuthKit. Includes auth
middleware, permission helpers, dev mode fallbacks,
and auth page components.

* ci: retrigger build

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 16:24:25 -07:00
9c3a19279a
feat(schema): add auth, people, and financial tables (#26)
Add users, organizations, teams, groups, and project
members tables. Extend customers/vendors with netsuite
fields. Add netsuite schema for invoices, bills,
payments, and credit memos. Include all migrations,
seeds, new UI primitives, and config updates.

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-04 16:18:39 -07:00