Commit Graph
628 Commits
Author SHA1 Message Date
Chris Scott cbe92c92ad refactor(goals): replace the Manager session-goal API with OpenCode built-in /goal 2026-10-29 12:38:39 -04:00
Chris Scott da5a9ebabf fix(frontend): collapse the linked-server project header when a tool panel is docked 2026-10-25 19:27:05 -04:00
Chris Scott 48d9bed4cc fix(sessions): route remote session deletion through the picker navigation
Replace the picker's onDeleteActiveSession callback override with a
deleteActiveSessionPath destination that goes through the shared open()
helper. Deleting the open remote session from the floating panel no longer
races a history-back close against the project navigation, and the docked
panel stays open on the remote project page like local deletion does.
2026-10-25 17:48:50 -04:00
Chris Scott d26ab578f0 feat(sessions): move the session picker into the desktop right tool panel
Replace the tool rail's Activity tool with a Sessions tool that renders the
full session picker (Activity, This project and Projects tabs, linked-server
selector, add repository), shared with the mobile sheet via RouteSessionPicker.

- A docked panel stays open and follows navigation (picker navigation mode
  'panel'); the floating overlay closes on select (mode 'replace').
- The session page's sessions shortcut and /sessions open the panel; the
  collapsed sidebar opens it when a tool rail is mounted and falls back to
  the modal dialog otherwise.
- useToolPanelToggle is the single panel toggle for the rail, shortcuts and
  sidebar.
