Commit Graph

40 Commits

Author SHA1 Message Date
egg
7d3fc72bd2 feat: Add browser mode fallback for Kaspersky audio blocking
- Add sidecar management to backend (sidecar_manager.py)
- Add sidecar API router for browser mode (/api/sidecar/*)
- Add browser-api.js polyfill for running in Chrome/Edge
- Add "Open in Browser" button when audio access fails
- Update build scripts with new sidecar modules
- Add start-browser.sh for development browser mode

Browser mode allows users to open the app in their system browser
when Electron's audio access is blocked by security software.
The backend manages the sidecar process in browser mode (BROWSER_MODE=true).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:41:25 +08:00
egg
e7a06e2b8f chore: Archive all pending OpenSpec proposals
Force archive the following proposals:
- add-audio-device-selector (complete)
- add-embedded-backend-packaging (19/26 tasks)
- add-flexible-deployment-options (20/21 tasks)

New specs created:
- audio-device-management (7 requirements)
- embedded-backend (8 requirements)

Updated specs:
- transcription (+2 requirements for model download progress)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 08:44:04 +08:00
egg
c36f4167f2 feat: Add audio device selector and test recording panel
Add a new collapsible panel in meeting-detail page for audio device
management with the following features:

- Device dropdown selector showing all available microphones
- Real-time volume meter using Web Audio API AnalyserNode
- Test recording function (5 seconds max with countdown)
- Test playback function to verify recording quality
- Device hot-plug detection
- Preference persistence in localStorage
- Traditional Chinese localization

The main recording function now uses the user-selected device instead
of auto-selecting, giving users full control over which microphone
to use for meeting transcription.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 08:40:44 +08:00
egg
6112799c79 fix: Improve microphone device selection to avoid alias deviceIds
- Add isAlias() helper to identify 'default' and 'communications' aliases
- Prefer actual device IDs (long strings) over alias IDs
- For alias deviceIds, use {audio: true} to let system choose
- For real deviceIds, try exact first, then ideal as fallback
- Add debug logging for isSecureContext and alias detection

This fixes the "Could not start audio source" error when Electron tries
to open a microphone using exact: 'communications' constraint.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 13:50:49 +08:00
egg
9a6ca5730b debug: Add detailed sidecar startup logging
Add more console.log statements to help debug sidecar startup issues:
- Log when startSidecar() is called
- Log sidecar directory and packaged status
- Log executable path check results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 11:53:07 +08:00
egg
c05fdad8e4 fix: Improve Whisper model status error handling
- Set sidecarReady to false when model_error is received
- Store error message in activeWhisperConfig for status display
- Update frontend to show error state with red indicator
- Prevents showing  when model failed to load

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 11:46:51 +08:00
egg
0defc829dd fix: Make SQLite default for embedded-backend mode
When --embedded-backend is specified, SQLite is now the default database
type instead of MySQL. This is the expected behavior for all-in-one
deployment where the app should work offline without external database.

Users can still explicitly specify --database-type mysql if needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 09:10:45 +08:00
egg
a9bd6b34f1 fix: Remove missing icon references and fix batch syntax
- Remove icon references from package.json (assets folder is empty)
- Fix batch script syntax by replacing if/else blocks with goto labels
- Remove parentheses and colons that conflict with batch syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 08:37:08 +08:00
egg
56cf0c072c fix: Batch script syntax error in build-client.bat
- Replace nested if statements with goto for target validation
- Remove parentheses from echo statements that conflict with if blocks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 08:29:10 +08:00
egg
08cffbb74a feat: Add NSIS installer target and persistent SQLite storage
- Add NSIS installer as default target (--target nsis)
- Keep portable option available (--target portable)
- Store SQLite database in %APPDATA%\Meeting-Assistant for persistence
- Portable temp folder cleanup no longer affects SQLite data
- Update build-client.bat with --target parameter support
- Update DEPLOYMENT.md with new options and comparisons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 08:13:32 +08:00
egg
bc37a5392a chore: Add tzdata to backend requirements
Fixes PyInstaller warning about missing tzdata package on Windows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 20:56:51 +08:00
egg
6f09c5f7cc fix: Correct hidden imports in build-client.bat
- Remove non-existent modules: app.auth, app.routers.dify,
  app.routers.health, app.routers.excel
- Add correct modules: app.routers.ai, app.routers.export,
  app.models, app.models.schemas
- Add sqlite3 and tzdata hidden imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 20:49:07 +08:00
egg
d75789f23e fix: Improve Whisper model status verification and PyInstaller builds
- Add robust model cache verification (check model.bin + config.json)
- Add new status messages: model_cached, incomplete_cache, model_error
- Forward model status events to frontend for better UI feedback
- Add clean_build_cache() to remove stale spec files before build
- Add --clean flag to PyInstaller commands
- Change sidecar from --onefile to --onedir for faster startup
- Add missing hidden imports: onnxruntime, wave, huggingface_hub.utils

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 20:33:59 +08:00
egg
012cdaf5f3 fix: Add Chromium flags to fix audio capture in Electron
- Disable AudioServiceOutOfProcess feature which can cause audio capture issues
- Enable WebRTCPipeWireCapturer for better audio support
- Set autoplay-policy to no-user-gesture-required

These flags must be set before app is ready and help resolve
"Could not start audio source" errors in Electron while the
same microphone works fine in regular browsers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:18:48 +08:00
egg
66295f5177 fix: Filter out Stereo Mix and select real microphone device
- Filter out "立體聲混音" (Stereo Mix) devices which are not real microphones
- Skip the "default" device which may point to Stereo Mix
- Prefer "communications" device or devices with "麥克風/microphone" in label
- Use exact deviceId constraint for better device selection
- Add fallback to preferred constraint if exact fails
- Add more detailed console logging for debugging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 17:34:46 +08:00
egg
49dba2c43e fix: Improve microphone permission handling and audio capture robustness
- Add device enumeration check before attempting to capture audio
- Use simpler audio constraints (audio: true) instead of specific options
- Add fallback to explicit device ID if simple constraints fail
- Add more descriptive error messages for different failure modes
- Enhance Electron permission handlers with better logging
- Add setDevicePermissionHandler for audio device access
- Include 'microphone' in allowed permissions list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 16:47:09 +08:00
egg
e565951bf6 fix: Add microphone permission handlers for Electron
Added session.setPermissionRequestHandler and setPermissionCheckHandler
to automatically grant media/audio capture permissions. This fixes the
"could not start audio source" error when trying to start recording.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 15:54:44 +08:00
egg
744cfd1d27 fix: Add missing meeting_number column to table definitions
The meetings router was using meeting_number column but it was
not defined in the MYSQL_TABLES and SQLITE_TABLES schema definitions,
causing HTTP 500 errors when creating meetings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 14:47:51 +08:00
egg
81905688a6 fix: Escape parentheses in batch script echo statements
Parentheses in Chinese text (本地模式) and (雲端模式) were being
interpreted as if/else block delimiters, causing both echo statements
to execute regardless of the DATABASE_TYPE condition.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 14:01:14 +08:00
egg
01d578c67e feat: Add SQLite database support and fixed portable extraction path
- Add SQLite as alternative database for offline/firewall environments
- Add --database-type parameter to build-client.bat (mysql/sqlite)
- Refactor database.py to support both MySQL and SQLite
- Add DB_TYPE and SQLITE_PATH configuration options
- Set fixed unpackDirName for portable exe (Meeting-Assistant)
- Update DEPLOYMENT.md with SQLite mode documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 13:57:02 +08:00
egg
34947f6262 fix: Handle UTF-8 BOM in config loading and build script
- main.js: Strip UTF-8 BOM when reading config.json
- build-client.bat: Write config.json without BOM using
  [System.Text.UTF8Encoding]::new($false)

PowerShell's -Encoding UTF8 writes BOM by default, which can
cause JSON parsing issues in Node.js.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 12:30:04 +08:00
egg
ac2d9a0240 chore: Set backend.embedded to true for all-in-one packaging
The embedded flag must be true for the portable exe to work.
When embedded is false, the app expects an external backend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 11:28:56 +08:00
egg
2f80a4ac76 fix: Handle UTF-8 BOM in config.json
Use utf-8-sig encoding to handle Windows BOM (Byte Order Mark)
that may be present in config.json files edited with Notepad.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 11:14:54 +08:00
egg
6066946096 fix: Use direct env assignment in run_server.py
Changed from os.environ.setdefault() to direct os.environ[] assignment
for database, API, and auth config. This ensures config.json values
override any pre-existing environment variables (including empty ones
from .env files).

Also added debug output to help diagnose config loading issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 10:48:45 +08:00
egg
c9dc5839db fix: Correct hidden imports in backend build.py
- Change app.auth to app.routers.auth (correct path)
- Change app.routers.dify to app.routers.ai (actual module name)
- Change app.routers.excel to app.routers.export (actual module name)
- Remove app.routers.health (doesn't exist)
- Add app.models and app.models.schemas

Also add database credentials to config.json for embedded mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 10:33:47 +08:00
egg
58f379bc0c feat: Add embedded backend packaging for all-in-one deployment
- Add backend/run_server.py entry point for embedded deployment
- Add backend/build.py PyInstaller script for backend packaging
- Modify config.py to support frozen executable paths
- Extend client/config.json with backend configuration section
- Add backend sidecar management in Electron main process
- Add Whisper model download progress reporting
- Update build-client.bat with --embedded-backend flag
- Update DEPLOYMENT.md with all-in-one deployment documentation

This enables packaging frontend and backend into a single executable
for simplified enterprise deployment. Backward compatible with
existing separate deployment mode (backend.embedded: false).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 10:06:29 +08:00
egg
b1633fdcff feat: Display Whisper model status in frontend and add debug logging
- Add activeWhisperConfig tracking in main.js to expose current Whisper settings
- Expand get-sidecar-status IPC handler to return whisper config (model, device, compute, configSource)
- Add Whisper status display in meeting-detail.html transcript panel header
- Status updates every 5 seconds and shows: model, device, compute type, and ready state
- Add comprehensive debug logging for config loading and whisper config resolution
- Helps diagnose why config.json settings may not be passed correctly to sidecar

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 07:43:35 +08:00
egg
3dd667197f fix: Change default Whisper model from small to medium
Align the default model in transcriber.py with config.json setting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 07:36:32 +08:00
egg
d3e3205692 docs: Update DEPLOYMENT.md with build scripts and API URL configuration
- Add one-click backend setup script documentation
- Document Windows build scripts with --api-url parameter
- Add runtime configuration options for config.json
- Include GitHub Actions CI/CD workflow instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 07:23:17 +08:00
egg
7075078d9e feat: Add --api-url parameter to build-client.bat
Now you can specify the backend API URL when building:
  build-client.bat build --api-url "http://192.168.1.100:8000/api"

This updates client/config.json before packaging so the exe
connects to the specified backend server.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 07:19:52 +08:00
egg
92e203422b fix: Disable code signing to avoid Windows symlink errors
- Add signAndEditExecutable: false to skip code signing on Windows
- Clear electron-builder winCodeSign cache before build
- Add helpful error messages for symlink permission issues

The winCodeSign package contains macOS symlinks that fail to extract
on Windows without admin privileges or Developer Mode enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 20:48:16 +08:00
egg
c19b4e8292 fix: Improve Windows build scripts to properly execute electron-builder
- build-client.bat: Use node_modules\.bin\electron-builder.cmd directly
- build-all.ps1: Use direct path to electron-builder instead of npm run
- setup-backend.bat: Add UTF-8 support and use python -m pip

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 20:40:52 +08:00
egg
7d4fc69071 feat: Add build scripts and runtime config support
Backend:
- Add setup-backend.sh/bat for one-click backend setup
- Fix test_auth.py mock settings (JWT_EXPIRE_HOURS)
- Fix test_excel_export.py TEMPLATE_DIR reference

Frontend:
- Add config.json for runtime API URL configuration
- Add init.js and settings.js for config loading
- Update main.js to load config from external file
- Update api.js to use dynamic API_BASE_URL
- Update all pages to initialize config before API calls
- Update package.json with extraResources for config

Build:
- Add build-client.sh/bat for packaging Electron + Sidecar
- Add build-all.ps1 PowerShell script with -ApiUrl parameter
- Add GitHub Actions workflow for Windows builds
- Add scripts/README.md documentation

This allows IT to configure backend URL without rebuilding.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 20:03:16 +08:00
egg
01aee1fd0d feat: Extract hardcoded configs to environment variables
- Add environment variable configuration for backend and frontend
- Backend: DB_POOL_SIZE, JWT_EXPIRE_HOURS, timeout configs, directory paths
- Frontend: VITE_API_BASE_URL, VITE_UPLOAD_TIMEOUT, Whisper configs
- Create deployment script (scripts/deploy-backend.sh)
- Create 1Panel deployment guide (docs/1panel-deployment.md)
- Update DEPLOYMENT.md with env var documentation
- Create README.md with project overview
- Remove obsolete PRD.md, SDD.md, TDD.md (replaced by OpenSpec)
- Keep CORS allow_origins=["*"] for Electron EXE distribution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 14:31:55 +08:00
egg
43c413c5ce feat: Upgrade Whisper model to medium and increase beam size
- Change default model from small to medium for better accuracy
- Increase beam_size from 5 to 8 for improved transcription quality
- Add Whisper environment variables to start.sh for centralized config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 08:25:25 +08:00
egg
2e78e3760a chore: Archive add-dify-audio-transcription proposal
Move completed Dify audio transcription proposal to archive and update
transcription spec with new capabilities.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 21:05:01 +08:00
egg
263eb1c394 feat: Add Dify audio transcription with VAD chunking and SSE progress
- Add audio file upload transcription via Dify STT API
- Implement VAD-based audio segmentation in sidecar (3-min chunks)
- Add SSE endpoint for real-time transcription progress updates
- Fix chunk size enforcement for reliable uploads
- Add retry logic with exponential backoff for API calls
- Support Python 3.13+ with audioop-lts package
- Update frontend with Chinese progress messages and chunk display
- Improve start.sh health check with retry loop

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 21:00:27 +08:00
egg
e790f48967 feat: Excel template export with meeting number auto-generation
- Add meeting_number field (M-YYYYMMDD-XX format) with auto-generation
- Refactor Excel export to use cell coordinates instead of placeholders
- Export files saved to backend/record/ directory with meeting number filename
- Add database migration for meeting_number column
- Add start.sh script for managing frontend/backend/sidecar services
- Update OpenSpec documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 19:45:53 +08:00
egg
a4a2fc3ae7 fix: Preserve form content when adding/removing conclusions and actions
Sync DOM values to currentMeeting object before re-rendering when user
clicks Add or Remove buttons. Previously, typed content was lost because
render functions read from the data model which wasn't updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:26:16 +08:00
egg
8b6184ecc5 feat: Meeting Assistant MVP - Complete implementation
Enterprise Meeting Knowledge Management System with:

Backend (FastAPI):
- Authentication proxy with JWT (pj-auth-api integration)
- MySQL database with 4 tables (users, meetings, conclusions, actions)
- Meeting CRUD with system code generation (C-YYYYMMDD-XX, A-YYYYMMDD-XX)
- Dify LLM integration for AI summarization
- Excel export with openpyxl
- 20 unit tests (all passing)

Client (Electron):
- Login page with company auth
- Meeting list with create/delete
- Meeting detail with real-time transcription
- Editable transcript textarea (single block, easy editing)
- AI summarization with conclusions/action items
- 5-second segment recording (efficient for long meetings)

Sidecar (Python):
- faster-whisper medium model with int8 quantization
- ONNX Runtime VAD (lightweight, ~20MB vs PyTorch ~2GB)
- Chinese punctuation processing
- OpenCC for Traditional Chinese conversion
- Anti-hallucination parameters
- Auto-cleanup of temp audio files

OpenSpec:
- add-meeting-assistant-mvp (47 tasks, archived)
- add-realtime-transcription (29 tasks, archived)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:17:44 +08:00