62 Commits
Author SHA1 Message Date
groovyquan e3c7899274 Merge branch 'dev'
# Conflicts:
#	electron-builder.yml
2026-04-25 00:25:36 +08:00
groovyquan af400c8401 feat: add i18n, logger/window services, custom fonts, and UI improvements
Add internationalization with English and Chinese translations.
Introduce structured logger and window management in the main process.
Switch to WOFF2 fonts for better performance. Update renderer UI
and build configuration to support shared modules and testing.
2026-04-25 00:22:17 +08:00
groovyquan 5563f30df1 test: add Vitest testing framework and main process unit tests 2026-04-25 00:22:17 +08:00
groovyquan ff67d93861 Merge pull request #9 from xiaochong/dev
feat(download): show detailed error reasons and retry button on download failure
2026-04-24 20:45:11 +08:00
groovyquan 035f350940 feat(download): show detailed error reasons and retry button on download failure
Previously all download failures showed a generic "Oops, something went
wrong while getting my toys!" message with no indication of which file
failed or why. Users had no way to tell if it was a network timeout,
HTTP error, disk issue, or extraction failure.

Now:
- Error messages include the file name and specific reason (e.g.
  "ASR Model Weights: Connection timed out (tried 2 times)")
- DownloadScreen displays the error directly with a red progress bar
- A "Try Again" button is shown for easy retry without leaving the screen
- Kitten shows the "interrupted" state when an error occurs
2026-04-24 20:43:29 +08:00
groovyquan d73cc8b8e7 build(mac): restore entitlements.plist for microphone permissions
Restore build/entitlements.mac.plist which declares required macOS
permissions (especially microphone/audio-input access for voice
conversations). Also restore entitlementsInherit in electron-builder.yml
so it is ready when code signing is enabled in the future.
2026-04-23 00:08:02 +08:00
groovyquan ac5529d1fd build(mac): fix macOS icon path and add icon asset
Remove build/ from .gitignore so the macOS .icns icon can be tracked,
add the icon file, and correct the icon path in electron-builder.yml.
2026-04-23 00:01:03 +08:00
groovyquan 0f24b2f81b build(mac): configure macOS packaging settings
- Add custom icon for macOS builds
- Disable code signing (identity: null) for local/unsigned distribution
- Remove entitlements inherit config
2026-04-22 23:39:12 +08:00
groovyquan b999152335 ci: add GitHub Actions workflow for build and release 2026-04-22 23:32:39 +08:00
groovyquan e464e06c15 feat(website): add project landing page with GitHub Pages deployment
Add a landing page for HiKid including:
- Responsive HTML/CSS/JS with i18n support
- App icon and preview screenshots
- GitHub Actions workflow for automated Pages deploy
2026-04-22 23:24:53 +08:00
groovyquan b7523f50df docs: add simplified installation requirements and plan
Add brainstorming requirements doc and structured implementation plan
for the automated first-launch dependency setup feature.
2026-04-22 22:54:34 +08:00
groovyquan 6be4b28bb8 docs: simplify INSTALL.md with quick-start first
- Lead with 'just open the app' as the recommended path
- Move manual steps into a collapsible details block
- Convert troubleshooting to a concise table
- Add Ollama download link in both EN and CN versions
2026-04-22 22:49:05 +08:00
groovyquan 91aed69e5c feat(install): auto-detect deps and download models on first launch
- Add dependency checking for SoX, espeak-ng, Ollama
- Add DepsSetupScreen to guide users through brew installs
- Auto-download binaries and models from GitHub Releases / HuggingFace
- Support resume and cancel for downloads
- Add install-dependencies.sh script for power users
- Increase default window height for better layout
- Follow HTTP redirects during downloads
- Fix progress double-counting on resume
- Extend download timeout to 120s for large files
2026-04-22 22:48:58 +08:00
groovyquan 9280275b63 docs: add espeak-ng install steps and fix TTS model path
- Add espeak-ng (TTS dependency) to both English and Chinese install guides
- Fix TTS model extraction path: archive extracts to models/kitten-tts-micro/,
  but the app expects models/kitten/kitten-tts-micro/
