Commit Graph
158 Commits
Author SHA1 Message Date
Chris Scott 780d31087b Merge remote-tracking branch 'origin/feat/linked-opencode-servers' into feat/remote-server-automation
# Conflicts:
#	backend/src/services/remote-server-events.ts
#	frontend/src/components/navigation/MoreDrawer.test.tsx
#	frontend/src/components/navigation/moreDrawerItems.test.ts
#	frontend/src/lib/opencode-event-stream/openCodeEventStream.ts
#	frontend/src/pages/SessionDetail.tsx
#	frontend/src/pages/__tests__/SessionDetail.remote.test.tsx
2026-10-18 20:53:23 -04:00
Chris Scott 3a7227a602 Merge origin/main into feat/linked-opencode-servers
Keep the schedule reports list added on main and the remote-route gating
for activity, repos, and assistant entries added on this branch.
2026-10-18 20:29:25 -04:00
Chris Scott f566556fd6 feat(servers): harden pairing and run linked-server sessions in the UI
Replace the plaintext pairing exchange with a nonce and HMAC proof plus
AES-256-GCM encrypted credentials, bumping links to v2. Track session
ownership per linked server so activity, session picker, transcript, MCP
and skills views work against remote servers. Share encrypted secret
access, event routing and URL helpers across backend, shared and CLI.
2026-10-18 20:27:34 -04:00
Chris Scott a9bdb8358f feat(servers): run Manager automation on linked servers 2026-10-19 00:06:34 +00:00
Chris Scott 93118b678a feat(navigation): add drag-resizable desktop sidebar 2026-10-18 19:06:19 -04:00
Chris Scott c591c15743 feat(servers): link remote OpenCode servers with QR pairing 2026-10-18 22:35:39 +00:00
Chris Scott 7f5c242fe0 Merge pull request #440 from chriswritescode-dev/feat/execute-tool-card
feat(chat): render execute calls with a dedicated card and show tool images
2026-10-17 22:06:13 -04:00
Chris Scott f67c3e33b2 feat(chat): render Code Mode execute calls with a dedicated card 2026-10-17 20:00:36 -04:00
Chris Scott f5199931d4 fix(git): refresh branch labels after branch changes
Invalidate the repo siblings cache with repo metadata so the session header branch updates after a switch, refresh the repo list git status and worktree siblings on vcs.branch.updated, and refresh repo metadata after continuing or aborting an operation.
2026-10-17 16:11:11 +00:00
Chris Scott f5d073d7ee feat(session): show the workspace branch in the session detail header
Resolve the branch from the repo's siblings so a session running in a worktree shows that worktree's branch, falling back to the repo branch and staying empty when no branch is resolvable. Desktop renders a branch chip in the header; mobile appends it to the repo name in the subtitle.
2026-10-16 17:29:31 -04:00
Chris Scott bfbbbf08ef fix(activity): surface worktree sessions in active work, the sidebar and repo badges
- Resolve sessions in repo worktrees to the owning repo in the activity list; show the worktree branch and open the Workspaces tab
- Look up worktrees only for unmatched sessions in the window or under an active root, and hold the loading state until it settles
- Show schedule-worktree sessions only while running or needing input
- Light repo badges for worktree sessions through one app-wide worktree lookup
- List worktree sessions under the expanded repo in the sidebar
- Subscribe the event stream to active session directories so worktree permissions and forms arrive
- Keep the worktree tab when navigating from the desktop Activity panel
- Remove the braille spinner's always-dim bottom row
2026-10-16 20:36:56 +00:00
Chris Scott 33d9523666 Merge pull request #436 from chriswritescode-dev/feat/activity-switcher
feat(activity): surface active work across the session picker, tool rail and mobile
2026-10-16 12:48:52 -04:00
Chris Scott 84cdffa261 fix(activity): roll subagent activity up to its root and accept only selectable windows
- List child sessions in the activity query and credit each child's latest update
  to its root, so Recent includes roots whose subagents were active inside the
  window; children never become rows, and only roots of in-window children are
  fetched
- Show and sort activity rows by that rolled-up time
- Restrict activityWindowMinutes to the selectable options on write, and coerce a
  stored unknown value to the default on read so it cannot reset every preference
