Commit Graph
750 Commits
Author SHA1 Message Date
Chris Scott 7c7e9f3c77 fix(cors): reflect origin for WebView routes using Bearer auth
Routes prefixed with /api/opencode-proxy/ and /api/internal/ authenticate
via Bearer/CF-Access headers rather than cookies. These routes are now
allowed to reflect any origin in the CORS response since they don't rely
on cookie-based trust.

Also added CF-Access-Client-Id and CF-Access-Client-Secret to the allowed
headers list.
2026-07-14 09:33:47 -04:00
Chris Scott 5d9a159c07 Add domain to README 2026-07-13 00:15:09 -04:00
Chris Scott 195182e3ae fix(schedules): use array-based permission ruleset format for OpenCode v1.16+ (#309)
Refactor SchedulePermissionRuleset from object-based to array-based format.
Updates schema, builder, and tests to match OpenCode v1.16+ expectations.
2026-07-09 20:43:50 -04:00
Chris Scott 009abaf53a chore(ocm-cli): bump package version to 0.2.2 2026-07-08 17:45:28 -04:00
Chris Scott bf54f6e7c8 fix(ocm-cli): include plugin installer in package 2026-07-08 17:44:24 -04:00
Chris Scott 61efcf9ad1 feat(ocm-cli): add session move with local history export and TUI plugin (#304)
* loop: ocm-session-move completed after 7 iterations

* feat(ocm-cli): add session move with local history export and TUI plugin

* docs(ocm-cli): update plugin config to tui-only entry and clarify session history source

* fix(ocm-cli): replace raw postinstall output with TUI toast notification
2026-07-08 17:23:53 -04:00
冯基魁andChris Scott 54323267f5 fix(mirror): reject empty commit uploads (#303)
* fix(mirror): reject empty commit uploads

* refactor(mirror): unify totalParts validation into shared predicate

Consolidate the duplicated positive-integer check and error message into
isValidTotalParts/TOTAL_PARTS_INVALID_MESSAGE, reused by the commit route
and extractPartsToStaging. Validate totalParts before the session lookup to
match the parts route, and update the delete-session test to use a valid
totalParts so it unambiguously covers the 404 path.

---------

Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
2026-07-06 12:55:05 -04:00
Chris Scott 256078341b docs: recapture schedule flow screenshots (creation/timing/run-history) at 2x for legibility 2026-06-30 21:05:33 -04:00
Chris Scott 825d516998 docs: recapture feature screenshots at 2x for legibility, enlarge home hero, render screenshots full-width 2026-06-30 20:59:10 -04:00
Chris Scott 4237beaab3 fix(docs): render screenshots at full content width instead of 600px cap 2026-06-30 20:22:10 -04:00
Chris Scott 8b76fe9b20 chore: bump version to 0.14.6 v0.14.6 2026-06-30 19:59:20 -04:00
Chris Scott 83ed7f81b0 docs: add documentation and screenshots for session pins, server health, and schedule features, fix migration-runner version mismatch detection 2026-06-30 19:59:06 -04:00
Chris Scott 446d425e2e chore: clean up test suite per audit recommendations (#299)
Executes recommendations from a comprehensive test suite audit.
Removes dead, redundant, and trivial tests; rewrites SessionDetail
polling test to exercise real gating; trims duplicated assertions;
adds missing assertion in assistant-loading tests.

13 files changed, 233 insertions(+), 462 deletions(-)
2026-06-30 19:24:53 -04:00
Chris Scott a9b6f7ce46 feat: add session pinning for pinned/recent session groups (#301)
* feat: add session pinning for pinned/recent session groups

* refactor: extract buildSessionKey, deduplicate SessionCard rendering, clean up pins on delete
2026-06-30 19:22:26 -04:00
Chris Scott 217f5bd989 feat: add server restart coordination and health status tracking (#300)
* feat: add server restart coordination and health status tracking

* refactor: consolidate server restart logic, extract hooks, remove dead code
2026-06-30 18:20:54 -04:00
Chris Scott 68cd6b5a0b feat: add schedule permission config and workspace tracking (#297)
* feat: add schedule permission config and workspace tracking

Adds permission configuration for scheduled jobs (migration 016) and
workspace ID tracking on schedule runs (migration 017). Includes
service logic, UI controls, schema updates, and full test coverage.

* refactor: convert permission ruleset to object format, exclude active schedule worktrees from sibling repos

* refine: reduce destructive bash patterns to host-level commands only
2026-06-30 12:03:35 -04:00
Chris Scott 9425921200 chore: bump version to 0.14.5 v0.14.5 2026-06-29 11:27:49 -04:00
Chris Scott 59258625c0 feat: add schedule worktree isolation for running jobs in isolated worktrees (#295)
* feat: add schedule worktree isolation for running jobs in isolated worktrees

* feat: schedule worktree isolation for running jobs in isolated worktrees

* feat: show worktree/branch artifact counts in clear history confirmation

* feat: validate and select base branches for schedule worktrees
2026-06-29 11:15:39 -04:00
Chris Scott 6c13d78563 fix: reconcile confirmed prompt on message fetch to clear stale send errors (#296)
* fix: reconcile confirmed prompt on message fetch to clear stale send errors

* refactor: extract reconcileConfirmedPrompt into dedicated module
2026-06-28 20:28:34 -04:00
Chris Scott 07140870c3 fix: add mobile bottom padding to prompts tab and show edit/delete buttons on touch (#293) 2026-06-28 15:11:52 -04:00
Chris Scott 29a1e8f808 refactor: simplify RenameRepoDialog styling and remove unused props 2026-06-28 15:07:42 -04:00
Chris Scott 6a4e8734f9 feat: add repo rename capability with custom name field (#294)
* feat: add repo rename capability with custom name field

Add a custom name field to repos, allowing users to set a display name
independent of the repo URL or path. Includes a migration, PATCH endpoint,
rename dialog, and display name consolidation.

- DB migration 014 adds name column to repos table
- PATCH /api/repos/:id endpoint with Zod validation
- RenameRepoDialog component with clear/reset support
- RepoRowActions gains Rename action in both dropdown and inline modes
- getRepoDisplayName() consolidated to accept a repo object and prefer name
- All repo name display call sites updated to use the new API

* fix: add DialogTitle to RenameRepoDialog for a11y compliance

* refactor: extract getRepoDisplayName to shared utils, fix schedule cache invalidation on rename
2026-06-28 14:49:00 -04:00
Chris Scott 01e50a7019 feat: add bundle-based OCM mirror sync (#289)
* feat: add bundle-based OCM mirror sync

* feat: add OpenCode model editor and HEAD-safe bundle import

* fix: consolidate discovery-cache, batch bundle refs, remove dead code (#290)

* fix: consolidate discovery-cache, batch bundle refs, remove dead code

* refactor: consolidate discovery cache into generic discoverCached, extract spawnGit helper

* feat: extract project-id-resolver, add CLI full-fallback prompt, wire lint into root scripts

- Extract shared project-id-resolver for origin URL matching (replaces local-repo duplicates)
- Add promptYesNo / confirmFullFallback to ocm CLI before slow full mirror
- Backend: consolidate opencode-workspaces routes with project-id-resolver
- Frontend: fix schedules prompt/global page navigation
- CLI: add eslint config, lint/lint:fix scripts, fix no-fallthrough in ocm.ts
- Root: wire CLI into build, test, typecheck, lint, lint:fix chains
- Fix test lint issues (_code, const, require→import)

* fix: replace polynomial regex with linear-time string ops in gitRemoteParts

* feat: add divergence guards for push/pull, streaming bundle upload, server-side ancestry check

- Backend: GET /:repoId/mirror/head (head+branch+dirty) and GET /:repoId/mirror/contains/:sha (ancestry check)
- CLI: checkPushDivergence warns before overwriting server commits; checkPullDivergence warns before discarding local commits; both require confirm or --force
- Bundle upload now streams from disk instead of buffering entire file in memory
- Version visible in --help and default (no-arg) output
- Version bump 0.1.5 → 0.2.0

* fix: show connecting message before fetching repos in default command

* fix: update default command messages to reflect actual matching behavior
2026-06-28 11:57:38 -04:00
Chris Scott bb1df259b6 fix: filter source control commits by branch (#286) 2026-06-27 09:36:03 -04:00
Chris Scott 8d93f2f1f9 fix: follow up prompt preservation changes (#292)
* fix: remove unused disabled prop, throttle SW update checks, precache icon

* fix: retract transient send error and restored prompt once server confirms send

When a long-running prompt request drops (gateway timeout or network error)
while the agent is actually working, the send error banner and the restored
prompt text were left in place. Tag send errors as 'network' and clear them
when the server confirms session activity (message.updated / session.idle),
also clearing the restored input text. Genuine server-reported session errors
(kind 'session') are preserved.

* style: restyle ErrorBanner with neutral card fill and destructive accent bar

Replace the all-red destructive Alert variant (transparent background, full
red text) with a neutral card-filled banner, a left destructive accent bar,
red icon, foreground title, and muted body/detail text. Improves the send-error
and git-error banners on the dark theme.
2026-06-27 09:26:37 -04:00
Chris Scott 71ba7371bc fix: allow saving edited PAT credential when reusing existing token 2026-06-21 09:25:48 -04:00
Chris Scott 55af93062a refactor: extract CredentialProvider service and consolidate git-auth utilities (#283)
* refactor: extract CredentialProvider service and consolidate git-auth utilities

* refactor: add git-credentials route and gh env plugin, pass internal token to OpenCode

* refactor: update credential provider integration and git route

* refactor: integrate credential provider across git auth, routes, and IPC
2026-06-20 21:52:18 -04:00
Chris Scott 5b85abd627 refactor: remove assistant auto-launch and simplify redirect flow (#282) 2026-06-20 12:28:32 -04:00
Chris Scott 634dcd9af9 chore: bump version to 0.14.1 v0.14.1 2026-06-20 00:42:20 -04:00
Chris Scott 617962f2dd feat: directory files upload system, deferred restart model, cache invalidation consolidation, and misc improvements (#281)
* feat: show variant label on model picker and add folder upload for agents/commands

- Replace three-dot variant menu trigger with selected variant label
- Add POST /api/settings/opencode-directory-files/install endpoint
- Upload agents/commands markdown folders into .config/opencode/{agents,commands}/
- Reload OpenCode server after upload so files are picked up

* fix: revalidate branch/git caches when mobile sheet opens and on vcs.branch.updated SSE

- add shared invalidateRepoGitCaches() helper for consistent invalidation
- revalidate repo list when mobile repo quick-switch sheet opens
- revalidate current repo when mobile More drawer opens
- revalidate repo/git caches when Source Control dialog opens
- handle vcs.branch.updated SSE event with optimistic cache update
- use helper in branch create/switch mutations in useGit and BranchesTab

* style: make variant selector look more like a button with chevron and compact sizing

* refactor: consolidate settings editors, add folder upload support, and clean up unused code

* refactor: consolidate settings editors, add folder upload support, and clean up unused code

* feat: add opencode-directory-files listing service and consolidate settings editors

* fix: distinguish scroll from tap in suggestion popups on touch devices

* refactor: consolidate settings editors and add DirectoryFilesList component

* refactor: target repo status cache updates only to affected batch entries

* refactor: streamline settings, git hooks, and query invalidation logic
2026-06-20 00:40:36 -04:00
Chris Scott e53b4fd32c chore: add workflow_dispatch to Docker build workflow 2026-06-18 10:53:08 -04:00
Chris Scott af1013a255 fix: strip v prefix from opencode version in Docker workflow 2026-06-18 10:52:58 -04:00
Chris Scott 288302775f chore: bump version to 0.14.0 v0.14.0 2026-06-18 10:47:19 -04:00
Chris Scott d268182610 refactor: extract SettingsList component and unify settings editor layouts (#280) 2026-06-18 10:44:52 -04:00
Chris Scott 6e80cdfb8c feat: add skill installer (#279)
* feat: add skill installer with install/uninstall and settings UI

* feat: refactor skill installer with extracted SkillLibraryList component

* feat: simplify SkillsEditor, extract SkillLibraryList

* feat: refactor skill installer components and add github utility
2026-06-17 23:11:29 -04:00
Chris Scott 24d34f28a3 Revert "feat: add skill installer with install/uninstall and settings UI (#277)" (#278)
This reverts commit 9cb2bb156b.
2026-06-17 23:09:34 -04:00
Chris Scott 9cb2bb156b feat: add skill installer with install/uninstall and settings UI (#277)
* feat: add skill installer with install/uninstall and settings UI

* feat: refactor skill installer with extracted SkillLibraryList component

* feat: simplify SkillsEditor, extract SkillLibraryList
2026-06-17 22:52:05 -04:00
Chris Scott 3e617c2df8 fix: preserve prompt text on network error and allow offline typing (#276)
* fix: preserve prompt text on network error and allow offline typing

* fix: preserve prompt on network error, swallow 524 to avoid duplicate sends

* feat: add service worker precaching with app shell and runtime cache strategies

* fix: copy frontend/plugins into Docker build context

* fix: improve service worker update checks with visibility and focus handlers

* fix: add connect timeout to event stream to recover from failed connections

* fix: remove optimistic message insert, keep prompt in input until server confirms
2026-06-17 17:28:59 -04:00
Chris Scott a7d0c13f9a fix: avoid auto-applying OpenCode config on dropdown selection (#275) 2026-06-15 18:58:50 -04:00
Chris Scott 0b1d3b175e fix: avoid GitHub API lookup during Docker opencode install (#274) 2026-06-13 17:12:34 -04:00
Chris Scott cb7c707593 chore: bump version to 0.13.1 v0.13.1 2026-06-10 08:36:38 -04:00
Chris Scott 4e32fd5b00 feat: add session status store with optimistic active state and SSE polling (#272)
* feat: add session status store with optimistic active state and SSE polling

- Adds sessionStatusStore with setOptimisticActive (auto-timeout), statusCache deduplication, and replaceStatuses/clearStatus

- Integrates store in useSendPrompt (set optimistic on send, clear on error)

- Adds session.status SSE event handling in useSSE with 5s polling fallback

- Refactors test to mock the store instead of using real store instance

- Fixes repoId null check in useRepoActivity

* feat: replace event-source-polyfill with native SSE for PromptInput

* fix: keep stop button visible and hide clear prompt button during active session

* feat: restore failed queued prompts and preserve optimistic active status during poll

* test: add MessageThread tests for optimistic editing state and resend flow

* fix: handle queued prompt edge cases during pending submission and SSE errors
2026-06-10 08:35:19 -04:00
Chris Scott 931f1215e6 chore: bump version to 0.13.0 v0.13.0 2026-06-09 14:59:08 -04:00
Chris Scott a0c97c9f41 fix: prevent deletion of assistant repo in deleteRepo 2026-06-09 14:56:54 -04:00
Chris Scott 8133b655b0 refactor: persist assistant repo in database with ID migration (#271) 2026-06-09 14:46:39 -04:00
Chris Scott 0d384d6cf0 refactor: move assistant workspace install before OpenCode server start (#263)
* refactor: move assistant workspace install before OpenCode server start

* refactor: skip assistant-mode status fetch on open, use repo fullPath and cached session
2026-06-07 13:35:19 -04:00
Chris Scott 0d14e754e1 refactor: extract shared useUrlParams hook and use push navigation for dialogs (#266)
* refactor: extract shared useUrlParams hook and use push navigation for dialogs

* Remove schedule badges and fix dialog safe area padding

* fix: deduplicate server health toasts with stable IDs

* fix: restore Enabled/Paused status badges on schedule jobs

* refactor: consolidate url state hooks and add shared test utilities
2026-06-07 13:02:56 -04:00
Chris Scott ec7a47dc10 feat: replay session statuses on upstream reconnect and add compact type (#268) 2026-06-06 23:02:48 -04:00
Chris Scott 95ae584f6a feat: interactive task list checkboxes in markdown preview (#267)
* feat: interactive task list checkboxes in markdown preview

* fix: persist markdown checkbox toggles

* fix: sync optimistic markdown checkbox state

* fix: align markdown checkbox preview state

* fix: prevent "0" rendering in file browser header when repoId is 0
2026-06-06 22:11:49 -04:00
Chris Scott ac3cfc32f9 fix: allow editing in config editor without clearing search first (#265) 2026-06-06 18:16:13 -04:00