Commit graph

24 commits

Author SHA1 Message Date
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