Commit graph

215 commits

Author SHA1 Message Date
Jiang Bohan
d641c1a30c fix(desktop): prevent electron-builder auto-publish in CI
electron-builder detects CI and implicitly triggers publishing to GitHub
Releases, which fails without GH_TOKEN. Adding --publish never to the
build script so CI only builds without attempting to publish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:30:26 +08:00
Jiayuan Zhang
f5ac4b85e8 feat(gateway): handle send_file action in Telegram service
Add sendFileToTelegram method that decodes base64 file data and sends
it via grammy's InputFile API. Handle send_file RoutedMessage action
in the virtual device sendCallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:37:41 +08:00
Naiyuan Qing
ad06679e69 fix: simplify - just say pnpm dev works directly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:04:44 +08:00
Naiyuan Qing
8704e37faa fix: clarify dev gateway is hardcoded in root package.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:03:26 +08:00
Naiyuan Qing
c0b248e8f9 fix: remove hardcoded URLs, reference config files instead
URLs may change - point to package.json and .env.production as sources of truth.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:02:13 +08:00
Naiyuan Qing
816c883f30 docs(desktop): improve .env.example with accurate configuration guide
- Clarify that local dev needs no .env (GATEWAY_URL set in package.json)
- Document GATEWAY_URL override for local gateway testing
- Add detailed explanation of both URLs (Gateway vs API Server)
- List dev/prod values for each environment variable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:00:04 +08:00
Naiyuan Qing
71433fc4ed
Merge pull request #146 from multica-ai/feat/message-source-tracking
feat(core): add message source tracking and persistence
2026-02-12 18:51:23 +08:00
Naiyuan Qing
8199dde1b6 feat(core): add message source tracking and persistence
- Add MessageSource type to track where user messages originate (local, gateway, channel)
- Broadcast inbound messages from all channels to local Desktop UI via Hub.onInboundMessage()
- Persist source field in JSONL session storage so it survives page refresh
- Display source icon (Monitor/Smartphone/Send) with tooltip for non-local user messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 18:45:15 +08:00
Naiyuan Qing
c95b74ffc9 feat(desktop): default dev gateway URL and support GATEWAY_URL env override
`pnpm dev` now connects to dev gateway by default. Support runtime
GATEWAY_URL env var to override, so no per-worktree .env setup needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:39:46 +08:00
Naiyuan Qing
bad4d05c15
Merge pull request #138 from multica-ai/refactor/desktop-page-restructure
refactor(desktop): restructure pages and add dev reset scripts
2026-02-12 16:45:07 +08:00
Naiyuan Qing
274651754c fix(desktop): remove unused saving state in profile page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:29:26 +08:00
Naiyuan Qing
8efc4ae5aa refactor(desktop): improve clients page and QR code component architecture
- Refactor QR code component with extracted hooks (useQRToken, useCountdown, useCopyToClipboard)
- Extract reusable sub-components (QRCodeFrame, ExpiryTimer, CopyLinkButton)
- Extract QRCodeCard and DevicesCard components in clients page
- Add GatewayStatus indicator for connection state
- Minor styling fix for empty device list state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:27:15 +08:00
Naiyuan Qing
304c6a9bc6 fix(desktop): wait for channel status to settle before returning
The listStates IPC handler now waits for any "starting" status to
settle (max 3.5s) before returning, ensuring the UI always gets the
final status (running/error) instead of the transient "starting" state.

