Commit graph

95 commits

Author SHA1 Message Date
yushen
680668ffdb feat(workspace): add context field for AI agent background info
Add a `context` text field to workspaces, allowing users to provide
background information and context for AI agents working in the
workspace. Full stack: migration, sqlc queries, Go handler, TS types,
SDK, and settings page UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:59:11 +08:00
Jiayuan Zhang
20f5022664 fix(web): wrap search params pages in suspense 2026-03-24 12:07:20 +08:00
Jiayuan Zhang
cdfa63af15 feat(runtime): add local codex daemon pairing 2026-03-24 12:03:14 +08:00
Naiyuan Qing
0afff49728 feat(web): enhance issue detail page with comment editing, deletion, and real-time updates
- Add inline comment editing and delete functionality
- Wire up WebSocket events for comment create/update/delete
- Expand issue property editing (due date, acceptance criteria, context refs)
- Add real-time issue updates via WebSocket

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:23:33 +08:00
Naiyuan Qing
6185b7571e refactor(web): extract shared components, add tab system, and restructure issues page
- Extract AppSidebar, TabBar, TabLink into dashboard _components
- Add tab-store for browser-like tab navigation state
- Move StatusIcon/PriorityIcon to issues/_components, config to _config
- Replace inline CreateIssueForm with Dialog (status/priority selection)
- Add calendar component to packages/ui
- Simplify dashboard layout with SidebarProvider

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:19:59 +08:00
Jiayuan Zhang
b4303f9bec feat(agent): add agent management UI, skills/tools/triggers, and issue assignment
- Complete agents management page with create dialog, runtime device selector,
  skills/tools/triggers/tasks tabs, and agent detail view
- Add AssigneePicker to issue detail page for assigning to members or agents
- Extend agent types with description, skills, tools, triggers, RuntimeDevice
- Add SDK methods for agent CRUD and task listing
- Add migration 002 for agent config columns (skills, tools, triggers)
- Update seed data with realistic agent configurations
- Use auth context as single source of truth for agents (fixes state sync)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:31:25 +08:00
Jiayuan Zhang
81e64e9fce Add workspace management and isolated worktree environments 2026-03-23 18:12:11 +08:00
Jiayuan Zhang
ada5687ed5 refactor(web): remove frontend mock data, extract issue config
Remove mock data files for issues and knowledge base that are no longer
needed now that the issues page uses real API calls. Extract STATUS_CONFIG
and PRIORITY_CONFIG into a dedicated config file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 15:28:12 +08:00
Jiayuan Zhang
cbb1712e73 feat(web): add multi-workspace switching and creation UI
Add workspace list to sidebar dropdown with switching support, and a
create workspace dialog. Initialization now respects stored workspace ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 11:26:03 +08:00
Jiayuan Zhang
1ba0fb071a fix(web): fix stale state bugs, add real-time updates, and build verification pipeline
- Fix kanban board columns not adapting to available width (w-64 → flex-1)
- Fix workspace name not updating in sidebar after save in settings
- Fix comments leaking across issues when navigating between issue details
- Fix duplicate issue appearing on create (race between callback and WebSocket)
- Add real-time WebSocket listeners for agents and inbox pages
- Add `make check` one-click verification pipeline (typecheck + tests + E2E)
- Add E2E test fixtures for self-contained test data setup/teardown
- Add settings E2E test and updateWorkspace unit test
- Make `make start/setup` reuse existing PostgreSQL if already running
- Update CLAUDE.md with AI agent verification loop and E2E test patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:44:49 +08:00
Jiayuan Zhang
18cd938e01 fix(web): resolve TypeScript errors in test mocks and knowledge-base page
- Add missing Issue fields (parent_issue_id, acceptance_criteria, etc.) to test mocks
- Fix Agent mock fields to match actual type (runtime_config, owner_id, avatar_url)
- Import vi in test/helpers.tsx and add type annotation for mockAuthValue
- Add non-null assertions for array indexing in knowledge-base markdown renderer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:57:23 +08:00
Jiayuan Zhang
6dfc61fa86 test: add comprehensive test suite (Go unit/integration, Vitest, Playwright E2E)
- Add JWT middleware unit tests (8 tests covering all auth edge cases)
- Add WebSocket hub tests (5 tests for client lifecycle and broadcast)
- Add full HTTP integration tests (12 tests through real Chi router with DB)
- Add frontend component tests for login, issues, and issue detail pages
- Add auth context unit tests (9 tests for login/logout/name resolution)
- Add Playwright E2E tests for auth, issues, comments, and navigation
- Configure Vitest with jsdom, React plugin, and path aliases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:50:25 +08:00
Jiayuan Zhang
78f4d88aa1 feat(web): integrate frontend with live API and add auth context
- Replace all mock data with real API calls across pages (issues, agents, inbox, settings)
- Add AuthProvider context with JWT login/logout, member/agent name resolution
- Implement login page with email-based auth flow
- Add settings page with workspace editing and member list
- Wire up real-time WebSocket for live issue updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:50:14 +08:00
Jiayuan Zhang
9b1e75311b feat(web): implement Knowledge Base two-column UI
- Left column: searchable document list with title, author, time
- Right column: document viewer with simple Markdown rendering
  (headings, code blocks, tables, lists, inline code)
