Commit Graph
3142 Commits
Author SHA1 Message Date
Bohdan Triapitsyn 94479ff714 style: reduce message action button and icon sizes 2026-09-09 23:50:58 +03:00
Bohdan Triapitsyn a8f0f99c3d fix(quota): normalize OpenCode Go reset timestamps
Go returns ISO reset dates, but the shared usage contract requires numeric timestamps. Convert dates to milliseconds before building usage windows.

Verified all three windows against the live Go API. Added numeric timestamp and partial-window regressions; 14 focused tests, web type-check, lint, and syntax checks pass.
2026-09-09 23:23:22 +03:00
Bohdan Triapitsyn 936f9b0a92 fix(ui): remove redundant committed scope heading
Remove the Committed heading above the Commit option in Walkthrough and delete its unused translations from all 12 locales.

Validation: UI type-check and focused Walkthrough ESLint passed; no references to the removed locale key remain.
2026-09-09 23:18:36 +03:00
Bohdan Triapitsyn b41ffc58be fix(ui): hide dirty branch warning on mobile
Remove the uncommitted-changes tooltip, warning icon, and tooltip timer from mobile draft target triggers. Drop the unused mobile warning props while preserving desktop behavior.

Validation: UI type-check and lint passed. Oxlint and dead-code reported existing findings outside the changes. Visual validation was unavailable because the in-app browser timed out.
2026-09-09 23:05:06 +03:00
Bohdan Triapitsyn 655c0e6daf fix(git): retain prefetch limits until requests settle
Diff prefetch released concurrency slots after its UI deadline while the underlying requests kept running, allowing overlapping batches to accumulate work.

Retain per-runtime directory slots until transport completion, preserve outstanding requests across cache resets, and skip prefetch in hidden Git views. Clear deadline timers and avoid invalidating active batches on duplicate demand.

Validated 43 focused tests, UI type-check and ESLint. Reproduced four outstanding requests against a limit of two before the fix. Reviewed existing oxlint findings; Windows process failure was not reproduced.
2026-09-09 23:04:58 +03:00
Bohdan Triapitsyn b267b995a5 feat(git): float actions beside each diff hunk
Replace the shared hunk menu with compact per-hunk controls over following context. Preserve canonical patch checks, bind controls to rendered rows, and keep EOF actions inside the code column.

Validated 19 focused tests, UI type-check, UI/web lint and the web build. Browser checks covered unified and split layouts, themes, and one-line EOF hunks.
2026-09-09 22:36:15 +03:00
Bohdan Triapitsyn d9186afdc0 fix(ui): preserve sidebar width when reopening
Opening the sidebar reset its width to the reduced resize minimum. Keep visibility independent from the persisted width and restore the 280px initial default.

Validated five sidebar regression tests, UI type-check and UI lint.
2026-09-09 22:35:54 +03:00
Bohdan Triapitsyn d419fe9248 fix(sync): avoid false session loading errors
New sessions fetched history before their confirmed empty state was published, and cold worktree selection ignored globally indexed session directories.

Initialize new transcripts before navigation, reject stale-runtime creation responses, and resolve cold sessions through their known directory. Preserve earlier live records and explicit recovery.

Validated 191 focused tests, UI type-check and ESLint. Reviewed dead-code and oxlint reports; existing anti-slop findings remain outside the added code. Remote and Windows runtime behavior has not been manually verified.
2026-09-09 22:32:04 +03:00
Bohdan Triapitsyn 0e8ee31816 test(stream): wait for the reconnect event
The fixed 35ms sleep could finish before reconnect when workspace builds and test workers ran concurrently. Poll the actual ready frame and always close the runtime.