Also fixes unused variable lint warning in profile page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:25:48 +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
Jiang Bohan
ece00cac2b merge: resolve conflict with main (lucide-react migration)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:47:00 +08:00
Jiang Bohan
a33df19bef feat(desktop): add chat abort support with partial content preservation
Add stop button to interrupt agent generation mid-stream. The send button
toggles to a stop icon during loading. Abort propagates from UI through
IPC to the Agent layer (PiAgentCore.abort()), preserving all partial
content in the agent's context so users can follow up immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:33:06 +08:00
yushen
f20143743b feat(gateway): add typing indicator for Telegram bot responses
Send "typing" chat action while LLM generates a response, with 5s
interval refresh and 60s safety timeout. Stop on message_end,
agent_error, or generic error events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:27:41 +08:00
yushen
899a3d193c fix(gateway): rewrite Dockerfile to match current source layout
Gateway source moved out of src/ subdirectory but Dockerfile still
referenced old paths, breaking docker build. Rewrite to use tsx runtime
(no tsc/esbuild compile step), copy all workspace package.json for
lockfile compatibility, and filter install to gateway deps only (616 vs
1911 packages). Also update build-and-push script to tag latest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:27:41 +08:00
Naiyuan Qing
b5313b643f refactor(desktop): add container wrapper to page layouts
- Wrap page content with container class for consistent max-width
- Move overflow-auto to outer div so scrollbar stays at viewport edge
- Add self-stretch to vertical divider in home page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 12:03:41 +08:00
Naiyuan Qing
e93e0952bd fix(desktop): suppress react-refresh lint warning for useTheme hook
Standard pattern for context providers exporting both Provider and hook.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 11:28:10 +08:00
Naiyuan Qing
7e2f55bfe9 feat(desktop): integrate UpdateNotification into new sidebar layout
- Convert update-notification component from Hugeicons to Lucide icons
- Add UpdateNotification to layout.tsx for auto-update functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 11:19:17 +08:00
Naiyuan Qing
b310b57ce9 merge: integrate origin/main into feat/onboarding-check
Resolved conflicts:
- Keep Lucide icons (replaced Hugeicons) in desktop and ui
- Keep new Sidebar layout design
- Merge new dependencies (electron-updater, lucide-react, katex)
- Add new 'data' tool with Lucide BarChart3 icon
- Keep UpdateNotification component (not integrated into UI yet)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 11:16:49 +08:00
Naiyuan Qing
3fd6e10c86 refactor(desktop): add silent option to provider store and improve devices
- Add silent option to setProvider to suppress toast notifications
- Improve device list with better state handling
- Update onboarding setup step with silent provider switch
- Minor UI tweaks in layout and App components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 11:10:08 +08:00
Naiyuan Qing
eb4e1f57b1 feat(desktop): persist onboarding state to file system
- Add AppState module in core for managing app state persistence
- Add app-state IPC handlers for reading/writing onboarding state
- Hydrate onboarding state from file system on app startup
- Prevent flash by showing blank screen during hydration
- Update onboarding store to sync with file system
- Improve MulticaIcon with enhanced animation states
- Minor UI fixes in chat and device list components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 10:53:04 +08:00
Naiyuan Qing
cf3ad1db91 style(desktop): update capabilities summary wording
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 10:13:11 +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
272cabf3fa feat(desktop): redesign home page with capabilities dashboard
- Add collapsible capabilities section showing skills, tools,
  channels, and scheduled tasks counts
- Add AI brain icon to represent agent capabilities
- Add refresh button with tooltip to refresh all capabilities
- Add desktop-specific Toaster component (uses local ThemeProvider)
- Show all capability counts even when zero
- Change "View all" buttons to outline style for better distinction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 09:39:03 +08:00
Naiyuan Qing
6ea6c9fff5 refactor(desktop): migrate to zustand stores and remove hook layer
- Add new stores: skills, tools, cron-jobs, hub
- Remove wrapper hooks: use-channels, use-cron-jobs, use-hub,
  use-provider, use-skills, use-tools, use-heartbeat