- Add missing mlx.metallib move step for ASR server setup
- Update troubleshooting references to match new step numbers
2026-04-21 21:17:54 +08:00
groovyquan aab852be6f Merge branch 'dev' 2026-04-21 20:40:27 +08:00
groovyquan 98efbcccae Merge pull request #3 from illidanne/fix/macos-homebrew-path-for-tts
fix: add Homebrew paths to child process env on macOS
2026-04-21 20:37:28 +08:00
groovyquan f9f9a7e0ee style: apply Prettier formatting to docs and components 2026-04-21 19:47:28 +08:00
groovyquan 0e6edfb1ba feat(ideas): add game icons and fix dropdown overflow
Add emoji icons to each speaking game in the list and confirmation
card. Fix dropdown panel to scroll when content exceeds viewport.
2026-04-21 19:47:28 +08:00
groovyquan 12b16c59c0 docs: add ideas dropdown games requirements and plan 2026-04-21 19:47:28 +08:00
groovyquan 12494809d4 feat: Ideas secondary menu with 11 speaking games
- Replace flat TopicSuggestions with tabbed IdeasMenu (Try Saying + Speaking Games)
- Add 11 interactive English games with confirmation cards
- Extend ChatMessage with 'system' role for game rules display
- Add addSystemMessage to useConversation hook
- Style system messages as gray centered cards in ChatBubbles
- Games: Animal Chain, Word Chain, Sentence Builder, Fill Blank,
  Simple Math, Number Bomb, Simon Says, Riddles, Describe & Guess,
  Quick Q&A, Word Category Battle
2026-04-21 19:47:28 +08:00
illidanne fb0ae26740 fix: add Homebrew paths to child process env on macOS
When HiKid is launched as a packaged .app on macOS, the PATH
environment variable does not include /opt/homebrew/bin or
/usr/local/bin. This causes the TTS server (kitten-tts-server)
to fail when trying to invoke espeak-ng, which is typically
installed via Homebrew.

This fix prepends the common Homebrew and MacPorts paths to the
child process environment so espeak-ng can be found regardless
of how the app was launched.
2026-04-21 10:59:24 +08:00
groovyquan fcfddacc3b chore: add MIT license
Add MIT License for open-source distribution.
2026-04-19 23:01:39 +08:00
groovyquan 6c2443bb73 docs: split INSTALL into English and Chinese, remove unsupported full-package option
- Rename existing INSTALL to INSTALL-cn.md with language toggle
- Rewrite INSTALL.md in English
- Remove "Option 2: Full Package" section (not yet supported)
- Replace outdated env-var LLM config with in-app Settings instructions
- Update storage estimate to ~2GB and simplify section titles
2026-04-19 22:33:26 +08:00
groovyquan 2e7623675b docs: split README into English and Chinese with language switcher
- Rename existing README to README-cn.md and add language toggle
- Rewrite README.md in English with full project info
- Add preview screenshots and cross-link to INSTALL docs
2026-04-19 22:33:20 +08:00
groovyquan 8044b04c10 docs: rewrite README with full project info and add preview screenshots
- Replace Electron template README with HiKid project description,
  features, architecture, and acknowledgments
