- Change reloadConfig to read from opencode.json file instead of HTTP API
- Add logging for OpenCode PATCH responses to aid debugging
- Make providerId optional in schema with custom validation when needed
- Update test to mock fs.readFile instead of fetch
- Trigger reloadConfig() after API key save/delete in providers route so the
OpenCode server immediately recognizes newly connected providers
- Wrap reloadConfig() in try/catch in both providers.ts and oauth.ts so
credential operations succeed even if the reload fails transiently
- Add invalidateProviderCaches() utility covering all provider-related query
keys, replacing scattered manual invalidation across ProviderSettings
- Remove duplicate provider key invalidation from invalidateConfigCaches()
by delegating to invalidateProviderCaches()
- Remove unused invalidateAllConfigRelatedCaches() export
Fixes#180
* Fix Ralph state type safety and null handling in status commands
* Refactor Ralph to use worktree-keyed session mapping instead of sessionId lookups
* Add configurable KV TTL with 7-day default and update agent prompts
* Add --limit flag to CLI status and improve null safety for RalphState fields
* Bump memory package version to 0.0.25
* ralph: ralph-repo-level-skills-dialog-skillseditor-fix completed after 4 iterations
* Remove parent session notification and child session tracking from Ralph loops
Sending promptAsync to parent sessions on loop completion could resume
work in previously inactive sessions. Removed parentSessionId from
RalphState, child session tracking maps, and all related event handling.
Watchdog stall detection still works via the session status API.
* Migrate global skills to workspace path
* Add skill injection to scheduled job prompts
* Refactor schedules UI with MultiSelect and tab menu
* Update skills UI components for managed skills
* feat: discover local repos and reconnect OpenCode sessions
Replace one-by-one local repo setup with parent-folder discovery and path-aware repo linking so first-time installs can recover existing OpenCode chats. Add first-run import support and onboarding docs for standalone OpenCode users, including Docker path-matching guidance.
* fix: address session discovery review feedback
* fix: improve delete/unlink messaging for local vs cloned repos
* feat: discover local repos and reconnect OpenCode sessions (#158)
---------
Co-authored-by: itz4blitz <justinscroggins@outlook.com>
Co-authored-by: itz4blitz <60281870+itz4blitz@users.noreply.github.com>
* fix(lsp): Fixes pyright LSP initialization timeout
* test(lsp): Add unit tests for bin directory initialization
- Add reinitializeBinDirectory() public method for testing
- Add 7 comprehensive test cases
- Cover success scenarios, error handling, and edge cases
- Achieve 100% code and branch coverage
* Refactor OpenCode server for testability and fix bin directory tests
* Standardize test ENV mocks and modernize imports
---------
Co-authored-by: Niu Shuai <guisu2010@gmail.com>
* fix(lsp): Fixes pyright LSP initialization timeout
* test(lsp): Add unit tests for bin directory initialization
- Add reinitializeBinDirectory() public method for testing
- Add 7 comprehensive test cases
- Cover success scenarios, error handling, and edge cases
- Achieve 100% code and branch coverage
* Refactor OpenCode server for testability and fix bin directory tests
---------
Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
PR #145 accidentally reverted all source control enhancements from PR #138. This cherry-picks those changes back: discard changes functionality, commit detail view, commit file diffs, diff truncation, and UI improvements.
* feat: enhance source control with discard and commit detail views
- Add discard changes functionality with confirmation dialog
- Implement commit detail view with file list and diffs
- Update commit badges: blue for unpushed (local), purple for pushed (remote)
- Display current branch in commits header
- Reuse existing components (DeleteDialog, FileDiffView, GitFlatFileList)
- Add proper error handling and toast notifications
- Extend backend API with /discard and /commit/:hash endpoints
- Update types to include CommitDetails and CommitFile interfaces
Backend:
- Add discardChanges() method to GitService
- Add getCommitDetails() and getCommitDiff() methods
- Add POST /:id/git/discard endpoint
- Add GET /:id/git/commit/:hash and /:id/git/commit/:hash/diff endpoints
Frontend:
- Add discard button (rotate-left icon) to file items
- Add gitDiscardFiles API function and useGit mutation
- Create CommitDetailView component
- Update CommitsTab with color coding and branch display
- Extend SourceControlPanel for commit detail navigation
- Add confirmation dialog using DeleteDialog pattern
Tests:
- Backend tests passing with 77% line coverage
- Linting passes for all modified files
- Type safety maintained throughout
BREAKING CHANGES: None
* Fix critical bugs from code review
- Fix syntax error in GitService.ts (missing closing brace for getCommitDiff)
- Make AUTH_SECRET mandatory in crypto.ts to prevent weak encryption fallback
- Fix race condition in PassphraseHandler by using unique request IDs
- Add error logging to ssh-key-manager catch blocks
- Add type guards (isGitCredential, filterGitCredentials) to replace unsafe assertions
- Fix TypeScript errors and variable shadowing in GitService and settings
- Remove unused variable in sshHostKeyHandler
- Update GitService tests with proper mock data structure
All changes verified: lint passes, typecheck passes, 102/103 tests pass
* Fix critical bugs from code review
- Fix git restore command syntax (--source=HEAD → --source HEAD)
- Use crypto.randomBytes for secure requestId generation
- Add requestId to SSH host key broadcast for frontend compatibility
- Add missing onDiscard prop to GitFlatFileList
- Remove dead code (187 unreachable lines) in ChangesTab
- Fix regex alternation bug in commit stat parsing
- Optimize getCommitDetails with --numstat (N+1 → 1 git call)
- Optimize unpushed commit check to use merge-base instead of full list
- Remove useless conditional in handleDiscard
- Fix type contract violation in CommitDetailView onSelect
* fix: resolve code review issues
- Add missing handleDiscard function in ChangesTab.tsx
- Fix duplicate requestId property in sshHostKeyHandler.ts
- Remove unnecessary type assertion in settings.ts
* feat: enhance source control with commit view improvements and diff fixes
- Add readOnly mode to GitFlatFileList to hide stage/unstage buttons in commit view
- Fix commit file diff display by using correct git show command syntax
- Add line stats display (+additions/-deletions) for each file in commit view
- Show total commit stats in header (Changed Files N +X -Y)
- Fix commit file list parsing to use --name-status and --numstat
- Add 500KB diff size limit with truncation warning
- Fix discard changes for untracked files by deleting them directly
- Update Dockerfile to copy backend/node_modules correctly
- Fix TypeScript error in CommitDetailView onFileSelect call
* Refactor API error handling and enhance source control functionality
* Fix code review issues: OAuth error handling, unpushed detection, comments, and duplicates
- Remove shared handleApiError import from OAuth and restore local pattern
- Fix isCommitUnpushed to use getUnpushedCommitHashes for correct upstream detection
- Remove inline comments from ssh-key-manager.ts (style violation)
- Remove duplicate fetchCommitDiff function
- Add missing getErrorMessage import to repo-git.ts
* Refactor imports and type assertions in GitService, SSH tests, and handleApiError
* Refactor GitService methods for improved error handling and code clarity; add discardChanges functionality and enhance commit details retrieval
* Refactor Git and SSH services: streamline imports, enhance error handling, and remove unused code
* Refactor source control components: remove unused useGitAction hook and enhance error handling in handleGitAction
* Enhance error handling in Git routes and improve UI components for better user experience
* Remove unnecessary blank line in GitService class
* Fix commit log parsing and rename detection in GitService
* Refactor source control UI for full-screen diffs, improve mobile view, and add discard confirmation dialog
* Fix lint warnings and ignore test files in GitGuardian scan
---------
Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
* Add SSH known hosts support and optimize git status fetching
* Add opencode-manager version to health endpoint
* Add version notifications for new releases
---------
Co-authored-by: Fran Boon <fran@aidiq.com>
* 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
* refactor: consolidate git services into single GitService class
Merges GitBranchService, GitCommitService, GitDiffService, GitFetchPullService,
GitLogService, GitPushService, and GitStatusService into one cohesive GitService
that simplifies architecture and follows SOLID principles. Updates all route
handlers and tests to use the new consolidated service. Moves GitBranch interface
to shared types location.
* Refactor settings dialog to use URL-based state management with tab synchronization
* Update social preview image
* 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
- Make STT API key optional and remove continuous mode field
- Consolidate TTS and STT settings into new Voice settings tab
- Convert audio recorder from MediaRecorder to AudioContext with WAV output
- Improve STT backend validation and response handling
- Update tests for optional API key scenarios
* Remove unused variables from routes and migrations
* Use structured logging instead of console in archive service
* Remove unused test variables and configure ESLint for test files
* refactor sse directory management with reference counting and improve message invalidation
* simplify question prompt Other option handling and increase max height
Remove redundant Cancel/Confirm buttons, use main Next/Confirm button for custom input, prevent double selection in single-select mode, auto-scroll textarea on focus, increase max-height from 40vh to 70vh
* Fix download dialog to show gitignored paths with opt-in selection
- Add getIgnoredPathsList API to detect gitignored files from git root
- Fix git check-ignore to run from proper git root directory
- Add ignored paths checkboxes in download dialog for opt-in inclusion
- Support includeGit and includePaths options in download endpoints
- Fix dialog button event handling to prevent page reload
* Add clone timeout and improve git error handling
* Refactor path extraction in download-zip endpoint