- Remove ActivityList, the fixed activity panel width and the window label.
2026-10-25 17:16:36 -04:00
Chris Scott 82c46bbdb2 Merge pull request #469 from chriswritescode-dev/feat/schedules-sandbox
feat(schedules): run scheduled jobs in a per-job sandbox microVM
2026-10-25 16:44:02 -04:00
Chris Scott 66b45b8f02 Merge pull request #468 from chriswritescode-dev/fix/remove-compact-activity-list
refactor(activity): remove the compact activity list from the mobile More drawer
2026-10-25 16:43:58 -04:00
Chris Scott 7ec3845cd7 Merge pull request #467 from chriswritescode-dev/fix/schedules-panel-full-height
fix(schedules): fill available panel height with jobs table
2026-10-25 16:43:56 -04:00
Chris Scott 070cb2f729 feat(schedules): run scheduled jobs in a per-job sandbox microVM 2026-10-25 14:49:38 -04:00
Chris Scott 87a8a21a8d refactor(activity): remove the compact activity list from the mobile More drawer 2026-10-25 13:48:10 -04:00
Chris Scott f12546e416 fix(schedules): fill available panel height with jobs table 2026-10-25 13:44:10 -04:00
Chris Scott 8747cfece9 fix(notifications): phrase permission labels without losing acronyms
The always-allow summary interpolated the raw action id ("always allow
shell") while every other surface shows the label ("Run Command"), and
the permission dialog lowercased the whole label, turning "Fetch URL"
into "fetch url". getPermissionPhrase lowercases each word of the label
unless it is all caps, and both the scope summary and the dialog
question use it.
2026-10-25 11:20:21 -04:00
Chris Scott 6e398c4d40 fix(device-pairing): clean up push subscriptions on admin reset and share URL helpers
The admin password reset finds the admin case-insensitively and deletes the push subscriptions of the sessions it ends. The app re-sends its push subscription once per signed-in session so revoke reaches re-signed-in devices, and the upsert keeps the stored device name. Plain-HTTP and URL parsing checks are shared helpers.
2026-10-24 19:26:21 -04:00
Chris Scott b9d8d18124 fix(device-pairing): refuse to mint pairing codes from an address that cannot pair
A loopback origin in production or plain HTTP on a public address still
minted a code and showed a browser QR no other device could use.

- one availability rule decides untrusted, loopback and public plain-HTTP
  origins; POST /api/device-pairing/links checks it before minting
- GET /api/device-pairing/availability reports the rule for the page origin
  without minting
- Connect a device disables "Show QR code" and explains the fix when the
  address cannot pair
- private-network plain HTTP keeps the browser QR; the app QR still needs
  the toggle
2026-10-24 19:26:21 -04:00
Chris Scott 106e8f51fc fix(frontend): show a message when the QR renderer fails to load
A rejected dynamic import left the pairing dialog blank forever. The
renderer now loads through async/await with a catch and renders an error
instead of nothing when the chunk cannot be fetched.
2026-10-24 19:26:21 -04:00
Chris Scott f8e4cfe136 feat(device-pairing): pair phones and browsers with a QR code
Settings -> Account gets "Connect a device", a paired-devices list, and a
remote access headers editor, so the mobile app and other browsers can sign
in without typing a password and pass a reverse proxy such as Cloudflare
Access.

- one-time pairing codes (3 min TTL) minted by a Better Auth plugin and
  redeemed into a new session that records the device name
- POST /api/device-pairing/links builds the ocm://link app link with the
  stored headers as h= parameters and a browser /pair link; plain-HTTP and
  loopback origins are blocked or warned about
- remote access headers are stored encrypted, returned by name only, and
  validated (8 headers, 512-char values, 1800 encoded characters, reserved
  transport names blocked); a Cloudflare Access service token preset fills
  CF-Access-Client-Id and CF-Access-Client-Secret
- login offers "Sign in with QR code" and /pair redeems a scanned code,
  returning to the login redirect target
- revoking a device deletes its session, closes its live connections and
  removes its push subscriptions; the current session cannot be revoked
2026-10-24 19:26:21 -04:00
Chris Scott 5b0e629182 Merge pull request #432 from chriswritescode-dev/feat/repo-secrets
feat(secrets): repository secrets and variables for agent shells and terminals
2026-10-24 19:25:22 -04:00
Chris Scott 52b38053b9 fix(frontend): show servers unavailable when the initial server fetch is paused offline
A paused initial fetch kept showsInitialLoading true, so the remote project page showed a spinner until connectivity returned. The hook now exposes isPaused and excludes paused fetches from initial loading; the project page, project list and sidebar show an offline card with Retry instead of a missing-server state, while cached server data still wins.
2026-10-24 19:24:26 -04:00
Chris Scott b0a1640565 fix(frontend): harden the persisted query cache
Persist only data that survives a JSON round trip, bound both the age and
the size of what is written, and stop a restore from being read as a
missing or empty list.

- Drop the repository git status rule: its `Map` data serializes to `{}`,
  so a restored cache made `gitStatuses.get` throw. Round-trip every
  remaining rule through the real persister to catch class-backed data.
- Persist only the unfiltered session list and give just that list the 24h
  gcTime; a search key keeps the default and is collected when unused.
- Set the 24h gcTime in the vcs info query options instead of a prefix
  default, so vcs status and diff keep their normal gcTime.
- Drop the oldest half of the persisted queries per retry pass instead of
  one per pass, sorting once per save, and cap infinite queries to their
  first page before the write.
- Build the session-pin and active-work rules from the shared keys.
2026-10-24 19:24:26 -04:00
Chris Scott b6c21de0bb feat(frontend): persist the query cache and restore the signed-in session offline
Allowlisted query data is persisted to localStorage for 24h, scoped to the origin and user and cleared on sign-out. The last validated user is remembered so a cold start opens with cached lists when the session check fails on the network, while a 401 or signed-out response still signs out. Lists keep cached data when a refetch fails.
2026-10-24 19:24:26 -04:00
Chris Scott 80e7f78a9b test(frontend): wait for the picker's open focus before pressing Enter on the scope tab
The dialog moves focus to the search input on the next animation frame after opening. The test focused the sessions tab before that frame, so Enter sometimes landed on the search input and the scope never toggled. It now waits for the open focus, asserts the tab has focus, and checks the persisted scope.
2026-10-24 19:15:00 -04:00
Chris Scott adb251081f fix(frontend): resolve the deepest owning remote project and refresh VCS info after branch changes
findRemoteProjectForDirectory now returns the longest matching canonical path, so nested linked-server projects attribute sessions to the innermost project. Switching, creating and renaming a local branch invalidate that directory's VCS info query, so branch labels refresh immediately.
2026-10-24 10:37:41 -04:00
Chris Scott 4b7652451b fix: order linked-server projects by session activity and stop waking idle projects
OpenCode stamps project time.active whenever a location boots, and directory-scoped requests boot it, so the Manager's reconnect made every idle linked-server project look recently active. Remote projects are now ordered and labelled by their newest session's update time (one global session list per server), falling back to time.updated. Pending permission, form and shell lists, and the backend replay, only run for linked-server directories with running sessions, tracked pending work or the viewed route. The hard-coded status dot on remote project cards is removed.
2026-10-24 00:32:13 -04:00
Chris Scott de4a9bcf1a fix(frontend): stretch the session picker tabs across the full width 2026-10-24 00:14:38 -04:00
Chris Scott bd746574e8 fix(frontend): scope linked-server pickers to the canonical project and stabilize the model pill
Sheet, desktop rail and session-page dialog resolve the same canonical remote project, reuse the page's session cache and hold the all-directories search while it resolves. Deleting the open session keeps ?repoTab=. Context usage keeps its identity between streaming flushes so ModelQuickSelect skips re-renders, the location prefetch waits for repo data, and dialog and bottom sheet share one return-focus hook. Picker route parsing, remote project query options and the local new-session button are shared.
2026-10-23 23:01:19 -04:00
Chris Scott 2884e68a69 feat(secrets): secrets and variables UI and env mapping in trust review
Add a Secrets manager for global values (Settings > Secrets and variables) and
repo values (Secrets tool panel and dialog), with environment scoping,
write-only secrets and copyable ${{ }} references. The trust review for
.ocm/project.json lists the environment and each mapped variable with the
expression it resolves from.
2026-10-23 22:59:57 -04:00
Chris Scott 52aeb7780f feat(frontend): consolidate session picker navigation and remote project loading 2026-10-23 22:35:10 -04:00
Chris Scott 81fb2d4033 fix(frontend): compare the active session's server before closing the picker sheet 2026-10-23 21:25:22 -04:00
Chris Scott df9200880e fix: apply CodeRabbit auto-fixes 2026-10-23 20:52:17 -04:00
Chris Scott d99fcc268e feat(frontend): open session details from the header
Pressing the session title opens a details sheet with server, project, branch and directory and inline rename. Linked-server sessions show a server icon and their branch, child sessions show a parent session pill, a banner marks paused live updates while the stream reconnects, and the header context indicator is removed now that usage lives on the model pill.
2026-10-23 20:18:27 -04:00
Chris Scott 52162d5c4a feat(frontend): show context usage on the composer model pill
The model pill shows the context percentage with a tone meter, and the model picker gains a context strip with a Compact action.
2026-10-23 20:18:21 -04:00
Chris Scott 36d35cc974 fix(frontend): order linked server projects by last activity and keep cached lists on refetch errors 2026-10-23 20:18:21 -04:00
Chris Scott 578a2211ba feat(frontend): replace the repos sheet with a sessions picker sheet
The mobile tab bar's Repos sheet becomes a Sessions sheet with Activity, Sessions and Projects tabs, matching the mobile app. The picker body is shared with the desktop session dialog, the scope toggles by tapping the selected Sessions tab, and the header adds new-session, add-repo and server controls. The collapsed desktop sidebar opens the session dialog instead of the old sheet.
2026-10-23 19:56:10 -04:00
Chris Scott 36a5693b5c fix(frontend): float one jump-to-latest button above the composer
Match the mobile app: while the transcript is scrolled up, show a centered
round button above the composer instead of swapping the mobile composer tools
button for an arrow and hiding the desktop arrow when the prompt has text.

The composer tools menu now stays available on mobile at all times, and the
desktop in-composer arrow is gone.
2026-10-23 14:20:57 -04:00
Chris Scott 67cfd862b1 fix(tts): let voice mode read replies aloud on iOS
iOS rejects play() outside a user gesture unless the same media element was
already played inside one. Each chunk used a new Audio element, so replies in
voice mode failed with "Reading the reply failed".

- reuse one audio element for all external TTS playback
- add tts.unlock(), which plays a short silent clip on that element, and call
  it from the voice mode start and orb taps
- route every playback failure through failPlayback(message) and pass the
  message to onEnd so voice mode shows the underlying reason
- report a blocked play() as "Audio playback was blocked by the browser"
2026-10-23 14:08:33 -04:00
Chris Scott 811c22c7ec refactor(frontend): use async/await for composer send completion 2026-10-23 13:06:24 -04:00
ioplex dabe750920 fix: key auth rate limiting on the socket address only and clear sent drafts after unmount
- auth: drop the AUTH_TRUSTED_PROXY_HEADERS opt-in. Configured headers were
  trusted from any peer, so direct access to the published port could still
  rotate them. Better Auth now reads only the Manager-set socket address
  header; the env, compose forwarding, docs and tests are removed.
- composer: a send that completes after the composer unmounted (session
  switched mid-send) left the submitted text in the per-session draft store.
  Sends now complete through mutateAsync and clear the stored draft only if
  it still matches what was submitted, so newer edits are kept.
2026-10-23 12:49:53 -04:00
ioplex 4ec62cd4e7 fix: address findings from the full Docker evaluation of main
Critical and high:
- repos: unlinking a local repo removes only the Manager reference and alias,
  never the repository files; confirm button reads "Unlink"
- auth: rate-limit by the socket address; trust proxy headers only when
  AUTH_TRUSTED_PROXY_HEADERS is set (documented and forwarded in compose)
- composer: per-session in-memory drafts (text, bash mode, attachments);
  Escape no longer clears the prompt
- url params: compose same-tick updates so schedule dialogs stay closed after
  create/delete; delete dialog names the job

Medium:
- tool rows show failures (non-zero shell exit, failed exploration members)
- voice conversation shows the specific error and a starting state
- settings: Escape in dropdowns and the shortcut recorder no longer closes
  the dialog; mobile deep links open the requested section; one content tree
  per platform
- closing pushed sheets, settings, tool panels and schedule dialogs goes back
  in history
- login returns to the requested page; signed-out pages make no
  authenticated requests
- action terminals keep their output (Manager-side output capture and replay)
- unpushed-commit detection, commit message kept on failure
- binary files with unknown extensions are detected and not editable
- tool panel resizes when docked and floats as a dismissible sheet when the
  page is too narrow
- Docker image runs tini as PID 1

Low: not-found states, add-repo and branch validation errors (4xx),
search-aware empty states, mobile repo sort/filter/select cues, sidebar
resize affordance and collapse shortcut, mobile unread badge, preview port
filtering, terminal close handling, walkthrough empty state and helper
session filtering, placeholder contrast, permission labels and focus,
TTS task-list sanitizing, git identity email validation, quieter git
logging, hermetic worktree tests, and accessible names for icon-only
controls.
2026-10-23 11:42:37 -04:00
Chris Scott 1c22ef6ea1 Merge pull request #459 from chriswritescode-dev/feat/voice-conversation-mode
feat(frontend): hands-free voice conversation mode in the composer
2026-10-22 22:13:03 -04:00
Chris Scott a5694d874f refactor(frontend): isolate voice conversation from the memoized composer re-renders 2026-10-22 21:58:13 -04:00
Chris Scott 73af7aec89 fix(frontend): address CodeRabbit review findings on voice conversation mode
Report STT start and capture failures instead of staying on Listening, treat a failed reading as an error, skip replies with no readable text, stop auto-play replaying a reply voice mode already read, focus the text box after Edit in text box, and strip think blocks before text reaches TTS.
2026-10-22 20:36:01 -04:00
Chris Scott 5d8b2c9445 feat(frontend): hands-free voice conversation mode in the composer
The mic opens a voice loop that listens, sends on end of speech, reads each completed reply and reopens the mic when the agent is idle. The phase reducer, pause options and voice-mode instruction move to the shared package. TTS gains per-message completion and pause/resume. The old tap-and-drag recorder, its strip and its CSS are removed.
2026-10-22 20:18:16 -04:00
Chris Scott 6ac264f9d0 test(frontend): cover RepoList empty-state add action
Asserts the empty-state Add repository button calls onAddRepo once, the only add path left on mobile after the header action became desktop-only.
2026-10-22 09:30:07 -04:00
Chris Scott 739f4d3d5c feat(frontend): move the mobile add-repo action into the search row
The header ran out of room on narrow screens now that the server switcher is
always present. The Repo button is desktop-only and mobile gets a bordered
icon button beside the search input instead. The empty state carries its own
add button, since it renders no search row.
2026-10-22 09:20:24 -04:00
Chris Scott 9319579150 fix(frontend): queue TTS auto-play per step instead of cutting each off
The auto-play hook returned early whenever the last assistant message was
still streaming, before it could record that a reply had started, so the
first reply in a fresh session was never spoken. Remove that input and rely
on the message's own completion state.

Auto-play now speaks every completed assistant step and queues steps that
arrive during playback, resuming after a short pause, rather than
interrupting the audio in progress. Manual playback and stop still interrupt
and clear the queue.
2026-10-22 00:08:11 -04:00
Chris Scott 276bc1b920 fix(frontend): address CodeRabbit review findings on the transcript branch
- wrap long retry errors instead of truncating them
- keep the server switcher in the home header for the local server too
- accept trailing-slash session detail routes in isSessionDetailRoute
2026-10-21 23:41:12 -04:00
Chris Scott cbdd252d7a feat(frontend): switch servers from the home page header
Replace the read-only connection status with the server switcher, so the
header names the selected linked server and can change servers in place.
2026-10-21 23:14:12 -04:00
Chris Scott c4bb104cc0 fix(frontend): reveal transcript actions on focus and bound the shell preview
- expose the user message action buttons to keyboard focus, not just hover
- compute the shell preview tail once per output change and clamp very long lines
2026-10-21 23:14:12 -04:00
Chris Scott d8495df811 fix(frontend): keep transcript display settings working with the plain log layout 2026-10-21 22:26:33 -04:00
Chris Scott 8004496f10 feat(frontend): restyle the session transcript as a plain log with collapsible tool details 2026-10-21 21:42:11 -04:00
Chris Scott d154d56645 fix(frontend): delay and de-duplicate desktop sidebar tooltips 2026-10-21 14:20:03 -04:00