- Update INSTALL.md with curl-based binary and model download commands
- Add preview screenshots referenced in README
2026-04-19 22:20:57 +08:00
groovyquan 84b970371c feat: add customizable AI config with settings panel
- Add config service with JSON persistence in ~/.config/hi-kid/config.json
- Add IPC channels: config:get, config:set, config:changed
- Agent now supports dynamic aiName and systemPrompt with {{AI_NAME}} placeholder
- Extend SettingsPanel with gear icon and config form dropdown
- Replace all hardcoded "Kitten" references with dynamic aiName prop
- LLM parameter changes trigger automatic Agent rebuild
2026-04-19 20:59:24 +08:00
groovyquan 44179efadd chore: update app metadata, branding, and assets for distribution
- Set app name and configure native macOS menu/About panel
- Update appId, maintainer, version, and homepage for release
- Replace app icon with updated PNG and add SVG source
- Remove unused background assets from public/
2026-04-19 18:21:25 +08:00
groovyquan 359c885904 refactor: rename product from EchoKid to HiKid
Update appId, productName, executableName, config directories,
localStorage keys, and documentation references throughout the codebase.
2026-04-19 17:45:08 +08:00
groovyquan f65c34aaad feat: switch default model to qwen3:0.6b and forbid emojis in agent responses
- Use qwen3:0.6b as the default Ollama model for faster local inference
- Add explicit rule prohibiting emoji usage in the system prompt to keep
the English-learning experience clean and text-focused
2026-04-18 23:15:56 +08:00
groovyquan cdffc415e3 feat: add LLM timeout and user-friendly unreachable hints
- Wrap agent.prompt() with a configurable timeout (default 15s)
- Show a friendly hint when LLM is unreachable instead of raw errors
- Remove pending assistant bubble when LLM errors out
- Add LLM_TIMEOUT_MS and LLM_UNREACHABLE_HINT env vars
2026-04-18 22:03:17 +08:00
groovyquan d0cf12ffc5 feat: auto-detect SoX tools in common Homebrew paths
- Add findSoxTool() to search PATH and common Homebrew locations
- Update rec/sox/play calls to use resolved paths
- Show clear error at startup if SoX tools are missing
2026-04-18 21:15:00 +08:00
groovyquan c9125c60d5 docs: add macOS installation guide 2026-04-18 21:15:00 +08:00
groovyquan f07fcaf418 feat: add bundled build variant and distribution config
- Add electron-builder.bundled.yml for all-in-one builds with binaries/models
- Add prepare-bundled.js script to copy local deps into resources/
- Update appId, productName, and mac signing settings
- Add build:mac:bundled npm script
- Remove npmmirror electron mirrors from .npmrc
- Ignore resources/bin and resources/models in .gitignore
2026-04-18 21:14:57 +08:00
groovyquan 946ffbf53e style: shrink default window width to 900 2026-04-18 20:22:14 +08:00
groovyquan 075ee06615 style: compact control icons and labels
Shrink padding/gaps in SettingsPanel and TextToggle, replace
text-heavy labels with inline icons + short labels for a
cleaner, more scannable top-bar layout.
2026-04-18 20:14:15 +08:00
groovyquan fbd28ebe9e feat: onboarding screen, topic suggestions, and recorder locking
- Add OnboardingScreen for first-time users with guided steps
- Add TopicSuggestions dropdown with conversation starters
- Replace isListening flag with recorderLock for thread-safe recording
- Add fairy-tale error messages for more failure cases
- Fix AudioContext reuse for send sound feedback
- Improve VoiceButton pointer capture and press state handling
- Increase default window size for onboarding layout
2026-04-18 20:03:43 +08:00
groovyquan 7a5f01d2a3 fix: handle quick tap recording stop gracefully
Kill the SoX recording process on early stop, discard recordings that
are too short to contain speech, and remove the pending user-message
placeholder when transcription comes back empty.
2026-04-18 18:21:52 +08:00
groovyquan 682b488385 fix: reset conversation state properly and guard message flow with busy check
Set isConversationComplete default to true so the agent isn't flagged busy
on startup. Add resetConversationState() and isAgentBusy() helpers, use
them in agent:reset (clear isListening flag) and in sendMessage/voice
paths to decide between steering an in-flight turn vs. starting fresh.
2026-04-18 17:40:25 +08:00
groovyquan 8799fbb397 feat: add clear conversation button
Expose agent:reset IPC handler to stop TTS and reset the agent,
then wire a small "x" button into the messages badge for one-click
clearing of the chat history.
2026-04-18 17:25:12 +08:00
groovyquan f03427fddd style: apply animal-crossing custom cursor across UI
Replace default pointer and not-allowed cursors with the
animal-island-ui leaf cursor on body, buttons, and interactive
elements. Cursor image placed in renderer public directory
for Vite to serve directly.
2026-04-18 17:14:51 +08:00
groovyquan 0a59115a49 fix: prevent duplicate TTS/ASR server startup on HMR or restart
Check if existing server processes are still alive before spawning
new ones. Reuse running processes when health endpoints respond
successfully, avoiding 'Address already in use' errors.
2026-04-18 17:14:43 +08:00
groovyquan edb2d194b2 feat: kitten speaking state with o–o animation and interaction flow fixes
- Add `speaking` kitten state emission from TTS queue in agent.ts
- Track `pendingTtsCount` to prevent VAD from capturing AI's own voice
- Kitten mouth switches to conditional O–O toggle animation when speaking
- Listening state gets ear-perk animation on left ear
- Fix `isProcessing` state to clear on any non-listening state transition
- Add VAD auto-restart after conversation turn completes
- Reset state properly when switching between press-and-hold and VAD modes
2026-04-18 14:36:08 +08:00
groovyquan 27c539b8c0 feat: smoother interaction flow with placeholders and audio feedback
- Add isProcessing state to bridge idle→thinking gap
- Insert pending user placeholder on release, replace with transcription
- Insert pending assistant placeholder on thinking start
- Replace static bubble icon with extracted component
- Add send chime via Web Audio API
- Add thinking spinner and speaking wave indicators
- Update mic-label to show Listening/Thinking/Speaking/Hold to speak
2026-04-18 13:43:55 +08:00
groovyquan 3ebcb1795c feat: polish UI with animal-island-ui backgrounds and fix service restart
- Apply home_bg.svg leaf pattern to main background (#7dc395)
- Apply menu_bg.svg to chat sidebar, remove white overlay
- Add glassmorphism (translucent + backdrop-filter) to controls
- Fix HMR duplicate service startup in channels.ts (guard with servicesReady)
- Move static assets to src/renderer/public/assets/ for Vite dev server
- Update .gitignore to exclude .env
2026-04-18 13:14:22 +08:00
groovyquan e80a1e36c0 fix: subtitles default off on first launch, restore from localStorage after 2026-04-18 13:14:08 +08:00
groovyquan 07b5177fd1 fix: subtitles disabled by default on startup 2026-04-18 13:14:08 +08:00
groovyquan c047b771f9 fix: ensure TTS/ASR child processes are killed on app exit
- stopServers() now sends SIGKILL after 800ms if SIGTERM is ignored
- SIGKILL cannot be caught/ignored, guaranteeing process termination
- Add cleanup on will-quit, SIGINT, SIGTERM for dev-mode reliability
- Extract shared cleanup() helper in index.ts
2026-04-18 13:14:07 +08:00
groovyquan c572814644 fix: show sidebar immediately when subtitles enabled 2026-04-18 12:32:35 +08:00
groovyquanandClaude Opus 4.7 5ebbb17a9b feat: move chat subtitles to right sidebar with auto-scroll
- Split app layout into horizontal flex: main content + sidebar
- ChatBubbles now renders inside a fixed-width sidebar (300px)
- Chat bubbles container fills sidebar height with scroll overflow
- Auto-scroll uses scrollIntoView({ behavior: 'smooth' }) on new messages
- Sidebar animates in with slide transition
- Removed bottom-stacked chat layout

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 12:28:49 +08:00
groovyquan b628ce8967 fix: load .env variables in main process via dotenv/config 2026-04-18 12:20:42 +08:00