- Update all components and pages to use stores directly
- Add 800ms minimum loading time for refresh operations
- Add toast notifications for store actions (success/error feedback)
- Remove unused chat-mode store and remote-chat component

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 09:38:51 +08:00
Jiang Bohan
f9b193d467 fix(desktop): use default import for electron-updater CJS module
electron-updater is a CommonJS module — ESM named imports fail at
runtime. Switch to default import with destructuring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:20:47 +08:00
Naiyuan Qing
3d25aa96f4 feat(desktop): add minimum window size constraints
Set minWidth: 500 and minHeight: 520 to prevent UI breakage.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 18:51:18 +08:00
Naiyuan Qing
bbf91a98ca refactor(desktop): redesign layout with sidebar navigation
- Replace tab navigation with collapsible sidebar
- Fix header scroll issue with proper flex container structure
- Add TooltipProvider at app root
- Simplify onboarding store by removing forceOnboarding flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 18:51:14 +08:00
Naiyuan Qing
fedb8fb668 fix(desktop): align onboarding step labels with content
- Header: "Connect" → "Channels", "Try it" → "Start"
- Step 3: "Your agent, everywhere" → "Connect a channel"
- Step 4: "You're all set 🎉" → "Ready to go" (remove emoji)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:57:51 +08:00
Naiyuan Qing
d189b14a15 feat(desktop): add StepDots component and minor onboarding tweaks
- Add StepDots progress indicator to all steps
- Update animations for consistency
- Minor copy and layout adjustments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:46:56 +08:00
Naiyuan Qing
437dc05db0 feat(desktop): improve setup step with radio indicators
- Add radio button style indicators for provider selection
- Add HoverCard component for provider setup help
- Add Link component for external URLs
- Add Popover component (dependency for HoverCard)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:46:17 +08:00
Naiyuan Qing
eb807787d3 feat(desktop): redesign connect step with single column layout
- Single column centered layout matching other steps
- Improved copy: "Your agent, everywhere"
- Info box explaining direct connection to local agent
- Coming soon hint for Discord, Slack, Mobile app
- Simplified button logic: Skip (outline) + Continue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:46:00 +08:00
Naiyuan Qing
fc77cb89d3 refactor(desktop): migrate provider state to zustand store
- Create ProviderStore for global provider state management
- Refactor useProvider hook to use the store
- Data fetched once at startup, shared across components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:45:19 +08:00
Naiyuan Qing
5ae86feb2b feat(desktop): add global channels store with zustand
- Create ChannelsStore for global channel state management
- Refactor useChannels hook to use the store
- Initialize channels store at app startup
- Share state between onboarding and channels page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:43:23 +08:00
Naiyuan Qing
07b8a014aa feat(desktop): add resolvedTheme to theme provider
- Add resolvedTheme state to expose actual applied theme
- Listen for system theme changes when in "system" mode
- Fix mode toggle to show correct icon based on selected theme

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:43:18 +08:00
Naiyuan Qing
54bc00ce3f feat(desktop): redesign privacy step with single column layout
- Simplify permissions step to single centered column
- Replace per-item switches with single "I understand" checkbox
- Add capabilities info card with clean dividers
- Add trust note section for privacy messaging
- Rename step from "Permissions" to "Privacy" for clarity
- Add fade-in animation for step transitions
- Add shadcn checkbox component

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:09:42 +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
Jiang Bohan
0459769746 feat(desktop): add auto-update functionality
Implement one-click desktop auto-update with version checking, download progress, and automatic installation. Includes toast notification UI in bottom-right corner showing update status (checking, available, downloading, ready, or error).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-11 13:59:58 +08:00
Naiyuan Qing
f3c5068e74 refactor(desktop): simplify onboarding routing structure
- Replace nested routes with single OnboardingPage component
- Simplify Stepper to use numeric index instead of StepId

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 13:46:47 +08:00
Naiyuan Qing
22db61876b feat(desktop): add welcome page to onboarding flow
- Add Welcome step before the 4-step onboarding flow
- Welcome page introduces Multica with brand title (Playfair Display font)
- Display three core principles: Your AI, Your Machine, Your Control
- Add entrance spin animation to MulticaIcon component
- Welcome page has no stepper, only shown after clicking "Start Exploring"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 13:46:21 +08:00
Naiyuan Qing
4961604f31 feat(desktop): add --reset flag to clear user data for testing
- Add reset-user-data.sh script to clear ~/.super-multica/
- Add --reset CLI flag to clear localStorage on startup
- Add dev:reset npm script for development testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 11:46:31 +08:00
Naiyuan Qing
c0db46e200 fix(desktop): add required metadata for Linux deb build
Add description, author, and homepage fields to package.json
required by electron-builder when building .deb packages on Linux CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 09:55:12 +08:00
Naiyuan Qing
2c9d1939c0 fix(desktop): update branding and fix code signing for development
- Change productName from "YourAppName" to "Multica"
- Change appId from "YourAppID" to "com.multica.app"
- Add app icons (icns, ico, png) for all platforms
- Disable hardenedRuntime to fix ad-hoc signing on ARM Macs
- Add build:desktop script to root package.json
- Simplify desktop .gitignore with !build/ exception
- Remove unused asarUnpack and entitlements config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 09:49:18 +08:00
Jiayuan Zhang
ff7395960d fix(desktop): remove unused availableProviders destructuring
Fixes eslint no-unused-vars warning that fails CI with --max-warnings 0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:16:02 +08:00
Jiayuan Zhang
7af64a12e2 fix(desktop): clear forceOnboarding flag on onboarding completion
completeOnboarding() only set completed=true but never cleared the
forceOnboarding flag, causing OnboardingGuard to redirect back to
onboarding in an infinite loop when --force-onboarding was used.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:12:15 +08:00
Jiayuan Zhang
0135951ac6 feat(desktop): allow reconfiguration of already-configured providers
Previously, configured providers only showed a checkmark with no way to
reconfigure them. Now shows a "Reconfigure" button alongside the checkmark.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:40:36 +08:00
Jiayuan Zhang
5c5bf46a95 fix(desktop): fix Try It step UI overflow and missing chat input
Add min-w-0 to SamplePrompt text container so truncate works in
flex layout. Always show ChatView when agent is ready so the message
input is visible (ChatView has its own empty state).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:29:23 +08:00