Commit Graph

261 Commits

Author SHA1 Message Date
Naiyuan Qing
45758b5d91 fix: optimize MessageTimer display during long pauses
- Add LiveTimer component with event-driven updates + timeout projection
- Track lastEventTimestamp in ChatView for accurate pause detection
- Project time forward after 500ms of no events (variable 80-180ms interval)
- Immediately sync to accurate value when events resume
- Change formatDuration to 1 decimal place for cleaner display
- Remove debug console.log statements

Closes #100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:33:15 +08:00
yushen
0c71a3165b chore: bump version to 0.1.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
desktop-v0.1.5 v0.1.5
2026-01-22 17:30:19 +08:00
LinYushen
3305abad1c Merge pull request #90 from multica-ai/dev
chore: merge dev to main
2026-01-22 17:11:02 +08:00
yushen
27b9dfcd31 Merge remote-tracking branch 'origin/main' into dev 2026-01-22 17:09:12 +08:00
Bohan Jiang
32e225839f Merge pull request #89 from multica-ai/fix/permission-button-overflow
fix: permission buttons and text overflow container width
2026-01-22 17:03:23 +08:00
Jiang Bohan
cc72dc1017 fix: permission buttons and text overflow container width
Add proper overflow handling to permission UI components:
- Add flex-wrap and truncate to action buttons in StandardPermissionUI
- Add break-words to title and kind text in StandardPermissionUI
- Add break-words to question header and text in AskUserQuestionUI
- Add min-w-0, overflow-hidden, and break-words to QuestionOptions

Closes #88

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 17:02:33 +08:00
LinYushen
6530cad0c7 Merge pull request #87 from multica-ai/dev
chore: merge dev to main
2026-01-22 16:53:33 +08:00
Bohan Jiang
c46cc23b46 Merge pull request #86 from multica-ai/feat/dock-badge-pending-permissions
feat: show pending permission requests count in dock badge (macOS)
2026-01-22 16:48:26 +08:00
Jiang Bohan
935b6c3a5c feat: show pending permission requests count in dock badge (macOS)
Add dock badge count feature to indicate pending permission requests:
- Add updateBadgeCount() method to PermissionManager
- Update badge when permission request is added/removed/times out
- Only applies on macOS (darwin platform)

This helps users know there are pending actions even when the app is minimized.

Closes #85

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 16:47:34 +08:00
Bohan Jiang
0ad9963f51 Merge pull request #84 from multica-ai/fix/chat-bubble-text-overflow
fix: text overflow in chat bubbles - content not wrapping correctly
2026-01-22 16:07:40 +08:00
Jiang Bohan
869680fe65 fix: text overflow in chat bubbles - content not wrapping correctly
Add CSS properties to ensure text properly wraps within chat bubble boundaries:
- Add break-words and overflow-hidden to user message bubbles
- Add break-words, overflow-hidden, and [&_*]:break-words to TextContentBlock
  for proper word breaking in nested markdown elements

