Commit graph

199 commits

Author SHA1 Message Date
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
Jiayuan Zhang
e9c91ccc66 fix(desktop): allow selecting configured providers in setup step
Remove strict model validation from provider:set IPC handler that
rejected custom models not in the static registry list (broke OpenRouter
with user-typed models). Add error display to setup page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:23:22 +08:00
Jiayuan Zhang
04d227c9fe feat(desktop): persist onboarding state with --force-onboarding flag
Use Zustand persist middleware with localStorage to remember onboarding
completion across app restarts. Only the completed flag is persisted;
transient UI state resets each launch. Add --force-onboarding CLI flag
to re-show onboarding even when already completed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:15:10 +08:00
Jiayuan Zhang
ab65f4cadf refactor(desktop): replace OpenRouter model dropdown with text input
Remove Combobox component and use a plain text input for model name,
allowing users to enter any model identifier manually.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:15:03 +08:00
Jiayuan Zhang
a143187da1 feat(desktop): add provider connection test to API key dialog
Save & Test flow: saves API key, then sends a minimal prompt to verify
the provider is reachable. Shows phase-based status (saving/testing/
success/error) with auto-close on success.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:02:45 +08:00
Jiayuan Zhang
9290fd1212 feat(desktop): add searchable model dropdown for OpenRouter
Replace plain text input with Combobox for model selection. Users can
search and select from the provider's model list via dropdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:52:00 +08:00
Jiayuan Zhang
9240e31fcb fix(desktop): improve Try It right panel visual separation
Replace bg-muted/30 with border-l for a clean separator between the
prompt list and ChatView panels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:47:16 +08:00
Jiayuan Zhang
0c4f8796d7 fix(desktop): require active provider before Continue in setup step
Changed check from availableProviders.length > 0 to current?.available,
so Continue is only enabled when a provider is both configured and
selected as the active default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:44:36 +08:00
Jiayuan Zhang
3e04422df6 feat(desktop): use interactive sample prompts in Try It step
Replace simple prompts with ones that demonstrate real agent
capabilities: web search, project analysis, and shell execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:41:07 +08:00
Jiayuan Zhang
60e71ce4c8 fix(desktop): require successful Telegram connection before Continue
Continue button is now disabled until the bot status is 'running'.
Skip remains available when no token has been entered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:41:02 +08:00
Jiayuan Zhang
bc24b58026 feat(desktop): wire Try It step to real agent chat
Replace fake sample prompts with real agent interaction. Clicking a
prompt sends it via localChat and shows the live ChatView on the right
panel with streaming responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:34:59 +08:00
Jiayuan Zhang
7691f81376 feat(desktop): add model name input for OpenRouter configuration
OpenRouter requires both API key and model name. Adds optional model
input field to ApiKeyDialog, enabled via showModelInput prop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:25:46 +08:00
Jiayuan Zhang
e0812017f1 fix(desktop): only show active provider when actually available
Prevents pre-selecting an unconfigured provider and enabling Continue
when no provider is configured. Also passes modelId through on success.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:25:41 +08:00
Jiayuan Zhang
4de9947a02 feat(desktop): add 4-step onboarding flow
Add complete onboarding wizard: Permissions > Provider > Connect > Try it

Step 1 (Permissions): Privacy & Trust acknowledgements with toggles for
file system, shell execution, LLM requests, and local storage access.

Step 2 (Provider): LLM provider setup with 4 supported providers
(Kimi Code, Claude Code OAuth, Codex OAuth, OpenRouter), default
provider selection via radio indicator, and contextual setup tutorials
in the right panel that change on hover.

Step 3 (Connect): Optional Telegram bot connection with token input and
BotFather tutorial. Reuses existing useChannels() hook.

Step 4 (Try it): Sample prompts and completion.

Includes OnboardingGuard, Zustand store (no persist - resets on launch),
breadcrumb stepper with progress bar, and left-right split layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:17:20 +08:00
Jiayuan Zhang
16fe40bfc2 feat(desktop): hide native title bar with macOS hiddenInset style
Add titleBarStyle hiddenInset and trafficLightPosition to BrowserWindow.
Add drag region to main layout header with no-drag on interactive elements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:17:07 +08:00
Naiyuan Qing
2269677ded fix(desktop): restructure to standard electron-vite layout for HMR
- Move renderer files to src/renderer/src/ (electron-vite standard)
- Move index.html to src/renderer/
- Remove root: '.' config that broke HMR
- Use ELECTRON_RENDERER_URL instead of VITE_DEV_SERVER_URL
- Update tsconfig paths for new structure

This fixes hot module replacement not working after the monorepo
restructure. The previous non-standard directory layout with root: '.'
caused electron-vite's HMR to fail silently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 22:03:18 +08:00
Naiyuan Qing
8b660e536c fix(cli): use @multica/core imports instead of relative paths 2026-02-10 18:23:32 +08:00