* feat(files): add fullscreen preview with a minimal close control
Add a fullscreen toggle to the desktop file preview header. Fullscreen fills the viewport, hides the header, and shows only a small on-top X to exit.
Keep the mobile preview fullscreen by default with its close button layered above the content, and give the headerless mobile preview the same small on-top X.
* fix(files): open relative markdown links and preinstall Chromium
Resolve relative and absolute markdown links against the previewed file
and open them in the file browser; external links open in a new tab.
Install Playwright and Chromium into the Manager image with NODE_PATH
and PLAYWRIGHT_BROWSERS_PATH so agents can run browser automation
without a project-local install.
* refactor(files): share markdown link handling across renderers
* test(docker): cover the preinstalled playwright chromium step
* fix: stabilize scheduled runs and background task tracking
* fix: complete scheduled runs and harden background task status
- Route directory-less OpenCode session events (session.execution.*,
session.usage.updated) to backend listeners by remembering each
session's directory in the SSE aggregator, so scheduled runs finish
and failure push notifications fire; browser delivery is unchanged.
- Resolve background shell status from the transcript completion notice
when OpenCode no longer lists the shell, keep the first terminal
status so a kill is not reported as completed, and share one status
icon and colour mapping between the transcript and background bar.
- Reconcile child sessions only while unknown or running, trigger it
from the EventProvider alone, refresh children that drop to unknown
after a poll, and forget deleted sessions.
- Fetch the model list and default concurrently while waiting for the
schedule model, share configured-model selection, and consolidate
schedule startup cancellation cleanup.
- Reduce background work re-renders, prune shell exit records, remove
dead exports, and document background work in the chat guide.
* fix: hide finished background tasks and clip long dialog titles
* fix(files): resolve workspace paths and add sandboxed HTML preview
Accept workspace-absolute paths in the file service and return repo-relative paths for file reads and directory listings. Serve raw content under a CSP sandbox and preview HTML files in a sandboxed iframe with a raw toggle.
Resolve file-click paths from the session directory and repo local path, detect absolute and html/htm file references while ignoring URLs, accept the legacy filePath input key and filediff metadata, fix the file browser navigating into an initially selected directory, and use focus-visible rings across shared UI primitives.
* fix(files): address review feedback on navigation and path fallback
Key initial directory navigation to the initial selection so viewport changes do not reset it, and open the mobile preview from a separate effect.
Fall back to the legacy filePath input when path is empty, and cover both with regression tests.
- Vendor the 36 OpenCode theme palettes into the shared package, synced
from the pinned OpenCode release tag via pnpm themes:sync.
- Add a colorTheme user preference across the settings schema, defaults,
and the assistant internal API.
- Extend palettes with success, warning, info, and diff colors, and add a
resolver that maps palettes to CSS tokens and applies them to the DOM.
- Apply the theme app-wide through a ThemeProvider context, adopting the
tokens in message, repo, session, and settings components, agent
colors, git status styles, and diff viewers.
- Add a theme picker to General settings and make model quick-select
follow the active theme (fixes#355).
* feat(sidebar): add repo-grouped session navigation with live status
- Add a searchable, collapsible session tree to the desktop sidebar, grouped by repository with pinned and time-bucketed ordering.
- Track per-session busy, retry, and compact status in a shared store fed by the SSE event stream and scoped by directory.
- Extract shared navigation components reused by the desktop tree and the mobile repo quick-switch sheet.
- Show a Git tab and hide Schedules inside a repo on the mobile tab bar; add Repos and Assistant entries to the session More drawer.
- Replace the CommitsTab local relative-time formatter with a shared formatShortRelativeTime util.
* refactor(sidebar): unify session status tracking and navigation helpers
* feat(sidebar): add collapsible sessions and menu sections
* fix(sessions): keep specific live status over snapshot busy
* feat(opencode): migrate OpenCode Manager to OpenCode 2
Port the backend lifecycle, generated plugins, event aggregation,
schedules, worktrees, provider credentials, MCP, config handling, the
frontend chat model, and the ocm CLI to OpenCode 2.
Adopt @opencode/client 2.0.15 as the single typed V2 API contract,
require OpenCode 2.0.0 or newer (pinned 2.0.15), and delete every
V1-only code path.
* refactor(opencode): reload config in place and drop v1 compatibility shims
Route config/skill/AGENTS.md changes through the OpenCode location reload
API instead of a full server restart, stop auto-resuming interrupted
sessions, remove the restart coordinator and v1 MCP/version shims, and pin
support to OpenCode >=2.0.15 <3.0.0. Adds integration-ready retries,
service-mode launch, ocm-cli repo proxy, and new frontend form/MCP helpers.
* refactor(opencode): consolidate v2 migration helpers and harden install, proxy, and session flows
- extract shared semver and model-ref utilities, reuse across version checks
- share the OpenCode release download script across Docker, entrypoint, dev setup
- unify install/upgrade failure recovery and guard externally managed OPENCODE_BIN
- scope the repo proxy location rewrite and surface ocm proxy errors
- rework frontend session projection, permission lookup, and cache invalidation
* fix(schedules): reject unavailable agents before creating a session
* feat(opencode): add ocm install, schedule agent fallback, and session move guards
* feat(config): support layered OpenCode config sources with revision-guarded saves
* refactor(config): harden multi-source OpenCode config handling
- extract shared config-source helpers and default source name
- reject shadowed removals with 409 and require sources/revision
- restart the server on reload with session resume
- mirror multiple host config files on import and warn on removals
- skip restart for mcp-only saves
- drop removedFields and CONFIG_PATCH_TIMEOUT_MS
* fix(config): return null when archiving broken OpenCode config fails
Bare `node_modules` matched the context root only, so `COPY shared ./shared`
overlaid the host's stale `shared/node_modules` onto the deps-stage install.
Once the lockfile moved ahead of the host tree the pnpm symlink dangled and
`pnpm --filter frontend build` could not resolve `@opencode-ai/sdk/v2/types`.
Anchor the pattern with `**/` and apply the same correction to `.env`,
`.env.local`, `dist`, `coverage` and `workspace`, which shared the root-only
match and were copying `backend/coverage` into the image. `frontend/dist` and
`backend/dist` become redundant under `**/dist`.
Also exclude `.pnpm-store`, which was sending 598MB of context to the daemon
on every build.
* build(docker): bake chromium runtime libs and refresh pinned tools
Install the Chromium runtime libraries in the runner image from Playwright's
own resolver instead of a hand-maintained package list, so a Playwright e2e
suite runs in the Manager container without root or sudo. PLAYWRIGHT_VERSION
is shared with the sandbox guest image and the docker-build workflow.
Refresh the remaining pins: node 24.21.0, pnpm 10.28.1, OpenCode 1.18.31,
microsandbox 0.7.2 and @opencode-ai/sdk 1.18.31. CI moves to Node 24 to match
the image and the documented requirement.
uv stays at 0.12.7. The runner previously fetched the unversioned installer
URL, so UV_VERSION and the workflow build argument had no effect; it now
installs from the versioned URL and asserts the installed version, and the
workflow pins the release instead of resolving the newest tag. The pin cannot
move past 0.12.7 yet because 0.12.8 and later segfault under qemu-user x86_64
emulation, which is how an arm64 host builds the amd64 platform.
* chore(docker): bump the sandbox image digest to the 1.63 build
The guest image was rebuilt and republished for Playwright 1.63.0, uv 0.12.7
and pnpm 10.28.1. Moving the digest is what makes deployments adopt it:
attestation compares the reference string, so a rebuilt image behind the old
digest would never be pulled or recreated.
* build(sandbox): align toolchain pins and verify on native runners
* feat(sandbox): run Docker with persistent guest storage
* chore(docker): pin the Docker-enabled sandbox image
* fix(schedules): fall back to the config default model when an override is gone
* fix(schedules): never fall back to the configured small model
* fix(schedules): distinguish unknown availability and match configured models by key and id
- Drop the redundant slash prefix from command and uploaded file names
- Move the row primary action into the overflow menu below sm in OpenCode settings
- Align titles, badges, switches, and row controls on the first line
- Replace bordered cards with compact flat rows and maintenance sections
- Add shared SettingsDisclosure for config, maintenance, and sandbox sections
- Auto-scroll expanded sections into view when outside the scrollport
- Make agent file editor and agent form full-height and keyboard-aware on mobile
* refactor(config): make on-disk opencode.json the single source of truth
Make <workspace>/.config/opencode/opencode.json the only store for the active OpenCode configuration. One owner (opencode-config-file.ts) reads, validates, writes, archives, and seeds the file; one owner (opencode-config-apply.ts) decides how an edit is applied: restart pending, or a live patch with recovery. Settings routes, the internal assistant API, the health-watch supervisor, boot, and host import all go through them, so an edit that lands on the file without going through the database is visible immediately instead of at the next Manager boot.
Remove the named-config profiles. Migration 019 archives every opencode_configs row to .config/opencode-configs-archive/<name>.json, restores the default row to opencode.json when no file exists, then drops the table, its indexes, and repos.opencode_config_name. The /opencode-configs* and config/switch routes and the CreateConfigDialog/SwitchConfigDialog dialogs are gone, and the ocm tool gains GET/PUT /opencode-config backed by the same apply owner.
Harden the write path: serialize and atomically write config updates while preserving the file mode, keep withFileLock usable after a rejection, route reloadConfig's cleaned-config write through the file owner, stop boot from rewriting an existing valid config when importing state, prune the health-watch directory to its newest 20 entries, resolve archive paths with realpath, and share one frontend config query across dialogs.
* fix(mirror): canonicalize worktree paths before branch ownership check
* refactor(config): unify opencode config apply and rollback paths
- share one config route factory between public and internal mounts
- capture last-known-good before every config write and restore via one helper
- stop auto-restarting on save; flag restart-required fields and live-patch the rest
- add CONFIG_PATCH_TIMEOUT_MS for config patch requests
- extract canonicalPath helpers, health-watch artifact writer, and useProvidersWithModels hook
* refactor(model-state): use OpenCode state file as model state source of truth
Load additional session pages when child filtering leaves the viewport underfilled. Preserve directory and workspace identity, stop automatic pagination after next-page errors, and provide explicit retry with regression coverage.
Fixes#350
corepack prepare runs as root and leaves COREPACK_HOME/v1 and
lastKnownGood.json root-owned under the sticky dir, so a project
packageManager pin failed with 'Failed to create cache directory' for
the exec uid; open up the whole corepack tree after prewarming and
verify a pinned download as an unknown uid. Pin uv (0.12.9 segfaults
under qemu-user amd64 emulation) and bump the guest image digest.
The service worker broadcast every notification click on a BroadcastChannel,
so every open tab navigated, and it focused the first client regardless of
what it showed. It now picks the tab already on the target path, then the
focused tab, then any visible tab, and posts NOTIFICATION_CLICK to that
client only; the page subscribes through onNotificationClick.
Notifications from OpenCode workspace and forge loop worktrees fell back to
/ because the directory is not a repos row; the service now resolves the
parent repo through the shared OpenCode project id. Assistant sessions get
the assistant=1 parameter the Assistant view requires.
Payload puts the action in the title and the repo in the body, carries a
timestamp and renotify, uses the 512px icon and a monochrome 96px badge,
and the service worker types it with the shared schema, which gains
priority, timestamp, and renotify.
The Manager sets XDG_DATA_HOME to <workspace>/.opencode/state, so OpenCode
workspace worktrees land at <data>/worktree and opencode-forge loop
worktrees at <data>/forge/worktrees. Neither was a project root, so an
enforced session in a forge worktree was refused with "working directory
is outside the sandboxed project roots". Both directories are now mounted
and accepted as working directories; their parents (auth.json, forge.db)
stay outside the guest.
* feat(ocm-move): plan worktree mirror targets and stream move progress
- Plan/ensure mirror targets per branch via new internal endpoints, creating a worktree repo when the target branch is not checked out in the source repo
- Skip branches checked out in other worktrees during bundle import and reset/clean before checkout on both server and CLI
- Rewrite workspace paths in message.updated events when replaying moved sessions
- Stream live move progress (bundle, upload, import, patch, replay) in the TUI
- Prefer branch-matched repos when moving sessions and share push-divergence descriptions
* chore(ocm-cli): bump version to 0.2.7
* fix(ocm): harden worktree mirror synchronization
* fix(ocm): protect active branch during branchless pull
- Point the OpenCode child TMPDIR at the workspace tmp home and clear the mounted agent tmp directory on spawn
- Expand sandbox bind mounts to tool-output, global skills, and agent tmp while keeping only project roots as working directories
- Ship the python alias and network diagnostics in the guest image, verify them at build time, and pin the rebuilt image digest
pnpm 11 no longer reads npm_config_* env vars, so the guest image pins the
store to a container-internal path through PNPM_CONFIG_STORE_DIR; unpinned,
pnpm places the store on the bind-mounted project filesystem, polluting the
repository. Adds a regression test and bumps the ocm-sandbox digest to the
rebuilt image.
* fix(sandbox): wait for the guest agent before provisioning the exec user
A freshly created microVM does not accept msb exec until its guest agent is
up, so provisioning raced the boot and died on three 15s timeouts, which then
failed the whole enforcement-enable path. Gate provisioning on msb ping
bounded by SANDBOX_START_TIMEOUT_MS, give the exec a 30s budget, and downgrade
a provisioning failure to a warning so a missing sudo entry never blocks
sandboxed commands.
* fix(sandbox): align canonical shell spec with msb and pin the rebuilt guest image
- pass --shell /bin/sh explicitly at create and derive the canonical
spec from the create args so msb 0.6.15 recordings match attestation
- bump the SANDBOX_IMAGE pin to the rebuilt guest image digest
- verify the provisioned exec user inside the guest and give the
provisioning exec the full start timeout, bounded by a deadline
* docs(sandbox): sync the image digest pin into the docker and environment docs
* fix(sandbox): verify the guest image as an unknown uid and pin the rebuild
The build verification ran as uid 1000, which is the base image's node user,
so it exercised the known-user path and would have passed even if the numeric
exec uid the runtime actually uses were broken. Verify the toolchain as uid
4242 instead and keep the sudo check on the known user, since sudo refuses
unknown uids by design. Also only write the shadow entry when the passwd entry
is created, so a uid that already exists leaves no orphan record.
* fix(sandbox): close spawned command stdin so msb exec completes
msb exec reads its stdin during session setup and waits for EOF, so
every child spawned through executeCommand with an open stdin pipe hung
until its timeout while identical CLI execs finished instantly. Spawn
children with stdin ignored.
Also verify the provisioned exec user from a fresh guest exec after
each provisioning attempt and move failed provisioning to a logged
background retry bounded by five attempts so a slow guest no longer
blocks enforcement or leaves sudo silently missing.
* test(sandbox): derive expected inspect spec from canonical builders
* fix(sandbox): cancel provisioning retries on stop and serialize attempts
Advance the provisioning retry generation and drop the pending retry at the
start of every managed-sandbox stop, so a retry scheduled before a toggle-off
no longer pings and provisions a stopped sandbox. Clearing the promise as well
keeps later retries schedulable, since the generation guard would otherwise
strand it and short-circuit scheduling.
Route every provisioning caller through a single in-flight promise so the
boot-path attempt and the background retry cannot run the check-then-append
passwd and shadow script concurrently and append duplicate account entries.
msb caches images by reference and pull without --force never contacts the
registry, while attestation compares the reference string. A floating tag
therefore keeps a stale guest image forever and still passes attestation.
Pinning the default to the published index digest makes IfMissing pull the
new image and forces the running microVM to be recreated on deploy.
Startup and the enforcement toggle now run the same ensureWorkspaceSandbox
path a command triggers, so the image pull, microVM boot, attestation and
exec-user provisioning are done before the first command instead of on it.
One microVM serves every repo and schedule worktree.
Pull the configured guest image in the background when the Manager boots and
when sandbox enforcement is switched on, so a sandboxed command no longer
pays the multi-gigabyte download. msb pull is a no-op once cached, startup is
never blocked by it, and a command racing the pull joins the same in-flight
boot.
Set a writable guest HOME and shared COREPACK_HOME, expose bunx, redirect
npm/pnpm global installs to a PATH dir, lift Debian's externally-managed
pip guard, and verify the toolchain as an unprivileged uid at build time.
Provision passwd/group/shadow entries for the numeric exec uid at sandbox
create, start, and Manager boot so passwordless sudo works in the guest.