Closes #83

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 16:00:43 +08:00
LinYushen
dcf32811aa Merge pull request #81 from multica-ai/fix/ai-response-display
fix: resolve race condition causing AI responses not to display
2026-01-22 13:28:12 +08:00
yushen
3159842b54 fix: resolve race condition causing AI responses not to display
- Add mergeSessionUpdates helper to deduplicate updates by sequence number
- Introduce updateCurrentSession helper to synchronously update ref before async ops
- Reload session updates after async operations complete to catch missed messages
- Add unit tests for merge behavior with sequence numbers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:22:08 +08:00
Naiyuan Qing
7745c67a08 Merge pull request #80 from multica-ai/feat/message-timer-and-copy-button
feat: add message timer, copy button and improve loading states
2026-01-21 19:02:56 +08:00
Naiyuan Qing
4c19791b77 Merge branch 'main' into feat/message-timer-and-copy-button 2026-01-21 19:01:47 +08:00
Naiyuan Qing
0981d160cb Merge pull request #79 from multica-ai/feat/model-selector-scroll-search
feat: add search and keyboard navigation to model selector
2026-01-21 19:01:27 +08:00
Naiyuan Qing
23d68ddad7 feat: add message timer, copy button and improve loading states
- Add message-level time tracking with endTime - startTime calculation
- Fix state synchronization: wait for all sessionUpdate promises before completing
- Create Spinner component (3x3 grid animation) and LoadingIndicator components
- Add CompletedMessageFooter with copy button and visual feedback
- Update SessionInitializing to use Spinner instead of shimmer bar
- Add prefers-reduced-motion support for animations
- Add formatDuration (2 decimal places) and formatLocalizedDatetime utils
- Add invalid date handling and comprehensive tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:59:28 +08:00
Naiyuan Qing
3cfc98b409 feat: add search and keyboard navigation to model selector
- Add search input when 5+ models available with filtering
- Add keyboard navigation (Arrow keys, Tab, Enter, Escape)
- Add scrollable model list with thin scrollbar styling
- Fix highlight jumping: use -1 to indicate no selection until user interacts
- Fix scroll position reset on dropdown open
- Remove dropdown animations for instant open/close
- Fix focus management: prevent Radix auto-focus return to trigger
- Add onSelectionComplete callback for textarea focus after selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:58:33 +08:00
Naiyuan Qing
b9b48e1c45 Merge pull request #78 from multica-ai/NevilleQingNY/optimize-input-box-ui
style: adjust AgentModelSelector dropdown hierarchy
2026-01-21 17:04:19 +08:00
Naiyuan Qing
58e3b57aba style: adjust AgentModelSelector dropdown hierarchy
- Model list: use normal text-sm font (primary content)
- Agent headers: use smaller text-xs with muted color (secondary)
- Reduce model list indentation from pl-8 to pl-6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:01:22 +08:00
Naiyuan Qing
3059234e6d Merge pull request #77 from multica-ai/NevilleQingNY/optimize-input-box-ui
feat: optimize input box UI with combined AgentModelSelector
2026-01-21 16:41:13 +08:00
Naiyuan Qing
81b1b69567 feat: optimize input box UI with combined AgentModelSelector
- Create AgentModelSelector component combining agent and model selection
- Add tooltips to AgentModelSelector and ModeSelector (hide when dropdown open)
- Add skeleton loading states for initialization
- Update button styles: icon-xs size, ghost variant for attachment button
- Improve accessibility: keyboard support for switch buttons, meaningful alt text
- Clean up unused AgentSelector and ModelSelector components
- Add switching state UI with loading animation and "Switching..." text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 16:39:00 +08:00
LinYushen
2bf07bff46 Merge pull request #76 from multica-ai/feat/file-list-enhance
feat: add hidden files toggle and improve file tree UX
2026-01-21 15:54:32 +08:00
yushen
41da6f16b4 feat: add hidden files toggle and improve file tree UX
- Add eye icon toggle to show/hide hidden files (dotfiles)
- Replace emoji icons with Lucide icons in context menu
- Add "Open in Multica" context menu option for directories
- Optimize file filtering with on-demand approach
- Add aria-label/aria-pressed for accessibility
- Add unit tests for uiStore and excludeHiddenFiles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:49:15 +08:00
LinYushen
0946191ed4 Merge pull request #75 from multica-ai/feat/session-independent-input
feat: add per-session input draft persistence
2026-01-21 14:20:28 +08:00
yushen
2522dbe71e feat: add per-session input draft persistence
- Add draftStore to manage input drafts per session
- Save/restore drafts when switching between sessions
- Auto-save drafts with debounce (300ms)
- Clear drafts when session is deleted
- Add unit tests for draftStore and MessageInput draft behavior
- Update vitest config to include .tsx test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 14:14:24 +08:00
Naiyuan Qing
fe0d09c7cd Merge pull request #74 from multica-ai/feat/native-file-watcher
feat: replace chokidar with native fs.watch for file tree monitoring
2026-01-21 12:58:01 +08:00
Naiyuan Qing
a24a8d8cd2 feat: replace chokidar with native fs.watch for file tree monitoring
- Use native fs.watch({ recursive: true }) instead of chokidar
- Fixes EMFILE "too many open files" errors on large directories
- Remove redundant tool-based file change detection (fallback mechanism)
- Add session-to-directory mapping for shared watchers
- Add 100ms debouncing for file change events
- Add directory existence check before watching (Craft Agents pattern)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 12:25:06 +08:00
LinYushen
619135567d Merge pull request #72 from multica-ai/feat/slash-command-support
feat: add slash command support for ACP agents
2026-01-20 18:39:43 +08:00
yushen
88c62640d3 Fix ESLint warnings in slash command UI 2026-01-20 18:38:15 +08:00
yushen
f335e574b5 Merge remote-tracking branch 'origin/main' into feat/slash-command-support 2026-01-20 18:30:00 +08:00
yushen
6d6a9c16a6 Fix Codex slash command availability 2026-01-20 18:27:28 +08:00
LinYushen
f869cc7f15 Merge pull request #73 from multica-ai/chore/ci-zero-warnings
chore(ci): enforce zero ESLint warnings
2026-01-20 17:23:12 +08:00
yushen
80d12cb2f1 chore(ci): enforce zero ESLint warnings
All pre-existing ESLint warnings have been fixed. Update CI to reject
any new warnings by setting --max-warnings 0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:19:52 +08:00
yushen
cea3b8d725 Merge origin/main into feat/slash-command-support
Resolved conflicts:
- AcpClientFactory.ts: Keep both AvailableCommand import and ISessionStore
- MessageInput.tsx: Combine slash command key handling with return type annotation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:15:07 +08:00
LinYushen
a3e98350a3 Merge pull request #71 from multica-ai/feat/logging-and-error-handling
feat: integrate electron-log and improve error message parsing
2026-01-20 17:09:25 +08:00
yushen
26a03d1317 fix: resolve all ESLint warnings (252 -> 0)
- Add explicit return types to functions across main, preload, and renderer
- Replace `any` types with specific types or eslint-disable comments
- Fix unused variables by removing or prefixing with underscore
- Add eslint-disable for react-refresh/only-export-components
- Fix React hooks dependency warnings
- Add test mocks for electron-log/main and @electron-toolkit/utils

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:07:05 +08:00
yushen
3d95e19dd3 feat: add slash command support for ACP agents
- Add AvailableCommand type re-export from ACP SDK
- Handle available_commands_update events in AcpClientFactory
- Store available commands in SessionAgent state
- Add IPC channel and handler for fetching session commands
- Create commandStore for renderer state management
- Update useApp hook to fetch and listen for command updates
- Create SlashCommandMenu component with keyboard navigation
- Integrate slash command detection and validation in MessageInput
- Add unit tests for slash command utilities and store