2026-10-16 11:57:52 -04:00
Chris Scott 8b6251d83b fix(activity): animate the braille spinner in SVG and tighten the activity lists
- Draw the TUI braille spinner as a 2x4 SVG dot cell stepped by declarative
  <animate> timelines derived from SPINNER_FRAMES: no JavaScript timer or React
  render per frame, and it keeps animating under prefers-reduced-motion so an
  active session never looks stalled
- Enlarge the spinner cell and dots so it stays legible next to 14px text
- Add a compact ActivityList variant for the mobile More drawer and Repos sheet:
  one flat list capped at five rows, single-line rows, no group subheadings
- Let ActivityList callers own navigation so a row tap navigates once instead of
  pushing a duplicate history entry
- Share the picker keyboard navigation between the session and project tabs and
  reuse the shared session merge helpers in the sidebar repo groups
2026-10-16 11:42:03 -04:00
Chris Scott d8f2fcf29c feat(activity): surface active work across the session picker, tool rail and mobile 2026-10-16 00:54:06 -04:00
Chris Scott 0b637cadf4 feat(walkthrough): build the change walkthrough in a spawned agent session
Replace the fixed, stop-based walkthrough with an agent-built one. Every
request (Generate, Update, Regenerate, /walkthrough, the multi-run button
and the agent's open_walkthrough) now spawns a separate walkthrough
session. That session reads the diff through a new walkthrough_changes
action, writes one self-contained HTML file into a Manager-owned
directory, and calls publish_walkthrough; the panel renders the file in a
sandboxed frame shared with the inline artifact card and the file browser
HTML preview.

Publication marks the walkthrough ready while execution is tracked
separately, so Stop, the 15-minute limit, polling, refine gating and
interruption when the target session is deleted follow the agent instead
of the first publish. One diff copy is reused per run. Regenerate
interrupts the previous session and removes its output directory.

Walkthrough sessions are kept and listed, with their completion and error
push notifications muted. The stop pipeline, its wire schemas and the
concurrency limiter it used are removed.
2026-10-16 03:58:31 +00:00
Chris Scott be874ee07c Merge pull request #434 from chriswritescode-dev/fix/sse-close-on-pagehide
fix(sse): close the event stream on pagehide and reconnect on bfcache restore
2026-10-15 17:10:39 -04:00
Chris Scott 95a9f6e1ed feat(sandbox): add the session sandbox control to the desktop composer
The sandbox toggle and resources dialog were only reachable from the mobile composer menu. Add SessionSandboxMenu next to the permission toggle on desktop and share the sandbox menu items with the mobile menu.
2026-10-15 16:53:49 -04:00
Chris Scott b21fdf5b94 feat(sandbox): per-session sandbox VMs with resource settings and provider arbitration
- Sandbox new root sessions by default with a per-session composer toggle;
  child sessions inherit their root session's mode (OM-82)
- Run each sandboxed root session in its own microVM that mounts only the
  session's repository, with per-session CPU/memory overrides, Settings
  defaults, idle stop, and a cap on running VMs (OM-89)
- Arbitrate shell sandboxing with other plugins (opencode-forge) through the
  shared opencode.sandbox-arbiter.v1 registry so exactly one provider
  sandboxes each call regardless of load order; fail closed on claim errors
- Throw when another plugin rewrites a pinned sandbox shell setting
- Tag sandboxed tool results with the owning provider and show it in the badge
- Hint the agent to start Docker inside the VM only when OCM owns the session
2026-10-15 16:53:49 -04:00
Chris Scott cd2f6d47ea fix(sse): close the event stream on pagehide and reconnect on bfcache restore 2026-10-15 16:38:39 -04:00
Chris Scott 87f28fbc6d Merge remote-tracking branch 'origin/main' into feat/session-picker-projects-tab
# Conflicts:
#	frontend/src/components/settings/KeyboardShortcuts.tsx
2026-10-15 14:20:32 -04:00
Chris Scott a7b961fe30 Merge pull request #431 from chriswritescode-dev/fix/stale-background-activity
fix(session): stop the background activity indicator going stale
2026-10-15 10:54:08 -04:00
Chris Scott 1b2665bd2b fix(background-activity): address review on resync scope and stale subscribe responses
A directory subscribed by the stream but neither registered as a repo nor
remembered as a session directory was reconciled on subscribe but skipped on
resync, so a missed shell exit could leave the indicator stale. Pass the
stream's subscribed directories to onResync and reconcile their pending
actions and running shells alongside the tracked ones.

Subscribe responses that arrive after the connection was replaced or the
directory was unsubscribed could also apply snapshots to state the client no
longer owns. Ignore responses from a superseded connection and report only
directories still subscribed.

The stale-indicator e2e test now waits for the successful unsubscribe response
and asserts the subscribe responses succeeded instead of sleeping.
2026-10-15 10:18:06 -04:00
Chris Scott 37b4ab89f0 fix(background-activity): reconcile shells for directories subscribed by the stream
The background activity indicator went stale for sessions living in a
directory that is not a registered repo. Running shells were only synced
for repo directories derived from the repos query, so session directories
subscribed over the event stream were never reconciled, leaving the
indicator visible after the shell had exited.

Report the directories actually subscribed (mid-connection updates and
pending directories flushed after connect) from the event stream through
onDirectoriesSubscribed, and reconcile running shells and pending
permissions/forms for them in the event context.
2026-10-15 13:00:08 +00:00
Chris Scott c41eff304c fix(shortcuts): share one shortcut label formatter between settings and the session picker 2026-10-14 01:14:55 -04:00
Chris Scott eafa8941cb fix(tts): exclude covered messages and skip auto-play during shortcut playback 2026-10-13 20:49:32 -04:00
Chris Scott 7cb6c07494 feat(tts): play TTS for visible messages with a keyboard shortcut 2026-10-13 19:26:31 -04:00
Chris Scott 59ffe6c586 Merge pull request #420 from chriswritescode-dev/feat/sandboxed-html-artifacts
feat(artifacts): render agent HTML files inline in the session chat
2026-10-13 09:30:59 -04:00
Chris Scott f488b8762d fix(markdown): address inline image review feedback
Keep the leading slash when resolving relative paths against an absolute
markdown file, retry an inline image when its source changes after a load
failure, and render linked markdown images without a nested expand button.
2026-10-13 01:46:51 +00:00
Chris Scott be93975d90 feat(markdown): render inline images in messages and markdown files
Route markdown image nodes through a shared MarkdownImage component that
loads local paths through the raw file API, and allow data:image/* sources
through the sanitizer and URL transform so inline images survive rendering.

Render image attachments as thumbnails in the message thread, and accept
image/webp uploads.
2026-10-13 00:29:00 +00:00
Chris Scott 5e2452172c fix(artifacts): render artifacts from the checked path and serve raw files once
- show_artifact returns the validated path as tool metadata; the chat card
  renders from it and maps repo paths with getWorkspaceFilePath, so local
  repos and moved sessions load the right file
- serve .htm as text/html
- raw file route stats and reads once and adds ETag/Last-Modified with 304
- reuse isPathWithinRoot from utils/fs-safe
- move readShowArtifactCall to frontend/src/lib/artifactTool
2026-10-12 16:43:04 -04:00
Chris Scott c497df5161 fix(walkthrough): address review of agent-opened walkthrough
- Wait for the model catalog once per walkthrough generation instead of before every model call
- Report open_walkthrough as requested, not opened, and drop its unused metadata
- Share the ocm tool and action names through @opencode-manager/shared
- Remove the unused source-request nonce and duplicate session check
- Scan only new messages when auto-opening the walkthrough
- Assert the request action cannot reach the internal change-walkthroughs route
2026-10-09 11:25:26 -04:00
Chris Scott aa1da8d608 feat(walkthrough): open the change walkthrough from an agent tool call 2026-10-09 11:03:21 -04:00
Chris Scott 88b3543dc1 feat(walkthrough): plan-then-explain generation with selectable diff sources 2026-10-08 15:53:49 -04:00
Chris Scott 11c23da67e section 11: Phase 11 — Diff sources: contract and git reader 2026-10-08 15:53:27 -04:00
Chris Scott 2d14972fad fix(sessions): address PR #403 review findings
- fetch picker sessions only while the dialog is open
- list all-projects sessions with one request per page
- block infinite-scroll paging while a search is pending
- memoize picker rows with stable callbacks
- remove deleted sessions from list caches instead of refetching
- keep the repo tab when the open session is deleted
- reuse useSessionSearch in the sidebar session tree
- drop dead activeSessionID/isActive and share delete, session-key and repo-map helpers
- move usePersistentBoolean to its own hook
2026-10-08 14:36:26 -04:00
Chris Scott f13463f82a feat(sessions): type-to-filter and keyboard navigation in the sessions dialog 2026-10-08 14:36:26 -04:00
Chris Scott e89b782fef feat(shortcuts): add favorite model cycle shortcut (Ctrl+R) 2026-10-08 14:26:41 -04:00
Chris Scott 994a8b82e8 feat(shortcuts): rework shortcut bindings, focus restore, and input guards
Resolve effective bindings from stored prefs plus defaults with leader/direct collision handling and default leader Ctrl+X; let direct actions pass through in terminals and suppress abort while an overlay is open. Add half-page scroll disengage, verified overlay focus restore, and consolidate prompt reset.
2026-10-08 12:40:04 -04:00
Chris Scott 7e8443f54f feat(shortcuts): add half-page message scroll shortcuts 2026-10-08 11:50:37 -04:00
Chris Scott b06de60f6b feat(ui): app-wide keyboard shortcuts with TUI keybind import 2026-10-08 10:47:52 -04:00
Chris Scott 09630a7794 feat(walkthrough): dock change walkthrough in the desktop tool panel
Share walkthrough state through a context provider so navigation and regenerate controls render in the panel chrome, generate walkthroughs with the session's selected model, and dedupe a favorite that is also the default model in model sections.
2026-10-08 00:57:29 -04:00
Chris Scott 855b78297e feat(composer): unify prompt suggestions with fuzzy matching and a mobile keybar 2026-10-07 18:04:08 -04:00
Chris Scott 02d2e89bca feat(chat): group exploration tool calls
Collapse consecutive read, search and fetch tool calls in the chat transcript into one expandable summary line, matching the OpenCode TUI. Adds a groupToolCalls preference (default on) with a Settings toggle.
2026-10-07 16:40:38 -04:00
Chris Scott 65b72e55ae refactor: unify model selection with the TUI
Align the manager's model selection with the OpenCode TUI: one
model.json-backed preference store, one provider catalog, one ordering
and default-ownership rule, and one set of availability, ref-formatting
and variant helpers shared across chat, schedules, agents and the goal
auditor.

- Add a shared TUI-compatible model-preference module and make the
  backend model.json store match its format.
- Consolidate the frontend provider catalog, availability check, model
  ref formatter and variant persistence into single owners.
- Drive chat, schedule, agent and goal-auditor model lists from a shared
  useModelSections hook and buildModelSections, following TUI ordering.
- Extract a shared ModelCombobox with a taller list, and list models the
  TUI way in ModelQuickSelect.
- Add a shared isRecord util and model-selection comparison helpers.
2026-10-06 20:44:27 -04:00
Chris Scott 3d143568c1 fix: sanitize rendered markdown HTML
Add a shared rehype pipeline (rehype-raw -> rehype-sanitize -> rehype-highlight) to every markdown renderer so scripts, frames and event handlers are stripped from model output and repository files while safe HTML and highlighting survive.

Also delete change walkthroughs when their session is deleted (including in-flight generation), build schedule model options from default/favorite/recent state, and include 127.0.0.1 origins in the default trusted origins.
2026-10-06 19:27:49 -04:00
Chris Scott b36d412ca2 feat: add multi-run fusion and session change walkthroughs
Fuse two to five completed multi-run entries into one synthesized session,
and explain a session's diff as ordered walkthrough stops cached by diff hash.

- Multi-run fusion service, persistence, routes and FuseRunDialog
- Change walkthrough service, persistence, routes and ChangesWalkthroughDialog
- Shared unified-diff parser plus bounded text generation, json-extract,
  text-truncate and service-error helpers
2026-10-06 15:27:14 -04:00
Chris Scott 26ff08d891 feat(schedules): require worktrees and choose commit or discard on removal
Drop the repo workspace mode so every scheduled run executes in a
worktree. Clearing run history or deleting a run now asks whether to
commit pending changes and keep the run branches, or force-remove the
worktrees and delete the branches.

Sibling repo listings carry the schedule name, and the repo detail
workspace view subscribes to schedule worktree sessions only while
expanded. Also unify schedule worktree path/branch helpers, refuse a run
branch already checked out elsewhere, and clean up terminals when a
worktree is removed.
2026-10-06 11:02:29 -04:00
Chris Scott 33be4afeb7 test(frontend): read theme source files with ?raw imports instead of node builtins 2026-10-05 17:15:21 +00:00
Chris Scott 62e36eb3b2 feat(ui): preview port menu, terminal auto-start, and project actions tabs 2026-10-04 01:34:57 -04:00