- Referenced-by section at bottom showing linked issue keys
- Content centered with max-w-3xl for readability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:45:13 +08:00
Jiayuan Zhang
1e18a80d61 feat(web): add mock data for Knowledge Base documents
7 documents covering product vision, architecture, API conventions,
agent onboarding, database schema, PR guidelines, and WebSocket
protocol. Each includes cross-references to related issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:44:37 +08:00
Jiayuan Zhang
ce95f73ed7 refactor(web): redesign Activity section and comment input
- Comments: avatar + name on same line, body indented below (pl-38px)
- Status changes: small dot (5px) aligned with avatar column, compact
- Comment input: minimal style matching Linear — small dot + plain
  text, no border/box, just a subtle separator line above
- Consistent 28px avatar column for vertical alignment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:38:04 +08:00
Jiayuan Zhang
fd3694c43e fix(web): center issue content and make width responsive
Use mx-auto with max-w-3xl so content stays centered in the
available space and scales with window width instead of being
pinned to the left with fixed padding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:33:31 +08:00
Jiayuan Zhang
b1140e9d40 refactor(web): redesign Issue detail page to closely match Linear
- Properties sidebar: remove uppercase header, interactive hover rows,
  right-aligned values, no divider lines between items
- Content area: wider left padding (px-12), max-width 720px for
  readability, issue key above title, proper separator before activity
- Activity: lowercase "Activity" heading, comments rendered without
  border box (inline text), tighter avatar sizing
- Breadcrumb: sticky header bar
- Comment input: hover border effect
- Overall: 13-14px body text, proper line-height, tracking-tight title

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:30:18 +08:00
Jiayuan Zhang
f5c520835a feat(web): add drag-and-drop to kanban board
- Cards can be dragged between status columns to change issue status
- Drag overlay shows tilted card preview while dragging
- Drop target columns highlight on hover
- 5px activation distance prevents accidental drags on click
- Issue state updates on successful drop
- List view also uses the shared stateful issue list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:27:23 +08:00
Jiayuan Zhang
44c3cecc8e refactor(web): polish Issue detail page to match Linear design
- Properties sidebar: compact rows with icon-based status/priority
- Activity timeline: tighter spacing, smaller avatars, cleaner
  separation between comments and status changes
- Breadcrumb: minimal, text-only navigation
- Content area: max-width constraint for readability
- Typography: 13px body text, refined heading sizes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:24:18 +08:00
Jiayuan Zhang
8fd149231a refactor(web): polish Issues page UI to match Linear design
- Status: use Lucide circle-variant icons (CircleDashed, Circle,
  CircleDot, Eye, CircleCheck) instead of colored dots
- Priority: use SVG bar indicators (4-bar urgent → 1-bar low)
  instead of P0/P1 text badges
- Board cards: cleaner layout, tighter spacing, comment count icon
- List rows: compact 36px height, proper alignment
- Toolbar: smaller, denser header with refined toggle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:24:02 +08:00
Jiayuan Zhang
931ca53b17 refactor(web): update issue config to use icon-based status and bar-based priority
Replace dotColor with iconColor for status, replace shortLabel with
bars count for priority indicators to match Linear's visual style.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:23:44 +08:00
Jiayuan Zhang
da7a45e15d feat(web): implement Issue detail page with properties and activity
- Left column: breadcrumb, title, description, activity timeline
- Right column: properties sidebar (status, priority, assignee, due date)
- Activity merges status changes and comments in chronological order
- Agent comments/actions distinguished with purple badge
- Comment input placeholder at bottom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:18:31 +08:00
Jiayuan Zhang
e4ea4abf37 feat(web): implement Issues page with board and list views
- Board view: kanban columns by status (Backlog → Done)
- List view: rows grouped by status with priority, assignee, due date
- View toggle in header (Board / List)
- Cards link to issue detail page
- Priority badges (P0-P3), assignee avatars, due date indicators

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:18:21 +08:00
Jiayuan Zhang
3f522bc0d8 feat(web): add shared mock data for issues
Includes 13 issues across all statuses with realistic content,
comments, activity logs, and assignees (both human and agent).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:18:07 +08:00
Jiayuan Zhang
c0348fd042 feat(web): implement two-column Agents page with mock data
- Left column: agent list with avatar, name, runtime badge, status dot
- Right column: agent detail with overview, skills, connected tools, tasks
- Mock data: 4 agents (2 local, 2 cloud) with varied statuses
- Inspired by OpenAI Frontier's agent management UI pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:08:55 +08:00
Jiayuan Zhang
57b399bd97 feat(web): implement two-column Inbox UI with mock data
- Left column: inbox list sorted by severity then recency
- Right column: selected item detail view
- Mock data covers all 6 InboxItemType variants with realistic content
- Unread badge count, severity icons, and time-ago display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:06:18 +08:00
Jiayuan Zhang
a3b82fb68a feat(web): add Knowledge Base page placeholder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:06:07 +08:00
Jiayuan Zhang
9bd1c14d9d feat(web): Linear-inspired sidebar with floating panel layout
- Add canvas background color for the base layer
- Sidebar blends into canvas, no border separator
- Content area rendered as floating white panel with rounded corners
  and shadow, offset from edges to reveal canvas underneath
