Commit Graph
957 Commits
Author SHA1 Message Date
Bohdan Triapitsyn 3e0a9622aa refactor(server): own the requested project directory in the runtime
Drop the canonical-containment 403 guard and the extra realpath(base) the
read routes (stat/read/raw/serve) had gained. Every workspace resolution
returns insideWorkspace: true and outside-file grants use
base = dirname(canonicalPath), so the guard could never fire; the flag had
no remaining reader and is gone with it. The read routes are back to the
single realpath(resolved.resolved) they had before.

Move the lexical-base fallback out of the inline header parsing in
routes.js. x-opencode-directory decoding belongs to
project-directory-runtime, so resolveProjectDirectory now also returns
requestedDirectory, the pre-realpath candidate that validated.
resolveWorkspacePathFromContext retries against it when the canonical base
rejects a path, which keeps files under a symlinked project root
addressable without a second copy of the header/query parsing.
2026-08-29 00:53:06 +03:00
Bohdan Triapitsyn 55ae41bde2 Merge remote-tracking branch 'origin/main' into port-2872 2026-08-29 00:48:36 +03:00
Bohdan Triapitsyn 2a5a25d5a2 fix(small-model): harden configured headers 2026-08-28 23:50:04 +03:00
Dmitrii 3903cb53b1 fix(small-model): send configured provider headers (#3214)
readProviderConfig read only options.baseURL and options.apiKey, and the
OpenAI-compatible dispatch hardcoded a bearer token, so provider
options.headers never reached the request. OpenCode sends those headers on
every chat turn, which left the small model authenticating differently from
the request path against the same URL.

Providers behind a gateway that authenticates on its own header, such as the
Ocp-Apim-Subscription-Key default of Azure API Management, answered 401 for
walkthroughs, session goal audits, titles and commit summaries while the same
model worked in chat.

Read options.headers alongside the API key, resolve {env:...} and {file:...}
in the values with the existing resolveConfigApiKey, and merge them into the
request after the bearer default so a gateway whose header is the credential
can override it.

Closes #3213
2026-08-28 23:46:05 +03:00
Bohdan Triapitsyn ac1881fab7 fix(server): forward Small Model override to managed OpenCode config
The Small Model override chosen in Settings never reached the managed
OpenCode process config, so OpenCode's own title/summary generation
kept using its fallback chain instead of the user's explicit choice
and sessions stayed untitled.

Merge main into this branch to pick up the includeWeb/includeMemory
flags added to prepareManagedOpenCodeEnv, and re-apply the Small
Model injection on top of that current env shape in
getManagedOpenCodeEnv (server/index.js).

Closes #2497
2026-08-28 23:45:04 +03:00
Bohdan Triapitsyn 9e5890729c fix(git): include remote-only branches from ls-remote in branch lists (#2735)
fix(git): include remote-only branches from ls-remote in branch lists
2026-08-28 23:40:58 +03:00
Bohdan Triapitsyn 1151c40f13 fix(server): bound login-shell probes so a slow rc file cannot stall startup
Merge main and reduce the change to the defect that reproduces: the server's
synchronous login-shell probes (env snapshot and command -v for opencode,
node, bun) ran with no timeout, so a slow or interactive rc file held startup
until it returned — on macOS that is what made a brew-installed opencode look
undetected from a Dock launch. Every probe now carries the same 5s bound the
Electron shell probe already uses and falls through on overrun; the known
install locations already include both Homebrew prefixes.

The non-login command -v fast path and the reproduction script are dropped:
a plain sh inherits the same PATH the resolver has already walked.

Closes #1720
2026-08-28 23:23:16 +03:00
Iuliia Ivashko 20cda28cac fix(opencode): name the release when upgrading OpenCode
Since opencode 1.18.x, `POST /global/upgrade` requires a `target` semver in
the body. OpenChamber sent an empty object, so every "Update OpenCode" click
came back 400. The rejection arrives as `{name, data:{message}}`, which has
no `error` field, so the user was left with the bare status text: "Bad
Request".

Resolve the target from the latest release — the same lookup the upgrade
prompt already uses to decide there is anything to offer — and fail with an
explicit code when it cannot be resolved, rather than sending a body opencode
is guaranteed to reject. Read the upstream rejection message so a refused
upgrade explains itself.

The VS Code extension carries its own copy of this flow and had the same two
defects; both are fixed there.

fixes #3121
2026-08-28 18:48:27 +03:00
Bohdan Triapitsyn f551f4e784 Merge pull request #3205 from openchamber/fix/branch-selector-remote-checkout
fix(git): check out a local tracking branch when a remote branch is picked
2026-08-28 16:21:40 +03:00
Bohdan Triapitsyn 5871c36875 chore: bump @opencode-ai/sdk to 1.18.25 2026-08-28 16:01:07 +03:00
Iuliia Ivashko 01b3e3346f fix(git): check out a local tracking branch when a remote branch is picked 2026-08-28 15:45:43 +03:00
Bohdan Triapitsyn 06263a5c2b Merge pull request #3064 from fitzgpt/feat/i18n-turkish
feat(i18n): add Turkish (tr) locale
2026-08-28 11:33:52 +03:00
herjarsa 256722eeea fix(server): drop /api/fs/list hunk per btriapitsyn review
Main already returns entry paths under the requested (lexical) directory,
fixed separately. Re-applying the original LIST hunk introduced two
regressions: shadowing of outer 'let requestedPath' inside the try block,
and the gitignore filter comparing lexical entry paths against
'ignoredPaths' built from the canonical realpath.

This commit drops the LIST hunk and the two list tests that accompanied
it. The read-family fixes (stat/read/raw/serve) stay — those were the
actual symlink resolve-before-containment fix and are not affected by
the LIST regressions.

Refs btriapitsyn on #2872 (2026-08-27).
2026-08-28 09:41:31 +02:00
fitzgpt 83c2c7dc76 feat(i18n): add Turkish (tr) locale 2026-08-28 02:27:31 +03:00
Bohdan Triapitsyn b8465ae133 fix: harden and de-slop the merged contribution batch
Follow-ups promised on merge, plus review findings on the batch itself:

- chat: task-tool output now respects the 512KiB render cap; quick-open
  icon is visible at rest on coarse pointers and reachable by keyboard
  (row keydown no longer swallows inner-button Enter/Space); composer
  inline-code decoration drops the metric-shifting padding; a btw fork
  send carries only the boundary instruction, never the promotion notice
- sync: cascade revert/unrevert aborts busy descendants, busy state is
  read from every child store at the moment of use; rule 9 documents
  redo clearing all descendant revert markers
- electron: renderer recovery keeps memory-eviction (a valid
  render-process-gone reason) and both windows share one
  attachRendererRecovery helper
- vscode: process registry is a thin re-export of the web module
  (provider-env-aliases precedent) with ordered register/unregister
  writes and an awaited close
- server/cli: managed-process registry takes injectable deps (fixes the
  unreaped-orphans ReferenceError), corrupt settings errors name the
  file, getWorktrees test restores console.warn
- tests: module-mock harnesses removed (AgentsSidebar, SettingsView
  mobile focus — behaviors stay live but uncovered, accepted trade),
  QuestionMarkdown asserts rendered DOM
- i18n: German gains the debug-panel request keys, Japanese/German drop
  removed worktree keys, Ukrainian unit spacing fixed
- changelog: Copilot AI Credits entries (main + VS Code)
2026-08-28 02:08:09 +03:00
Bohdan Triapitsyn 98567cd6e0 Merge main 2026-08-28 01:27:32 +03:00
Bohdan Triapitsyn e205452223 Merge pull request #2771 from shijie152/fix/relay-key-atomic-settings
fix(cli): atomic settings writes and gate relay key regeneration in connect-url
2026-08-28 01:24:30 +03:00
Bohdan Triapitsyn feba432407 Merge pull request #2784 from herjarsa/fix/silence-worktree-warning-for-non-git-dirs
fix(git): silence getWorktrees warning when directory is not a repo
2026-08-28 01:23:51 +03:00
Bohdan Triapitsyn 5854f43ca1 Merge pull request #2907 from jakoss/github-usage-rework
Align GitHub Copilot quota usage with AI credits
2026-08-28 01:23:40 +03:00
Bohdan Triapitsyn 0596af5761 Merge pull request #3000 from mpeter/fix/anthropic-small-model-base-url
fix(small-model): route anthropic provider through configured baseURL
2026-08-28 01:23:22 +03:00
Bohdan Triapitsyn d49ff426ab Merge pull request #2844 from sergiofspedro/fix/windows-port-release
fix: kill orphaned process on Windows before OpenCode restart
2026-08-28 01:23:04 +03:00
Bohdan Triapitsyn bfcd1830f0 Merge pull request #1727 from HAHH9527/fix/windows-schtasks-tr-261-char-limit
fix(cli): externalize Windows startup PowerShell to .ps1 wrapper (schtasks /TR 261-char limit)
2026-08-28 01:22:57 +03:00
Bohdan Triapitsyn 285c63e238 Merge pull request #1946 from divyam234/fix/theme-runtime-symlink-themes
fix: load symlinked custom themes
2026-08-28 01:22:52 +03:00
Bohdan Triapitsyn 27be3f3193 Merge pull request #3038 from colinmollenhour/bug/Fix-External-OpenCode-Host-Recovery
fix(opencode): preserve external host during recovery
2026-08-28 01:22:23 +03:00
Bohdan Triapitsyn 64f3f46d93 Merge pull request #1957 from bketelsen/fix/sw-notificationclick-focus
fix(pwa): focus existing window on notification click
2026-08-27 23:15:39 +03:00
Bohdan Triapitsyn ef51b95749 Merge pull request #2171 from greghaynes/clever-heron
fix(web): shorten PWA install app name
2026-08-27 23:15:26 +03:00
Bohdan Triapitsyn fb9306745e Merge pull request #2774 from IngTian/fix/omit-thinking-config-non-reasoning
fix(small-model): omit thinkingConfig for non-reasoning Google models
2026-08-27 23:14:53 +03:00
Bohdan Triapitsyn af1706c6a7 Merge pull request #2995 from bashrusakh/fix/2763-opencode-binary
fix(server): keep env-provided OPENCODE_BINARY when settings clear the override
2026-08-27 23:14:10 +03:00
Bohdan Triapitsyn 50d97a78e5 Merge pull request #3051 from pascalandr/fix/3046-editor-font-size-persistence
fix(settings): persist editor font size
2026-08-27 23:14:04 +03:00
Bohdan Triapitsyn a2f55df211 Merge pull request #3066 from gaojunran/fix/branch-base-created-from-head
fix(git): don't treat bare HEAD as a branch diff base
2026-08-27 23:13:50 +03:00
Bohdan Triapitsyn 8d98ba3826 Merge pull request #3104 from fitzgpt/fix/non-ascii-directory-header
fix(server): percent-encode non-ASCII directory headers to OpenCode
2026-08-27 23:13:44 +03:00
Jakub Syty 22bd738180 Merge branch 'openchamber:main' into github-usage-rework 2026-08-27 10:06:53 +02:00
Ayoub Achour 61741e58c4 fix(tunnels): update cloudflared download link 2026-08-27 04:10:09 +01:00
Colin Mollenhour 2428d88907 fix(opencode): preserve external host during recovery 2026-08-27 01:10:06 +00:00
Bohdan Triapitsyn 8598f3a37c release v1.21.0 2026-08-26 23:15:55 +03:00
Bohdan Triapitsyn cb18f8c9af chore: bump @opencode-ai/sdk to 1.18.23 2026-08-26 19:46:23 +03:00
Bohdan Triapitsyn c4df01f707 chore(quota): drop the Command Code usage provider
Command Code's official API has no usage endpoints; the old usage source
was the unofficial studio API reached through a now-archived plugin, so
the tile could only ever fail for officially configured users. Removed
across server, shared UI, and the VS Code extension; the provider logo
fallback stays — it serves the model picker, not usage.
2026-08-26 19:29:04 +03:00
Bohdan Triapitsyn edec60faff fix(github): stop fork remotes from claiming the local branch's PR badge
PR-status source candidates were every configured remote, so a checkout
carrying contributor forks matched a fork's closed PR whose head merely
shared the branch name — a fork's 'main' surfaced on the local main in the
git and work-status panels. Only the ranked-first remote (the one the
branch pushes to) and its fork network are PR sources now; other remotes
remain search targets but their owner:branch heads no longer count.
2026-08-26 18:40:34 +03:00
Alexandre Reyes Martins 8ea94a119f fix: restore baseline validation (#3142) 2026-08-26 17:15:49 +03:00
Jakub Syty c3cb9ca157 Merge remote-tracking branch 'origin/github-usage-rework' into github-usage-rework 2026-08-26 14:00:20 +02:00
Jakub Syty 06a72fed3b Merge branch 'openchamber:main' into github-usage-rework 2026-08-26 13:58:58 +02:00
Jakub Syty 1459b4b360 Adjust for unlimited plan option 2026-08-26 13:58:31 +02:00
Matt Peter 56b5e9971f fix(small-model): don't double up /v1 in Anthropic baseURL override
Match @ai-sdk/anthropic exactly: baseURL is the full API prefix, so
/messages is appended as-is instead of unconditionally inserting /v1,
which broke configs where the baseURL already ends in /v1 (the common
form OpenCode itself passes to @ai-sdk/anthropic).

Addresses review feedback from @btriapitsyn on PR #3000.
2026-08-25 09:42:28 -04:00
Matt Peter f459206e4a fix(small-model): route anthropic provider through configured baseURL
The Anthropic small-model dispatch (session-assist recap/suggestion,
walkthrough, etc.) hardcoded https://api.anthropic.com/v1/messages,
ignoring provider.anthropic.options.baseURL — the same override every
other provider branch already respects. Any setup routing the anthropic
provider through a local proxy (e.g. Meridian for Claude Max / Vertex)
had the small-model call bypass the proxy and hit the real Anthropic API
with whatever placeholder credential the proxy config uses, failing with
401 invalid x-api-key on every call.
2026-08-25 09:42:28 -04:00
fitzgpt 89cfbd1b9a docs(server): note the encoded directory header in markdown image grants 2026-08-24 16:22:58 +03:00
Bohdan Triapitsyn 841eca5720 feat(surface): switch app shells when the viewport crosses the phone threshold
The mobile-vs-desktop surface is stamped once at boot, so a browser
window narrowed past the phone threshold kept the desktop shell (and
its legacy squeezed layout) until a manual reload. A viewport watcher
now reloads into the other shell once the resize settles — the same
mechanism the old Settings toggle used. Fixed shells (Capacitor,
desktop, VS Code) and ?surface= overrides never switch.

With the new mobile app reachable this way, the old/new mobile layout
preference is gone: phones always get the mobile app.
2026-08-24 16:08:04 +03:00
Bohdan Triapitsyn 2f27f0ec4b fix(terminal): reconcile tabs with server sessions and keep shown terminals alive
The tab list lived only in per-tab sessionStorage, so a new browser
tab, another device, or cleared storage showed an empty terminal
sidebar while PTYs kept running server-side, and orphans leaked until
the idle sweep. Add GET /api/terminal/sessions and adopt unknown
server sessions into the local tab projection (additive only; a failed
listing changes nothing).

The idle sweep also reaped terminals in background tabs because only
the active tab holds a WebSocket attachment. Add POST
/api/terminal/touch and have open clients periodically refresh
activity for every session their tabs reference.
2026-08-24 14:30:00 +03:00
Bohdan Triapitsyn 97edd033f9 fix(relay): stop bystander instances from capturing the relay host
Two mitigations for local multi-instance contention over the shared relay
identity:

- A standby instance now waits a 2-minute grace period after the host claim
  frees before taking over, so a cleanly restarting host (app update or
  relaunch) — which reclaims at boot with no wait — always wins the restart
  window instead of stranding paired devices on another process.
- Dev instances never host the relay passively: dev scripts set
  OPENCHAMBER_RELAY_HOST=off and the Electron dev shell is detected via
  OPENCHAMBER_ELECTRON_DEV. Explicit enable/pairing on such an instance still
  force-claims; OPENCHAMBER_RELAY_HOST=on overrides.
2026-08-24 14:03:18 +03:00
Bohdan Triapitsyn 3aa45805bc fix(devices): keep the existing device name on re-pair and re-login
A dedupe-keyed client re-mint (QR rescan, password/passkey re-login) replaces
the stored record, which also reset the operator-visible name to the app's
hardcoded default ('OpenChamber Mobile'). The app-reported name is now only a
fallback: an explicit pairing label wins, otherwise the replaced record's
label is kept, and the default applies only to a first-ever pairing.
2026-08-24 14:03:18 +03:00
fitzgpt d6a5192fba fix(server): percent-encode non-ASCII directory headers to OpenCode 2026-08-24 02:21:35 +03:00