Commands are defined by ACP agents and sent as plain text for
the agent to parse and execute. The client provides autocomplete
and validation based on the available commands list.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:02:47 +08:00
yushen
bbf4979cb9 feat: integrate electron-log and improve error message parsing
- Add electron-log for production logging (writes to ~/Library/Logs/Multica/)
- Development mode logs to console only, no file writes
- Improve parseAcpError() with more specific error handling:
  - Connection errors (ECONNREFUSED, ECONNRESET)
  - Timeout errors (ETIMEDOUT, timeout)
  - Process exit errors
  - Authentication errors (401, API key)
  - Rate limit errors (429)
- Fallback now shows actual error message (truncated to 150 chars)
  instead of generic "Agent encountered an error"
- Add comprehensive tests for new error types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:28:41 +08:00
LinYushen
589e67c66f Merge pull request #70 from multica-ai/feat/show-git-branch-in-session
feat: display git branch info in session sidebar
2026-01-20 16:08:10 +08:00
yushen
fcda7f6d9b feat: display git branch info in session sidebar
- Add gitBranch field to Session type
- Create git utility to get current branch name
- Update IPC handlers to fetch git branch when loading sessions
- Display branch name in sidebar with subtle styling (main · 36m ago format)
- Add unit tests for git branch utility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:05:07 +08:00
LinYushen
a6f0e90c3d Merge pull request #69 from multica-ai/feat/update-release-skill
feat: update release skill for complete build artifacts
2026-01-20 15:41:27 +08:00
yushen
a6e6b1f6aa feat: update release skill for complete build artifacts
- Update build:mac script to build both arm64 and x64 architectures
- Update release skill to include all build artifacts:
  - DMG files with blockmaps
  - ZIP files with blockmaps
  - latest-mac.yml for auto-updater

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:40:09 +08:00
yushen
d83ea64eac chore: bump version to 0.1.4
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
desktop-v0.1.4 v0.1.4
2026-01-20 15:27:08 +08:00
LinYushen
f6faa956c9 Merge pull request #68 from multica-ai/fix/terminal-command-display
fix: format terminal command array with spaces
2026-01-20 14:58:33 +08:00
yushen
5af566e5c7 fix: format terminal command array with spaces
When the command input is an array (e.g., ["/bin/zsh", "-lc", "git checkout main"]),
it was being displayed without spaces between elements. Added formatCommand helper
function to properly join array elements with spaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:56:16 +08:00
LinYushen
e807082222 Merge pull request #67 from multica-ai/feat/dynamic-agent-modes
feat: add dynamic session mode and model selection
2026-01-20 14:43:54 +08:00
yushen
ddc67a0105 feat: add dynamic session mode and model selection
Add support for dynamically switching session modes and models through
the ACP protocol. This enables users to change the AI model or operating
mode during an active session.

Changes:
- Add ModeSelector and ModelSelector dropdown components
- Extend ACP client to handle mode/model update notifications
- Add IPC channels for mode/model state management
- Update Conductor and SessionLifecycle for dynamic switching
- Add max-height constraint to dropdowns for better UX

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:31:03 +08:00
LinYushen
8cc1a29151 Merge pull request #66 from multica-ai/chore/release-skill
chore: add release skill for automated release workflow
2026-01-19 16:30:06 +08:00
yushen
12eb93ff41 chore: add release skill for automated release workflow
Add SKILL.md defining the /release command workflow with 8 steps:
1. Git branch check (must be on main, pull latest)
2. Environment check (Apple credentials, gh CLI)
3. Code quality checks (typecheck, lint, format, test)
4. Version confirmation
5. Build application
6. Commit version change
7. Generate release notes
8. Create GitHub release

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:27:38 +08:00