- Simplify sidebar nav to: Inbox, Agents, Issues, Knowledge Base
- Add workspace switcher header with MulticaIcon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:06:04 +08:00
Jiayuan Zhang
d4f5c5b16f
feat: pivot to AI-native task management platform (#232)
Replace the agent framework codebase with a new monorepo structure
for an AI-native Linear-like product where agents are first-class citizens.

New architecture:
- server/ — Go backend (Chi + gorilla/websocket + sqlc)
  - API server with REST routes for issues, agents, inbox, workspaces
  - WebSocket hub for real-time updates
  - Local daemon entry point for agent runtime connection
  - PostgreSQL migration with 13 tables (issue, agent, inbox, etc.)
  - WebSocket protocol types for server<->daemon communication
- apps/web/ — Next.js 16 frontend
  - Dashboard layout with sidebar navigation
  - Route skeleton: inbox, issues, agents, board, settings
- packages/ui/ — Preserved shadcn/ui design system (26+ components)
- packages/types/ — Full API contract types (Issue, Agent, Workspace, Inbox, Events)
- packages/sdk/ — REST ApiClient + WebSocket WSClient
- packages/store/ — Zustand stores (issue, agent, inbox, auth)
- packages/hooks/ — React hooks (useIssues, useAgents, useInbox, useRealtime)
- packages/utils/ — Shared utilities

Removed: apps/cli, apps/desktop, apps/mobile, apps/gateway,
packages/core, skills/, and all agent-framework code.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:55:49 +08:00
Naiyuan Qing
4b6f42cc21
Merge pull request #169 from multica-ai/fix/google-oauth-client-id
fix(web): update Google OAuth Client ID
2026-02-13 18:39:05 +08:00
Naiyuan Qing
7b581b4e39 fix(web): update Google OAuth Client ID
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 18:38:12 +08:00
Naiyuan Qing
242be23876 feat(utils): unify encrypted Device ID across all platforms
- Add common generateEncryptedId() utility in @multica/utils
- All Device IDs now use same encryption algorithm (40 hex chars)
- Web: store encrypted format directly in localStorage
- Desktop: use shared utility, accept encrypted ID from Web
- Hub: use shared utility for hub-id generation
- Telegram: use shared utility for device ID generation
- Gateway hook: use encrypted format for client connections

Algorithm: sha256(sha256(uuid).slice(0,32)).slice(0,8) + sha256(uuid).slice(0,32)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 17:34:23 +08:00
Naiyuan Qing
003bde460d fix(web): remove auth guard from home page
Home page (QR code scanning) does not require authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:53:22 +08:00
Naiyuan Qing
f13509e12a feat(auth): pass encrypted Device ID from Web to Desktop
- Web stores raw UUID, encrypts when transmitting (consistent with copilot-search)
- Desktop receives encrypted Device ID from Web login callback
- Desktop stores encrypted 40-char format in auth.json
- Update IPC types to include deviceId in auth callback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:53:13 +08:00
Naiyuan Qing
f0c9c43678 feat(web): add desktop callback API route
Server-side redirect to deep link for production builds.
More reliable than client-side window.location.href.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 15:37:08 +08:00
Naiyuan Qing
a2cabb550f refactor(ui): unify login page styling across web and desktop
- Use bordered icon with consistent size on both platforms
- Adjust font size to match icon proportions
- Simplify desktop tagline for cleaner presentation
- Streamline web login header to [icon] Sign In format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:56:16 +08:00
Naiyuan Qing
ae86bba599 feat(web): add client-side auth with session storage and route protection
- Add lib/auth.ts for cookie-based session storage
- Add AuthGuard component for route protection
- Update request.ts to include sid in Authorization header
- Update login-form.tsx to save session and redirect if authenticated
- Wrap ChatPage with AuthGuard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:31:02 +08:00
Naiyuan Qing
683182e3ac fix(web): fix login page prerender error
Split login page into Server Component + Client Form to properly
handle useSearchParams with force-dynamic rendering.

Reference: CAP project pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:25:38 +08:00
Naiyuan Qing
108cf7ffb0 feat(web): add login page for desktop auth callback
- Add email/code login with verification
- Add Google OAuth login
- Add desktop callback API route
- Add request service with device ID handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 12:25:03 +08:00
Naiyuan Qing
bc9b7d6fc5 refactor(desktop): restructure pages and consolidate UI components
- Rename channels.tsx to clients.tsx
- Remove standalone skills.tsx and tools.tsx pages
- Add agent/ directory for agent-related pages
- Update layout and navigation structure
- Add tabs component to ui package
- Update fonts and global styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:49:52 +08:00
Naiyuan Qing
6037be2efa refactor: migrate from Hugeicons to Lucide icons
- Replace @hugeicons/react with lucide-react across all packages
- Update all components to use Lucide icon components
- Add silent option to store refresh methods to control toast display
- Simplify icon usage with direct component imports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 10:12:56 +08:00
Naiyuan Qing
54d84abc8b feat(ui): unify font loading and add design system documentation
Font unification:
- Add @fontsource packages for Geist Sans, Geist Mono, Playfair Display
- Create fonts.ts for centralized font imports
- Import fonts in both web (layout.tsx) and desktop (main.tsx)
- Register --font-brand in Tailwind @theme inline block
- Fix font-brand class usage (replace arbitrary value syntax)

Design system documentation:
- Add comprehensive design philosophy comments to globals.css
- Document typography choices (why Geist, why Playfair for brand)
- Document color system approach (neutral grays, semantic colors only)
- Explain component library customizations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 14:50:19 +08:00
Naiyuan Qing
9bcb0993b1 Merge remote-tracking branch 'origin/main' into exec-approvals
# Conflicts:
#	apps/desktop/src/hooks/use-local-chat.ts
2026-02-05 17:54:19 +08:00
Naiyuan Qing
f5c6f05295 fix(web): replace PWA icons with full-bleed versions to fix iOS white border
The original icon PNGs had pre-baked rounded corners and transparent
backgrounds. When iOS applies its own superellipse mask on Add to Home
Screen, the transparent corners were filled with white, creating a
visible white border around the icon.

Changes:
- Regenerate all icon PNGs as full-bleed (no rounded corners, opaque
  background filling entire canvas) from the existing logo SVG
- Add dedicated apple-touch-icon.png at 180x180 (iOS standard size)
- Add favicon.ico for universal browser fallback
- Replace oversized app/icon.png (540x540) with 192x192 full-bleed
- Update layout.tsx to reference apple-touch-icon.png
- Add explicit purpose: "any" to 192x192 manifest entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:46:30 +08:00
Naiyuan Qing
7cb9788bed feat(web): add ChatPage with DevicePairing and ChatView
New page architecture: ChatPage composes useGatewayConnection + DevicePairing
(QR scan/paste with connection status) + ChatView (messages, error banner,
input). Decoupled from Zustand stores, fully props-driven.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:43:59 +08:00
Naiyuan Qing
986b08be48 chore(web): replace old icons with company logo
- Add logo.svg as the new brand logo
- Generate logo-192x192.png and logo-512x512.png from SVG for PWA
- Update app-header, manifest, and layout to reference new logo files
- Remove old icon.png, icon-192x192.png, icon-512x512.png

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:20:02 +08:00
Naiyuan Qing
972c887b43 refactor(apps): simplify layout components to pure navigation shells
- desktop layout.tsx: remove connection logic, keep header + tabs + outlet
- web app-header.tsx: remove connection logic, keep logo + theme toggle

Connection lifecycle is now owned by the shared Chat component.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:12:57 +08:00
Naiyuan Qing
dacbfa9e3d refactor(ui): purify Chat component and move header to app layouts
- Remove all props from Chat (showHeader, headerActions) making it a
  zero-config pure chat component with only connection input, messages,
  and send functionality
- Create AppHeader client component for web app with brand, theme
  toggle, disconnect button, and useHubInit
- Add disconnect button to desktop layout header
- Add reset() action to hub store to eliminate duplicated state reset
- Remove unused token field from gateway store
- Remove dead code: connection-bar.tsx
- Guard handleConnect against empty deviceId race condition

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 20:31:24 +08:00
Naiyuan Qing
a088875118 refactor(ui): move theme toggle from Chat to web app layout
Chat component no longer depends on next-themes, making it safe to use
in the desktop app. Theme toggle is now a fixed button in the web layout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 20:02:48 +08:00