* loop: stt-warmup completed after 6 iterations
* refactor: extract STT startup helpers and simplify audio recorder
* feat(stt): add energy-based VAD with silence gate and auto-stop
- New VoiceActivityDetector class: adaptive noise floor, per-frame RMS
classification, trailing-silence endpointing, configurable thresholds
- AudioWorkletProcessor computes RMS in existing flush loop and posts
{samples, rms} instead of a bare Int16Array
- AudioRecorder integrates VAD via handleVadFrame() in both worklet and
ScriptProcessor paths; auto-calls stop() on trailing silence; silence
gate in processRecording() fires onNoSpeech instead of sending empty
audio to the transcription API (fixes Whisper hallucination bug)
- useSTT wires setOnNoSpeech to reset isProcessing/isRecording cleanly
without surfacing an error
- computeRms() exported helper for ScriptProcessor fallback path
* fix(stt): clear processing state when stopping a silent recording
stopRecording() called recorder.stop() before setIsProcessing(true). For
a silent take the recorder synchronously fires onNoSpeech (which sets
processing false), so the subsequent setIsProcessing(true) won and the
voice overlay was stuck in the processing state forever.
Set processing before stop() so the recorder callback (onNoSpeech or
onDataAvailable) has the final say on the processing flag.
* fix(stt): always emit a terminal signal so the voice overlay never sticks
Two remaining stuck paths after the silent-stop fix:
- processRecording() early-returned without firing onNoSpeech when a take
had no captured audio (e.g. a quick start/stop under one worklet flush,
totalSamples === 0). Now any non-emitting path (empty audio or no
detected speech) fires onNoSpeech, while a genuine abort still returns
silently.
- stopRecording() set isProcessing true even when the recorder was no
longer recording (double-stop or post auto-stop), where stop() skips
processRecording entirely and nothing clears the flag. Guard the
external path on recorder state before entering processing.
* loop: mediarecorder-stt completed after 6 iterations
* refactor(stt): extract shared helpers and cleanup
* refactor(stt): add separate arm/disarm thresholds for voice swipe
* fix(stt): prevent default touch behavior on voice gesture handlers
* feat(stt): add audio-level speech detection before emitting data
* loop: worktree-tabs-2 completed after 4 iterations
* loop: server-env-vars completed after 7 iterations
* feat(worktree): add worktree tabs and server env vars settings
* refactor(worktree): multi-directory SSE support and workspace chip row
* feat(workspace): collapsible workspace manager and sibling filtering
* feat(workspace): workspace creation endpoint, refactored workspace manager, and tests
* refactor(frontend): unify workspace label and remove dead code
- extract shared workspaceLabel helper into api/repos and reuse in
WorkspaceManager and RepoDetail directoryLabels
- remove unused useSessions hook and subscribeToDirectory subscription
- drop redundant frontend workspace dedup now guaranteed by backend
- align WorktreeTabs empty-state test with create-workspace button
* chore: remove dead code and unused exports
* fix: preserve model form during config refresh
Signed-off-by: mehmet turac <mehmetturac@gmail.com>
* loop: model-select-fix completed after 11 iterations
* fix(frontend): show provider prefix for duplicate models in quick select dropdown
When the same model exists under multiple providers, show the provider name
for both entries so users can distinguish them. Detects duplicates by modelID
across all favorites and recents.
* refactor(frontend): replace useTallScrollContent with scroll visibility hook
* fix: harden mirror push rollback
* Remove Load button from skill cards, clicking card loads skill
* feat(backend): add plugin installation support and schema updates
* refactor(frontend): remove unused useHeaderScrollVisibility hook
* refactor(frontend): replace model dropdown with bottom sheet selector
Replace DropdownMenu-based ModelQuickSelect with a bottom sheet
implementation featuring favorites, recents, provider browsing, and
search. Remove onShowModelsDialog prop from PromptInput and
SessionDetail, using data attribute trigger instead. Fix ZodIssueCode
deprecation, input text color, and portal rendering for bottom sheet.
* fix(frontend): simplify session model restore and fix mobile swipe reset
* loop: single-source-models completed after 10 iterations
* refactor(frontend): add desktop sidebar layout to model quick select
* refactor(frontend): improve model selector with connected providers, favorites, and recent management
* fix(frontend): constrain model name width to prevent overflow in prompt input
* fix(frontend): adjust padding and styling in model quick select
* fix(frontend): add optimistic removal with rollback for recent models
---------
* fix: enable swipe-back suspension on more drawer and remove unused variable
* refactor(frontend): improve dialog component and settings navigation
* fix: disable route swipe suspension in MoreDrawer to prevent unintended navigation
* fix(frontend): enable swipe-back suspension on more drawer route
* refactor(frontend): improve mobile navigation drawer and tab bar
* feat: add schedules service and workspace hook with navigation updates
* chore: add workspace hook, schedules library, and tests
* fix: prevent MoreDrawer sentinel from undoing navigation
* feat: per-agent model selection and UI refinements (#217)
* feat: per-agent model selection and UI refinements
- Add agentModels store with setAgentModel/getAgentModel
- PromptInput uses session model priority and stores agent model on change
- useContextUsage derives model from assistant message instead of global
- Migrate sub-agent/subtask badges from purple to blue with refined styling
- Fix MoreDrawer sentinel to skip history-back on navigation
* refactor: improve per-agent model selection and task tool call status indicators
* feat: add repo management skill and internal repos API
* fix: improve assistant session launcher and UI components
* fix: update atomic-json test assertions
* refactor: split Assistant Mode instructions between AGENTS.md and assistant.md
* loop: todo-header-mobile completed after 3 iterations (#218)
* loop: stt-perf-1 completed after 5 iterations
* fix: load audio worklet per recording context
* fix: canonicalize assistant navigation routes
* fix: adjust scroll-up threshold for header visibility
* fix: update settings and skills handling with assistant redirect
* refactor: simplify context usage indicator and extract token sum helper
* feat: add currently selected model row to popover and fix responsive truncate
* feat: add persistent model state storage with database backend
- Create opencode_model_state table for storing user model preferences
- Implement database-backed model state management (recent, favorite, variant)
- Add atomic JSON file utilities with file locking for concurrent safety
- Migrate providers routes from file-based to database storage
- Add backfill migration to preserve existing model.json data
- Include comprehensive tests for model-state and atomic-json modules
- Refactor useSessionAgent hook to simplify agent/model resolution logic
- Update getFileApiUrl to use consistent query parameter approach
* fix: include workspace dependencies in Docker image
* fix: overlay workspace node_modules after source to prevent layer overwrite
* fix: ensure model state table exists for existing databases
* feat: add model state persistence and improve model selection sync
- Add setActiveModel to modelStore and useModelSelection for direct model updates
- Sync session agent model/variant to store when messages load
- Include model, agent, and variant in optimistic user messages
- Fix useSessionAgent to check isFetching during message loading
- Update env.ts to use getter for BASE_PATH for dynamic resolution
- Fix test environment variable from OPENCODE_WORKSPACE_PATH to WORKSPACE_PATH
* refactor(frontend): extract navigation helpers and improve settings back navigation
- Move swipe-back route logic into shared navigation.ts module
- Add getSessionListPath helper for consistent session list navigation
- Add section history tracking to settings dialog for proper back navigation
- Fix voice status overlay loading text visibility during starting state
- Update env and vite config for production domain
* feat: add persistent model state storage with database backend
- Create opencode_model_state table for storing user model preferences
- Implement database-backed model state management (recent, favorite, variant)
- Add atomic JSON file utilities with file locking for concurrent safety
- Migrate providers routes from file-based to database storage
- Add backfill migration to preserve existing model.json data
- Include comprehensive tests for model-state and atomic-json modules
- Refactor useSessionAgent hook to simplify agent/model resolution logic
- Update getFileApiUrl to use consistent query parameter approach
* fix: include workspace dependencies in Docker image
* fix: overlay workspace node_modules after source to prevent layer overwrite
* fix: ensure model state table exists for existing databases
* feat: add model state persistence and improve model selection sync
- Add setActiveModel to modelStore and useModelSelection for direct model updates
- Sync session agent model/variant to store when messages load
- Include model, agent, and variant in optimistic user messages
- Fix useSessionAgent to check isFetching during message loading
- Update env.ts to use getter for BASE_PATH for dynamic resolution
- Fix test environment variable from OPENCODE_WORKSPACE_PATH to WORKSPACE_PATH
* refactor(frontend): extract VoiceStatusOverlay component and improve swipe tracking
- Extract voice status overlay to dedicated VoiceStatusOverlay.tsx component
- Move pointer event handlers from button to container for larger swipe surface area
- Users can now initiate swipe gesture from anywhere in the container, not just the button
* refactor(frontend): add SSE delta support and improve status synchronization
- Add SSEMessagePartDeltaEvent type for streaming delta updates
- Add SSESessionCreatedEvent type for session creation events
- Implement directory filtering for SSE events to prevent cross-contamination
- Add version tracking for status snapshots to ignore stale responses
- Replace individual status updates with atomic replaceStatuses operation
- Refactor parts batcher to use unified operation queue with delta support
- Clear stale statuses on initial snapshot and directory changes
- Add tests for status snapshot clearing and stale response handling
* refactor: remove auto-restart from assistant mode and fix mobile sheet close behavior
Stop restarting OpenCode after assistant mode initialization since the
startup error logic is no longer needed. Also fix the repo quick switch
sheet to stay open when launched from the mobile tab bar, preventing
unwanted navigation away from the sheet.
* refactor(frontend): improve speech-to-text UI
* feat: improve mobile session actions
* feat(frontend): improve mobile session actions
Replace inline file search in MoreDrawer with FileBrowserSheet for
mention-file interactions. Add activePromptFileBasePath state to track
workspace context, normalize file paths on selection, and improve
command sorting with relevance ranking (exact > prefix > partial match).
* refactor(frontend): remove dead state and deduplicate event reconciliation
Remove unused activePromptDirectory from uiStateStore and its writers in
SessionDetail and PromptInput. Consolidate duplicated permission and
question reconciliation helpers in EventContext behind a generic
session-scoped helper.
---------
Co-authored-by: Chris Scott <>
* refactor(prompt): improve mobile speech-to-text feedback
Consolidate the voice button rendering and add a clearer mobile swipe-up affordance for auto-send while fixing hold activation state.
* refactor(prompt): improve mobile speech-to-text feedback
---------
Co-authored-by: Chris Scott <>
* fix: sync model selection with OpenCode state
* feat(model): add favorites system for model selection
- Add toggleFavoriteModel API endpoint
- Add favorite toggle UI in ModelQuickSelect and ModelSelectDialog
- Show provider name prefix when model display names are ambiguous
- Fix directory scoping for getProviders API calls
feat(assistant): send welcome message on new session creation
- Send setup guidance message when creating new assistant session
---------
Co-authored-by: Chris Scott <>
* loop: simple-chat-mode completed after 1 iterations
* feat(frontend): add simple chat mode for user messages and clean up redundant optimistic filtering
* refactor(frontend): consolidate status indicators and simplify simple chat mode
- Merge MiniScanner and CompactStatusIndicator into SessionStatusIndicator with size and showLabel props
- Hide step-finish cost/token display in simpleChatMode
- Update SessionCard and PromptInput to use unified SessionStatusIndicator
- Add tests for step-finish rendering in simpleChatMode
- Replace ChevronDown with ArrowDown icon for scroll button
- Adjust scroll threshold to 150px for better UX
- Add prompt overlay height tracking for proper message container padding
- Include compact status in active session check
* fix: prevent delete button click when card is not swiped open
* refactor: improve CreateRepoInput type safety
* security: require AUTH_SECRET and use secure random generation
* fix: SSH key path validation, async passphrase stripping, and port handling
* fix: use correct console methods for logger levels
* Add error handling to DB update functions and improve migration logging
* Add error handling for session lookup in auth middleware
* Add structured git error handling with user-friendly messages
- Parse git errors with specific error codes (AUTH_FAILED, REPO_NOT_FOUND,
PUSH_REJECTED, MERGE_CONFLICT, etc.) and appropriate HTTP status codes
- Return structured error responses with summary and detail from backend
- Add GitErrorBanner component for better error display in UI
- Add optional onError callback to useGit hook for external error handling
* Make IPC server initialization/disposal async and fix SSH host key handler
* add try-catch error handling in frontend lib utilities
* remove unresolved promise handlers in speech synthesizer callbacks
* Extract error types to shared package
* Import GitErrorCode from shared package
* Refactor API layer to use shared FetchError and fetchWrapper
* Update prompt parser and source control components
* Extract MCP server list to separate component with improved badge menu UX
* merge useSettingsDialogUrl into useSettingsDialog and extract getRepoDisplayName utility
* add separate loading state for passkey sign in
* refactor hooks: use fetchWrapper, improve error handling, add proper types
* replace browser confirm() with DeleteDialog component in settings
* fix: add missing variables parameter in React Query onError callbacks
* Refactor message parts to use separate Zustand store
* Update QuestionPrompt styling for light/dark mode
* Add OAuth authentication support for MCP servers
* Improve mobile text sizing with responsive text classes
* refactor: improve virtualized text viewer with React Query infinite scroll and simplified buffering
* Add push notifications with VAPID and PWA support
* feat: add VAPID environment variables for push notifications
* Replace SquareFill with MicOff icon for stop recording buttons
* Send push notifications when app is not focused
* Fix stop generation button icons to use X instead of MicOff
* feat: enhance push notification logging and debugging
- Add structured logging throughout push notification flow
- Improve error handling with detailed diagnostics
- Add /api/notifications/debug endpoint for troubleshooting
- Enhanced test notification response with per-subscription results
- Add service worker logging and better install/activate handling
* Improve VAPID push notification configuration with validation and better defaults
- Add validation warnings for VAPID_SUBJECT format (requires mailto: prefix for iOS/Safari)
- Expose VAPID details via notifications API endpoint
- Update default VAPID_SUBJECT from mailto:admin@opencode.local to empty string
- Enhance VAPID logging with key lengths and subject info
- Improve documentation in .env.example with setup instructions
* Fix notification URL to use repo ID instead of filesystem path
* Clean up push notification logging and debug endpoints
* Add push notifications documentation
* Add OAuth authentication support for MCP servers
* Improve mobile text sizing with responsive text classes
* refactor: improve virtualized text viewer with React Query infinite scroll and simplified buffering
* Add SSE reconnection before critical actions and handle Cloudflare 524 errors
* refactor: improve responsive layout in QuestionPrompt component
* fix: proper cache updates for OpenCode version on install/upgrade
* fix: markdown files now default to rendered view and render properly
- Add .md and .mdx MIME type support in backend (files.ts, defaults.ts)
- Add key props to FilePreview components to force proper remounting when switching files
- Fix markdown file detection with case-insensitive extension check
- Reset markdownPreview state when file changes to ensure correct default view
- Add onContentLoaded callback to VirtualizedTextView for reactive content updates
- Add fullContent state to properly handle large markdown file rendering
- Add error handling for async content loading to prevent blank screens
- Reduce loading timeout from 50ms to 0ms for more responsive loading
Fixes issues where:
- Markdown files opened in raw view instead of rendered view
- Large markdown files (12k+ lines) showed blank after loading completed
- State persisted incorrectly when switching between different file types
* Add directory download feature with ZIP archive support
* Improve voice recording UX with loading states and better transcript handling
* Fix auth config for prod/dev ports and add documentation
Update AUTH_TRUSTED_ORIGINS and PASSKEY_ORIGIN to use backend port 5003 (frontend uses 5173 in dev). Add comprehensive auth documentation covering secrets, trusted origins, admin reset, and passkeys. Update README and add mkdocs config.
* Remove roadmap section from README
* fix session last active
* Feature/sst (#81)
* Use CSS field-sizing for textarea auto-height and abort STT recording on clear
* Fix invalid date display in git commits
* Use Unix timestamps for git log dates
Changes:
- Bump version to 0.7.3
- Set package.private to false
- Add useSessionAgent hook for per-session agent mode
- Remove global mode preference, use session-level mode
- Add mobile drag-and-drop toggle for repo list
- Improve repo card UI with truncation and compact status
- Fix TypeScript errors in repo.ts (undefined handling)
Fixes#62
- Config file in workspace volume is now the source of truth
* Preserve raw config content with comments instead of re-stringifying parsed JSON
* Sync provider credentials to OpenCode server when adding or removing API keys
* Add error handling for session errors with toast notifications and inline message display
* Refactor provider settings to manage API keys directly with edit/delete support