Commit Graph
183 Commits
Author SHA1 Message Date
Chris Scott 2bd2b024b8 refactor: replace OpenCode server restarts with config reloads for faster updates (#70) 2026-01-17 12:40:22 -05:00
Chris Scott 8be0bbd8a0 Merge branch 'main' of https://github.com/chriswritescode-dev/opencode-manager 2026-01-15 20:54:42 -05:00
Naman Rajpal 1e4b756973 fix: allow text paste on iOS by checking clipboard text before files (#64) 2026-01-15 20:53:48 -05:00
Chris Scott d428f19922 Add settings to mobile menu and fix header styling 2026-01-15 20:49:57 -05:00
Chris Scott 2ba959ac0b Add app loader and skeleton states 2026-01-15 19:03:25 -05:00
Chris Scott fc5e532abb Update session UI with improved header and scroll masks 2026-01-15 18:02:53 -05:00
Chris Scott 99cc7c5c43 Optimize repo list spacing and layout adjustments 2026-01-15 18:02:52 -05:00
Ishaan Sharma e3f95ad3b6 chore: make File Changes section collapsible (#60) 2026-01-15 16:26:45 -05:00
Chris Scott 078fbd1a05 Add config sync mode to prevent config file overwrites on startup (#63)
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
2026-01-15 10:39:38 -05:00
Naman RajpalandChris Scott f3505de0e1 Add Markdown Preview to FilePreview Component (#51)
* Adding markdown preview in FilePreview

* Refactor markdown rendering into reusable components

* Fix: Make syntax highlighting theme-aware

* Refactor: Follow project conventions for naming and CSS organization

* Refactor: Use virtualization infrastructure for markdown preview

- Add loadAll(), fullContent, isFullyLoaded to useVirtualizedContent hook
- Expose new methods via VirtualizedTextView ref handle
- Remove duplicate fetch in FilePreview, use ref methods instead
- Add 1MB size limit for markdown preview with user-friendly message

---------

Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
2026-01-13 18:51:41 -05:00
Chris Scott f0d97f8d6e Fix issue #42: Support absolute paths when adding local repos (#52)
Add ability to import existing git repositories from absolute paths by copying them to the workspace.

Backend changes:
- Add helper functions: isValidGitRepo(), checkRepoNameAvailable(), copyRepoToWorkspace()
- Add checkoutBranchSafely() helper for consistent branch handling across codebase
- Modify initLocalRepo() to detect absolute vs relative paths
- For absolute paths: validate, check if git repo, copy to workspace using git clone --local
- For relative paths: maintain existing behavior (create new empty git repo)
- Refactor switchBranch() to use shared checkoutBranchSafely() helper
- Fail with clear error message if repo name already exists in workspace

Frontend changes:
- Update UI placeholder and help text to explain absolute path support
- Branch help text adapts based on input type (absolute vs relative)
2026-01-13 10:15:07 -05:00
Chris Scott 3ab55fc682 Refactor SessionCard layout to vertically stack checkbox with busy indicator 2026-01-13 09:37:05 -05:00
Chris Scott cd8d87710e Fix message ID comparison for alphanumeric IDs 2026-01-13 00:16:09 -05:00
Chris Scott f7fd3176d4 Refactor SSE event handling and consolidate notification contexts 2026-01-12 23:56:50 -05:00
Chris Scott dc9a57b361 fix TypeScript errors for updated OpenAPI types 2026-01-10 20:10:48 -05:00
Chris Scott 8695f7c745 add drag and drop repo reordering functionality 2026-01-10 19:40:42 -05:00
Chris Scott 17ee96d316 regenerate OpenAPI spec and add model selection components 2026-01-10 18:39:12 -05:00
Chris Scott 9ed292af2a add OpenCode upgrade endpoint and UI button (#49) 2026-01-10 10:27:24 -05:00
Chris Scott 3af1cfbaac fix repo mcp dialog desktop fullscreen layout 2026-01-04 18:12:59 -05:00
Chris Scott a6fd795eaa Implement session-level todo state management with inline display 2026-01-04 18:08:09 -05:00
Chris Scott 84c947d19a Add fallback copy method for non-HTTPS clipboard access 2026-01-04 17:42:16 -05:00
Chris Scott b9b139ce48 fix untracked file diff regex pattern and add tests 2026-01-04 17:23:26 -05:00
Chris Scott ed4bc17987 add typecheck script and fix TypeScript errors (#48) 2026-01-04 17:11:53 -05:00
Justin CarlsonandChris Scott cd9a552bf8 fix: centralize iOS safe area and refactor list components (#47)
* fix: add iOS safe-area-inset-top support for fullscreen overlays

- Add pt-safe CSS utility class for safe-area-inset-top
- Create FullscreenSheet component with built-in safe-area support
- Add fullscreen prop to DialogContent for fullscreen dialogs
- Update FileBrowserSheet to use FullscreenSheet
- Update MobileFilePreviewModal to use FullscreenSheet
- Add pt-safe to SettingsDialog mobile view

Fixes status bar overlap on iOS devices with notch/Dynamic Island

* fix: add pt-safe to main page headers

- Header.tsx (main repos page)
- SessionDetailHeader.tsx (session page)

* docs: add TDD refactoring plan for iOS safe area

* remove plan file from repo

* refactor: centralize iOS safe area handling with PageHeader component

- Add PageHeader component with pt-safe, sticky, z-10, border-b styling
- Add TDD test infrastructure (vitest config, testing-library, jsdom)
- Refactor Header, SessionDetailHeader, RepoDetailHeader, Workspace to use PageHeader
- Fix missing pt-safe on RepoDetailHeader and Workspace pages
- All header safe area styling now has single fix point

* fix: add pt-safe to remaining fullscreen dialogs and sheets

- GitChangesSheet, FilePreviewDialog: add fullscreen prop
- ModelSelectDialog, RepoMcpDialog: add pt-safe class
- EditSessionTitleDialog: add pt-safe on mobile

* fix: use mobile-first positioning for large dialogs

Dialogs need top-0 positioning on mobile for pt-safe to work.
Centered dialogs don't benefit from safe area padding.

* fix: add mobileFullscreen prop to DialogContent

- Fullscreen on mobile with pt-safe, centered on desktop
- Simplifies large dialog styling

* fix: use inline styles for iOS safe area to fix CSS cascade issues

- Convert pt-safe/pb-safe to @utility directives with iOS 11 fallback
- Use inline styles on DialogContent for reliable safe-area padding
- Position close button with calc(env(safe-area-inset-top) + 1rem)
- Add 10 tests for DialogContent safe-area behavior

* refactor: extract ListToolbar and Header components for reuse

- Add ListToolbar component for search/select all/delete UI
- Add Header compound component (Header.Root, Header.Title, etc.)
- Update SessionList and RepoList to use ListToolbar
- Mobile delete: deletes selected or all if none selected
- Cancel delete now clears selection
- Remove unused layout components

---------

Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
2026-01-04 14:05:59 -05:00
Chris Scott 8166044d6e Fix eslint (#46)
* Fix mobile image upload and paste with improved file type handling

* Replace older sessions header with separator line

* Add ESLint no-console rules and fix lint errors

- Add eslint configuration for backend with no-console rule
- Add reusable error type guard utility
- Replace all error: any with error: unknown and type guards across backend
- Update logger to use console.warn/console.error only
- Remove unused variables and dead code functions
- Fix regex escape characters
- Update AGENTS.md with lint commands and requirements
2026-01-03 15:19:28 -05:00
Chris Scott c9bf962ac0 Fix mobile paste (#45)
* Fix mobile image upload and paste with improved file type handling

* Replace older sessions header with separator line
2026-01-03 11:44:39 -05:00
Chris Scott 4b175604e9 Refactor session list with card component and date grouping 2026-01-03 00:51:05 -05:00
Chris Scott 6af39af424 Add AI-generated session titles with loading indicator and debouncing 2026-01-03 00:36:09 -05:00
Chris Scott ec10be823e Remove iconOnly prop from branch selector in RepoDetailHeader 2026-01-02 23:29:23 -05:00
Chris Scott 9c8bb3b8f6 Add edit session title dialog with clear button for mobile, inline editing for desktop 2026-01-02 23:25:12 -05:00
Chris Scott 005861ddf9 Add SquareFill icon component and update TTS/stop button styling with responsive cost display 2026-01-02 23:00:13 -05:00
Chris Scott 507860329d Show active branch name in SessionDetailHeader on desktop 2026-01-02 21:58:54 -05:00
Chris Scott f1a7d36433 Add configurable global git identity settings with new Git tab (#43) 2025-12-31 13:52:55 -05:00
Chris Scott a736e98880 Add multiple git credentials support with migration 2025-12-31 10:47:55 -05:00
Chris Scott 15643ae06b Add provider connection status tracking and API key setup flow 2025-12-30 08:54:26 -05:00
Chris Scott d7873241e0 Add image and PDF attachment support with drag-drop and paste 2025-12-28 22:52:16 -05:00
Chris Scott cc04cb073c Add MCP server search functionality to repo dialog 2025-12-28 21:32:15 -05:00
Chris Scott cad84d2f63 Improve OpenCode config error handling and toast notifications 2025-12-28 21:10:00 -05:00
Chris Scott 876b444599 Add config rollback and startup error recovery 2025-12-28 20:52:36 -05:00
Chris Scott 120d087910 Add support for GitHub shorthand repo URLs 2025-12-27 19:27:37 -05:00
Chris Scott ee99bb65fc Reorder branch switcher dropdown: view changes and add branch at top, scrollable branch list below 2025-12-27 18:19:57 -05:00
Chris Scott f1557fba5d Improve permission dialog UI and update Python package documentation 2025-12-27 17:54:43 -05:00
Chris Scott a500d2ce55 Fix empty file editing in file browser 2025-12-27 17:16:47 -05:00
Chris Scott 923b70833d Fix performance optimizations for permission handling and session management (#32) 2025-12-27 09:52:30 -05:00
b28f069576 Fix/permission request directory (#31)
* Fix permission response by including directory parameter

Extract directory from query key in useActiveRepos hook and pass it
to OpenCodeClient when responding to permissions. Use composite keys
for client and SSE connection tracking to support multiple repos with
the same URL but different directories.

* Keep permission dialog open on response failure and show error toast

* Fix permission request proxying to preserve query parameters

The backend proxy was incorrectly handling URL query parameters when stripping the /api/opencode prefix. This caused the directory parameter to not be passed correctly to the OpenCode server, breaking the permission request/response flow.

Changes:
- Separate pathname and search parameters explicitly
- Only strip /api/opencode from pathname, preserve search params
- Add logging for permission requests to aid debugging
- Update error logging to use correct variables

This fix ensures that permission responses are properly forwarded to the OpenCode server with all necessary query parameters, allowing the session to proceed correctly when users grant permissions.

* Fix permission client lookup when only individual sessions are loaded

The PermissionContext failed to find a client when responding to permissions because it only scanned the sessions list query, but SessionDetail and other pages only load individual sessions via useSession.

Changes:
- Update useActiveRepos to also scan individual session queries
- Match query keys like ['opencode', 'session', url, sessionId, directory]
- Extract session ID from individual session query data
- Build active repos map from both sessions list and individual session queries

This ensures permission dialogs can find the appropriate client to send responses, even when viewing a single session without loading the full sessions list.

* Fix permission client lookup with fallback to query cache

The activeRepos state was often empty when permission dialogs appeared due to timing issues with the React Query cache subscription. This caused No client found for session errors.

Changes:
- Add fallback scan of query cache directly in getClient when activeRepos is empty
- Remove excessive debug logging that was spamming console
- Add minimal log only when fallback is actually used
- Fix query key length checks to be more robust

This ensures permission responses work correctly even if the useActiveRepos hook hasn't yet populated the state, by falling back to scanning the query cache directly to find the session and creating the appropriate OpenCodeClient.

* Add directory-based permission requests with global notification and message auto-refresh

---------

Co-authored-by: OpenCode Agent <agent@opencode.ai>
Co-authored-by: Chris Scott <chris@cstech.dev>
2025-12-27 09:21:45 -05:00
OpenCode Agent 548698c65c Hide BranchSwitcher on mobile, move to dropdown menu 2025-12-27 01:18:27 +00:00
Chris Scott 5628c4c7be Fix message editing state and stream detection logic 2025-12-26 18:23:37 -05:00
Chris Scott 4fd658fc7d Add diff expansion controls with ContentDiffViewer and CodePreview components 2025-12-26 18:07:33 -05:00
Chris Scott ae338bb576 Make branch switcher dropdown scrollable on mobile 2025-12-26 16:37:21 -05:00
Chris Scott d701d07a5b Improve UI interactions and responsiveness across components 2025-12-26 16:33:35 -05:00