Commit graph

1185 commits

Author SHA1 Message Date
Jiayuan Zhang
e9555b8a22
Merge pull request #237 from multica-ai/forrestchang/remove-fe-mocks
refactor(web): remove frontend mock data
2026-03-23 15:53:08 +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
4a273bcb83
Merge pull request #236 from multica-ai/forrestchang/analyze-next-steps
feat(web): add multi-workspace switching and creation
2026-03-23 11:27:08 +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
c6e34c5e04
Merge pull request #235 from multica-ai/forrestchang/fix-kanban-width
fix(web): fix stale state bugs, add real-time updates, and verification pipeline
2026-03-22 13:07:27 +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
317e87fb97
Merge pull request #234 from multica-ai/forrestchang/impl-plan
feat: implement full-stack business logic with API, auth, real-time, and tests
2026-03-22 11:59:03 +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
c9285035d1 fix(e2e): use .first() for create issue assertion to avoid strict mode violation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:53:29 +08:00
Jiayuan Zhang
b5b0605e9a chore: add one-click setup/start/stop scripts, migration CLI, and seed tool
- Add idempotent seed tool with duplicate detection for agents/issues/comments
- Add migration CLI supporting up/down with schema_migrations tracking
- Add Makefile targets: make setup (first-time), make start, make stop
- Update .gitignore for test artifacts and compiled binaries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:50:33 +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
1e61c1974c feat(server): implement full REST API with JWT auth and real-time WebSocket
- Add HTTP handlers for issues, comments, agents, workspaces, inbox, members, and activity
- Implement JWT authentication middleware with Bearer token validation
- Add sqlc queries for all entities (CRUD operations)
- Extract router into reusable NewRouter() for testability
- Expand SDK with full API client methods (CRUD for all resources)
- Add updateWorkspace to SDK, add Member type to shared types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:50:03 +08:00
Jiayuan Zhang
d75746021f
Merge pull request #233 from multica-ai/forrestchang/linear-sidebar-ui
feat(web): Linear-inspired UI with Inbox, Agents, Issues, and Knowledge Base
2026-03-21 14:53:32 +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
332a9b6bcc chore(web): add @dnd-kit for drag-and-drop support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:27:15 +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
ea7f5371f7 fix(ui): add missing tw-animate-css and shadcn dependencies
These packages are imported in globals.css but were not listed in
package.json, causing CSS build failures on fresh installs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:05:56 +08:00
Jiayuan Zhang
fe751efd44 docs: add README with project setup and run instructions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:05:51 +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
LinYushen
3f589d8326
Merge pull request #231 from multica-ai/fix/remove-broken-finance-actions
fix(data): remove broken finance actions
2026-02-27 13:15:19 +08:00
yushen
a93949511b fix(data): remove broken finance actions (get_price_snapshot, get_prices, get_financial_metrics_snapshot)
These three Financial Datasets API endpoints return 404 Not Found.
Remove their action definitions, handlers, schema docs, and skill
references. Skills now use get_financial_metrics or web_search as
alternatives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:03:10 +08:00
yushen
ac733326d9 chore(release): bump version to 0.1.3 2026-02-26 18:45:11 +08:00
Bohan Jiang
ef13d0768e
Merge pull request #230 from multica-ai/fix/strip-aborted-toolcalls-from-repair
fix(agent): strip toolCalls from aborted/error assistant messages
2026-02-26 17:35:30 +08:00
Jiang Bohan
033ff87861 fix(agent): strip toolCalls from aborted/error assistant messages in transcript repair
When a streaming request is aborted mid-toolCall, the session persists an
assistant message with stopReason "aborted" containing partial toolCall blocks.
Our sanitizeToolUseResultPairing then inserts synthetic toolResults for these
toolCalls. However, pi-ai's transformMessages drops the entire aborted assistant
message downstream, leaving orphaned toolResults that reference non-existent
tool_use_ids — causing persistent 400 errors that block all subsequent
conversations in the session.

Fix: in repairToolCallInputs, strip toolCall blocks from assistant messages
with stopReason "aborted" or "error" before the result-pairing sanitizer runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 17:33:58 +08:00
Naiyuan Qing
1eb8fdab58
Merge pull request #229 from multica-ai/fix/macos-fullscreen-close-black-screen
fix(desktop): prevent black screen when closing fullscreen window on macOS
2026-02-26 16:40:38 +08:00
Naiyuan Qing
229a709ec8 fix(desktop): prevent black screen when closing fullscreen window on macOS
On macOS, calling win.hide() on a fullscreen window causes a black screen
because it interrupts the Space transition animation. This is a known
macOS Cocoa limitation (NSWindow.orderOut() + fullscreen).

Fix: Exit fullscreen first and wait for 'leave-full-screen' event before
hiding the window.

Also added render-process-gone handler for debugging renderer crashes.

Refs:
- https://github.com/electron/electron/issues/20263
- https://github.com/electron/electron/issues/6033

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:36:25 +08:00
Naiyuan Qing
c10ad352e0
Merge pull request #228 from multica-ai/fix/tool-empty-div-flicker
fix(ui): prevent empty div flicker between tool transitions
2026-02-26 16:23:01 +08:00
Naiyuan Qing
d96bdb0126 fix(ui): prevent empty div flicker between tool transitions
The text wrapper div was rendering when `isStreaming` was true but
`text` was empty, causing a brief empty flex container to appear
between tool executions. Changed condition from `(text || isStreaming)`
to `text` only, so the div only renders when there's actual content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:18:29 +08:00
Naiyuan Qing
e9e8b9c7a1
Merge pull request #227 from multica-ai/fix/remove-api-proxy
fix(web): remove API proxy, use direct backend requests
2026-02-26 15:37:04 +08:00
Naiyuan Qing
78543d7187 fix(web): remove API proxy, use direct backend requests
- Remove Next.js rewrites proxy configuration
- Use NEXT_PUBLIC_API_URL for direct API requests
- Fixes ECONNRESET errors from proxy failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 15:35:53 +08:00
Bohan Jiang
5d39958913
Merge pull request #226 from multica-ai/fix/auto-update-repo-url
fix(desktop): point auto-update to correct repository
2026-02-26 14:40:51 +08:00
Jiang Bohan
aa3ebeb1c8 fix(desktop): point auto-update to correct repository
dev-app-update.yml and update-notification.tsx were still referencing the
old multica-ai/multica repo. Updated both to multica-ai/super-multica.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:39:38 +08:00
yushen
c97ee8efa1 chore(release): bump version to 0.1.2 2026-02-26 13:48:53 +08:00
Bohan Jiang
61bbf8fa6b
Merge pull request #225 from multica-ai/fix/format-error-recovery
fix(agent): auto-recover from persistent 400 format errors
2026-02-24 13:33:28 +08:00
Jiang Bohan
bfab8d97b2 fix(agent): auto-recover from persistent 400 format errors by reloading session
When the LLM API returns a 400 "tool_call_id is not found" error, the corrupted
in-memory message state persists, blocking all subsequent messages until restart.
This adds a recovery handler that reloads sanitized messages from disk and retries,
similar to the existing context overflow recovery pattern.

Also adds `default` export condition to core package.json to fix tsx watch
resolution for subpath exports (gateway startup failure).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:19:39 +08:00