Resolve conflicts against the restart-coordinator rewrite and renumber
the manager-upgrade-jobs migration from 16 to 19 to avoid colliding
with main's 016-018 migrations. Includes review fixes: background the
docker pull, add a staleness guard for stuck recreating jobs, move
manager-upgrade types to @opencode-manager/shared, wire the
active-session pre-check dialog into the Upgrade Manager button, and
surface upgrade errors via FetchError-aware messaging.
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(-)
* 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
* 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
* 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
* 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.
* 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
* 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
* 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
* refactor: move assistant workspace install before OpenCode server start
* refactor: skip assistant-mode status fetch on open, use repo fullPath and cached session
* 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
* fix(parts-batcher): defer operations when target message is missing from cache
* fix(parts-batcher): add TTL for deferred operations to prevent repeated invalidations