The final workspace run passed: 429 UI, 40 VS Code, 23 Electron and 4 root test files; 2154 web tests passed with one existing platform skip.
2026-09-09 19:39:28 +03:00
Bohdan Triapitsyn adffdb81a3 feat(git): safely apply individual diff hunks (#3443)
Resolve the Changes-view conflict without reverting branch or commit comparisons. Pair canonical action patches with displayed blob identities, refresh all path views after mutation, exclude historical snapshots, and reject stale or multi-file patches at the server boundary.

Preserve CRLF bytes and make long hunk menus keyboard-reachable. Workspace type-check, lint and build passed; focused parser, menu, view and real Git regressions passed.
2026-09-09 19:39:28 +03:00
Bohdan Triapitsyn 35635c0082 fix(desktop): load Mini Chat from the resolved HMR UI
Mini Chat used the API origin in HMR mode and could load the server auth page instead of the local application. Retain the resolved local UI URL and use it for Mini Chat windows.

Verified native menu zoom in main and Mini Chat windows in isolated HMR and bundled Electron profiles; Electron syntax checks passed.
2026-09-09 18:49:15 +03:00
Bohdan Triapitsyn 796eaa9546 fix(ui): keep composer zoom on interface scale
The composer also mounts CodeMirror, so Mini Chat focus incorrectly changed the file editor font size. Exclude the explicit chat-input owner from file-editor zoom routing.

Validated the ThemeProvider focus regression, including a focused CodeMirror composer.
2026-09-09 18:34:53 +03:00
Bohdan Triapitsyn 4769a4bf49 fix(queue): reconcile missed delivery across live transports (#3440)
Deliver queue updates on the control SSE stream, recover independently of bootstrap suppression, and preserve authoritative empty snapshots against delayed responses. Coalesce hydration and recovery while retaining unfinished legacy migration across runtime switches.

Workspace type-check, lint, tests and build passed. Follow-up recovery and migration fixes pass 27 queue tests, 3 control-stream tests and UI type-check.
2026-09-09 18:19:23 +03:00
Bohdan Triapitsyn a39a0ee3f2 fix(ui): integrate responsive interface scale (#3423)
Keep normal web headers at 48px, send native zoom directly to the focused main or Mini Chat window, and restore walkthrough widths through validated persisted ratios.

Validated 40 context-panel tests, the focus-aware ThemeProvider regression, UI type-check and Electron syntax checks. Runtime smoke and combined workspace validation follow before publication.
2026-09-09 17:57:16 +03:00
Bohdan Triapitsyn 9ac78eaa9c feat(usage): integrate ClinePass quota provider (#3431)
Add ClinePass across server and VS Code quota paths. Reject malformed windows, preserve valid sibling limits, align credential fallback, and report timeout failures accurately.

Validated 30 server quota tests, 129 VS Code quota tests and VS Code type-check. Oxlint findings are confined to pre-existing VS Code code.
2026-09-09 17:51:39 +03:00
Jordi Ibáñez 70e04fc15f fix: avoid false offline results in Electron instance probes (#3415)
* fix: avoid false offline results in Electron instance probes

Use Chromium networking with one abortable deadline per direct-host attempt. Retry unreachable selector probes once while preserving identity, auth and compatibility checks, and clean up response bodies on every exit.

Add regression coverage and document the native probe invariants.

* fix: declare Electron probe's zod dependency

Declare the existing workspace zod version as an Electron runtime dependency so probe imports do not rely on root hoisting. Update only the matching lockfile workspace entry, without changing resolved versions or parsing behavior.
2026-09-09 17:44:38 +03:00
Jakub Syty 03697190ff Handle exit code properly for warnings in git diff output (#3426) 2026-09-09 17:44:32 +03:00
Leonidandbashrusakh c1f19b1158 test(sync): preserve question bootstrap and reducer invariants (#3439)
* test(sync): preserve question bootstrap and reducer invariants

Port the main-independent test assets from the superseded hybrid V2
question PRs (#3266/#3267/#3288) onto current main's V1-only
architecture:

- listPendingQuestions: unscoped + per-directory fan-out, merge with
  id-dedupe (first wins), failure throws instead of empty success,
  malformed-item skip, true-empty success (client.questions.test.ts)
- question reducer invariants: idempotent upsert-by-id, replace-not-
  first-wins, removal by session/request pair, duplicate-terminal no-op,
  late-asked re-registration (no tombstone)
- bootstrap deferred-phase question merge: signature-based replace and
  disappearance-deletion, in-flight-change preservation (stale guard),
  retry-then-merge on transient failure

Tests only: zero production changes, zero V2 SDK calls, zero fallback
logic, zero raw V2 event aliases.

* test(questions): clarify V1 merge id-filter test title

---------

Co-authored-by: bashrusakh <bashrusakh@users.noreply.github.com>
2026-09-09 17:44:11 +03:00
Bohdan Triapitsyn 5c127a1e3c feat(chat): support collapsible Markdown disclosures
Render details and summary as controlled disclosures with rich Markdown and shared sprite chevrons. Preserve expansion through streaming, settlement, and redecorating while keeping other raw HTML inert.

Validated with 59 focused tests, UI type-check and lint, and maintainer testing during live generation. Dead-code and oxlint reports retain existing findings.
2026-09-09 17:41:15 +03:00
Bohdan Triapitsyn 432f3bb9df fix(vscode): avoid navigation reload on chunk load failure
Browser-style chunk recovery used location.reload inside VS Code webviews, where navigation reload is unsupported. Preserve import retries and let the original failure reach the error boundary instead.

Validated with focused regression tests, UI type-check and lint, and the VS Code webview build. The reported gray-screen crash has not been reproduced.
2026-09-09 17:41:15 +03:00
Bohdan Triapitsyn 8cb426083b fix(chat): drop message footer facts by priority without leaving a hole
The footer collapsed its facts by wrapping the overflow onto a clipped
second line. The fact disappeared but its width did not: the row kept the
space it had been given, so a dropped agent left a hole between the effort
and the duration — visible on both the phone and the desktop.

Decide it by measuring instead. The row cannot overflow, because the model
name truncates, so "did it fit" is read off the model: while the model is
cut, hide the next fact by priority — timestamp, then agent, then thinking
effort — and measure again. Hidden facts leave the layout entirely, the
model truncates only when there is nothing left to give, and the row stays
tight at every width.

CSS could not do this. Container-width breakpoints know nothing about the
model's length and dropped facts that still fitted; wrap-and-clip is what
left the hole in the first place.

Testing: package type-check, lint, the message test suite under the
isolated runner; drove a real chat in a browser (430px drops the timestamp
and the agent, 330px also the effort, restoring the width brings them all
back, no gaps in any state). The ResizeObserver path is unverified — this
preview browser delivers no observer callbacks at all — while the window
resize path is.
2026-09-09 17:41:15 +03:00
Bohdan Triapitsynandgaojunran fce3f174d2 feat(mobile): add branch and commit comparison views
Mobile Changes only exposed working-tree edits. Share comparison loading and source pickers with desktop, with phone sheets, tablet popovers, scoped file navigation and retry states.

Keep checkout, Sync and commit controls under Changes. Compact the section and source triggers, center menu items, and preserve repeated file-open requests from chat.

Validated with UI type-check and lint, comparison and navigation tests, web/mobile asset builds, and maintainer app testing.

Co-authored-by: gaojunran <nebula2021@126.com>
2026-09-09 17:41:15 +03:00
Bohdan Triapitsyn 0b899d1153 feat(ui): unify change comparisons and compact message actions
Branch comparisons could retain an old base or omit local edits, while Changes and walkthrough selected their sources independently.

Share branch and commit selectors across both panels, honor exact refs, include local branch edits, and support first-parent commit diffs with the latest 50 commits. Compact message metadata and move touch actions into a shared sheet.

Validated with workspace type-check, lint and build, focused Git and UI tests, and maintainer testing in the app.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn ec7db447bd fix(vscode): skip unsupported OpenChamber event stream
Shared session-list subscriptions opened server-only event and URL-token routes against the webview origin, causing repeated 403 responses. Skip the control-stream subscription in VS Code while preserving OpenCode bridge sync and polling.

Validated with regression tests, UI type-check and lint, and the VS Code webview build. The reported gray-screen crash remains unconfirmed pending user logs.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 29b9588a51 refactor(mobile): move project sorting into the drawer header
The five sort modes sat as a chip row under the search field, which cost a
project row of list space for a setting people touch about once a month.
Put them behind an icon in the header next to reordering — the two answer
the same question about the list — and let it open the same sheet the
composer already uses to pick a model or an agent, with a check on the
active mode. The icon hides while reordering or searching, where sorting
means nothing.

The new-session button moves to the outer right edge and stays there: it
is the one action people hit without looking, so it must not slide as the
icons beside it come and go.

Testing: package type-check and lint; drove the drawer in a browser at
390px (chip row gone, sheet lists the five modes and marks the active one,
picking one reorders the list and closes the sheet, the icon disappears in
reorder mode, and the new-session button keeps the right edge with and
without a search).
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 1294a90e52 fix(mobile): keep Android content clear of the navigation bar
Android 15+ enforces edge-to-edge, and Capacitor stops padding the WebView
once it can hand the insets to the page instead — so the app draws under
the gesture/navigation bar. Only the top inset was ever consumed: full
cover surfaces ignored the bottom one entirely, which is why a settings
list ran under the bar, and the chat shell reserved half of it, which is
enough for a home indicator but not for a bar that swallows taps.

Reserve the full inset in the shell on Android and give the surfaces that
own the bottom edge — fullscreen surfaces, the workspace drawer, bottom
sheets — an opt-in class that pads them. The sessions drawer already did
this through its footer, so it stays as it is. Capacitor reports a zero
bottom inset while the keyboard is up, so none of this stacks with the
keyboard inset. iOS deliberately keeps its softer visual inset.

Testing: package type-check and lint; drove the mobile surface in a
browser with the Android platform class and a simulated 48px inset (shell
and surfaces reserve exactly that, drawer footer unchanged, and removing
the class returns every surface to zero).
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn fd416a3678 feat(mobile): drill into the OpenCode settings pages from a phone
Snippets, Agents, Commands, Plugins and Skills were desktop-only, even
though the composer already reads snippets and slash commands and the chat
lets you pick an agent: you could use those features from a phone but not
manage them. They render through the same page and sidebar components, so
the mobile settings surface only had to stop filtering them out.

Making them usable needed the drill-down to be real. A split page opens
its own list on mobile, but back from an item jumped all the way out to
the settings root, and a separate header button was the only way back to
the list — except on Skills, which had a hand-rolled exception. Turn that
exception into the rule: back walks nav → page list → item in reverse on
every split page, browser and system history follow the same path, and the
extra header button goes away because back now does its job. The Android
hardware button asks Settings to step up before the shell closes it.

MCP, Providers, Usage and Magic Prompts inherit the same navigation.

Testing: package type-check, lint, settings suites under the isolated
runner; walked all six pages plus MCP in a browser at 390px (list → item →
back to list → back to root, no horizontal overflow). The hardware back
button needs a device check.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 625a16028b fix(chat): soften final answer divider and tighten activity spacing
The final answer divider was too prominent and sat too far below Activity. Lower its opacity to 30% and remove the header's bottom margin in both states, matching the maintainer's visual adjustments.

Validated UI type-check, lint for both changed files, and seven existing activity and rendering tests.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 9e7692db5d feat(mobile): follow the project sort order in the sessions drawer
The sidebar's project order (manual, A-Z, Z-A, newest, recently used) is a
shared setting, but the mobile drawer ignored it and always rendered the
manual order, so a phone could not put the project you actually work in at
the top of the list.

Read the same setting in the drawer and offer it as a chip row under the
search field, which scrolls away with it — mobile navigation has no
overflow menu to hide it in, and a control touched once a month should not
hold permanent room above the list. Picking an order persists it the way
the desktop sidebar does, so the choice follows the user across surfaces.
Drag-to-reorder is offered only under the manual order, since dragging
rewrites exactly the order the other modes ignore.

The ordering itself moves into one helper the desktop sidebar now uses
too, so both surfaces answer the setting identically.

Testing: package type-check and lint; new unit tests for the helper plus
the sidebar list suite under the isolated runner; drove the mobile surface
in a browser against an isolated server (chips fit a 390px viewport,
switching to "recent" reorders the list, the reorder button hides, and the
choice reaches the server settings).
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn d4a0bf3ee1 feat(mobile): start a session in a project from the sessions drawer
Project rows carried an active-project dot and a session count, neither of
which answers a question the user has while browsing the drawer, and there
was no way to start a session in a project's root directory: the only
per-row action was creating a worktree.

Drop both indicators and put a "+" beside the worktree button instead. It
opens a draft already carrying the project and its directory, the same
contract as the desktop sidebar's per-project "+", so the current
directory is not switched out from under the session behind the drawer.
Project rows in search results lose the count the same way and gain the
same button; dropping it there also drops a per-project session scan that
ran on every keystroke.

Testing: package type-check and lint; drove the mobile surface in a
browser against an isolated server (rows render the button, counts gone).
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 0ddd994f98 fix(comments): attach code comments on Enter
Code comments required Cmd/Ctrl+Enter while quotes and browser annotations used Enter. Align desktop submission and its placeholder, preserve Shift+Enter line breaks and mobile keyboard behavior.

Validated UI type-check, UI lint, and six existing IME checks. Lint reports one existing warning in MobileChangesSurface. In-app browser validation was unavailable.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn d9ac3192d0 chore: update OpenCode SDK to 1.18.30 2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn cc25e58b55 fix(relay): handle dead connections and preserve usage on refresh failure
Use received frames for peer liveness and reject new requests after terminal relay failures. Keep authoritative usage snapshots separate from refresh errors, bound request lifetime, and guard concurrent refreshes and runtime switches.

Add regression coverage for relay liveness, terminal rejections, quota failures, cancellation and request deadlines. Validated with 51 focused tests, workspace type-check and lint, web build and mobile assets.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn 0841ccdd57 feat(mobile): close the drawers with the reverse edge swipe
The chat opens the sessions drawer with a left-edge swipe and the
workspace drawer with a right-edge one, but neither could be closed the
same way: the only way back was the header X or the Android back button.

Reuse the edge-swipe hook on both open drawers so the mirrored gesture
closes them. To keep that free of the row swipe actions in the sessions
list, those are mirrored too: session, project and worktree rows now
reveal their actions on the LEFT with a swipe to the right, in the
mirrored button order so a partial drag still exposes delete first. When
a row has its actions out, the closing swipe puts them away first
instead of closing the drawer.

The hook grew an `enabled` flag so the listeners re-attach when a drawer
opens or a tablet rotates the workspace between panel and drawer.

Testing: package type-check and lint; gestures need a device check.
2026-09-09 17:41:14 +03:00
Bohdan Triapitsyn af84735388 fix(relay): keep bulk streaming from blocking client requests
Negotiate downstream delivery credit and schedule response streams fairly before encryption. Bound queued output, preserve deltas and WebSocket close ordering, and retain legacy peer compatibility.

Validated with 81 relay tests, workspace type-check and lint, web build and mobile assets, and slow-link tests through the production relay. Confirmed on LTE by the maintainer.
2026-09-09 17:41:14 +03:00
fitzgptandfitzgpt 4d8148587c fix(i18n): align Turkish glossary for agent and prompt in telemetry strings (#3445)
* fix(i18n): align Turkish glossary for agent and prompt in telemetry strings

* fix(i18n): use literal prompt in input history scope description

---------

Co-authored-by: fitzgpt <fitzgpt@users.noreply.github.com>
2026-09-09 16:26:34 +03:00
LABCAT 7f147568ea fix(hunk-actions): use native menu items, drop hardcoded label
- Render each hunk action as a DropdownMenuItem (Stage/Unstage/Discard hunk N
  with +/- counts) so Base UI keyboard navigation, highlight, Escape, and
  close-on-activate apply. Plain div/button rows are gone.
- Row labels reuse the already-translated diffView.hunk.stageTitle /
  unstageTitle / discardTitle strings; no new i18n keys, no hardcoded English.
- Disable the file-level actions while a hunk action is in flight for
  consistency (server serializes per directory regardless).
2026-09-09 21:43:18 +12:00
LABCAT aeafc9c095 feat(git): per-hunk stage, unstage, and discard actions in Changes view
Implements the hunk-level actions promised by the 1.13.0 changelog entry.
Each expanded file diff with 2+ hunks gets a Hunks menu (next to the
file actions) listing every hunk with its +/- counts and Stage/Unstage
+ Discard buttons, wired to the existing stageGitHunk/unstageGitHunk/
revertGitHunk API and POST /api/git/apply-hunk backend.
2026-09-09 20:58:47 +12:00
Ibrahim Khan ca1a866bd2 refactor(queue): tighten reconnect reconciliation 2026-09-09 07:42:42 +00:00
Ibrahim Khan 8e7c26be23 fix(queue): re-read the server queue after a stream gap
- Add `resync()` to the message queue store: re-reads the server
  snapshot once a hydration has established server ownership.
- Call it from the sync provider's stream-reconnect and transport-switch
  handlers.
- Re-read the server session after a failed take.
- Keep a queue a newer broadcast produced when a hydration snapshot
  predates it, listed in the snapshot or not.
- Document the broadcast transports and the resync in the stores and
  message-queue docs.
2026-09-09 07:30:50 +00:00
Matt Cowger 66af9b52c7 fix(small-model): use selected runtime model endpoint (#3437) 2026-09-09 08:29:23 +03:00
khafaji-ahmed e12a0ebd64 fix(ui): keep layout responsive at every interface scale 2026-09-08 19:56:49 -04:00
Bohdan Triapitsyn 458dcf78c0 fix(chat): keep activity summaries visible in narrower columns
Lower the compact header breakpoint from 640px to 560px while preserving file statistics on mobile. Validated with focused tests, UI type-check and lint, and the web build.
2026-09-08 19:16:55 +03:00
Bohdan Triapitsyn 87d88d6952 fix(chat): prevent persistent gaps after activity collapse
Upgrade LegendList to 3.3.10 and patch temporary padding cleanup to compare CSSOM-serialized values. Settle Activity height when React replays an interrupted layout effect.

Validated with 16 padding regressions, 3 collapse lifecycle tests, the UI suite, workspace type-check and lint, and web and VS Code builds.
2026-09-08 19:16:55 +03:00
Bohdan Triapitsyn 66a1cc2112 fix(chat): restore the 40px end-follow threshold
The half-viewport band made return-to-end detection too broad. Restore the fixed 40px threshold without changing gesture handling or follow transitions.

Testing: 14 focused scroll tests pass; UI type-check passes; UI lint has one unrelated existing warning; dead-code report inspected. Live chat behavior not validated.
2026-09-08 19:16:55 +03:00
Bohdan Triapitsyn ea392a26cc feat(chat): collapse completed live activity with tool summaries
Keep live history compact without changing sorted rendering. Reuse Activity Default, preserve final answers, and summarize tool-result diffs under an animated disclosure.

Validated with the UI test suite, focused disclosure tests, UI type-check and lint, web production build, dead-code scan, and browser and animation fixtures.
2026-09-08 19:16:55 +03:00
Aleksei Ilin c9bcae5b04 feat(usage): add ClinePass quota provider 2026-09-08 17:02:56 +02:00
𝖎𝖚𝖑𝖎𝖎𝖆 9ef235a6b4 feat(sessions): add exact ID search to sidebar and archive (#3428) 2026-09-08 15:42:32 +03:00
Bohdan Triapitsyn 05915e2859 fix: keep task tool spacing consistent
Keep top padding on task tool entries and simplify the Turn stats release note to state its default without an instruction.

Testing: focused ToolPart ESLint, changelog validation, and diff checks passed. No interactive layout verification was run.
2026-09-08 01:40:08 +03:00
Bohdan Triapitsyn 9e2163d839 feat: enable turn stats by default and prepare release notes
Turn stats was hidden unless users opted in. Show it by default, migrate implicit hidden lists, and preserve explicit section choices through reloads and settings sync.

Prepare App and VS Code release notes with Turn stats as the headline and BTW composer changes under improvements.

Testing: 115 focused tests passed; UI type-check passed; UI lint has one existing warning. Changelog validation and diff checks passed. Oxlint findings are limited to existing code in sections.ts; interactive app validation was not run.
2026-09-08 01:38:28 +03:00