Skip to content

fix(less-computer): restore OpenCode model discovery and execution#840

Draft
appergb wants to merge 2 commits into
betafrom
fix/less-computer-opencode
Draft

fix(less-computer): restore OpenCode model discovery and execution#840
appergb wants to merge 2 commits into
betafrom
fix/less-computer-opencode

Conversation

@appergb

@appergb appergb commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

User description

Goal

Restore the OpenCode backend in Less Computer for the 1.3.15-Beta.3 test release:

  • detect OpenCode and automatically refresh the account's available models
  • provide a localized model-loading/selection UI
  • use current OpenCode CLI flags and provider-specific model defaults
  • make the text-only Less Computer path usable without unrelated microphone/accessibility permissions
  • remove startup/settings stalls caused by synchronous CoreAudio and Keychain access
  • prevent the text-submit IPC from aborting on macOS

Dependency

Depends on #839 (6b33ba2), which updates release/updater ownership after the repository transfer and prepares Beta.2. Once #839 lands in beta, this PR naturally reduces to the single OpenCode fix commit.

Compatibility

  • Targets beta; no stable-branch merge or release tag is included.
  • OpenCode behavior was verified with local OpenCode v1.17.15.
  • Claude Code keeps its existing sonnet default.
  • Version metadata is synchronized at 1.3.15-Beta.3.

Verification

  • npm test — passed (24 frontend/contract tests)
  • cargo test --manifest-path src-tauri/Cargo.toml coding_agent:: — passed (43 tests)
  • cargo check --manifest-path src-tauri/Cargo.toml --bin openless — passed
  • INSTALL=0 ./scripts/build-mac.sh — passed; app and DMG signature checks passed
  • Packaged macOS app, exercised through Computer Use:
    • launched and displayed v1.3.15-Beta.3
    • detected OpenCode v1.17.15
    • showed localized loading state and loaded 10 models
    • selected opencode/hy3-free
    • opened Less Computer from Advanced settings
    • sent a real request and received exact response OPENLESS_OPENCODE_APP_OK

Artifact: src-tauri/target/release/bundle/dmg/OpenLess_1.3.15-Beta.3_aarch64.dmg
SHA-256: 58d99962917d9fe4d2b8daa5c6645cd6ae8a65a84e1f6e313a8d41c86e4cab8d

Issue

User-reported beta regression; no linked GitHub issue.


PR Type

Enhancement, Bug fix, Tests


Description

  • Restore OpenCode model discovery and automatic refresh in settings

  • Add model selection UI with localized labels for OpenCode

  • Switch OpenCode permission flag to --auto and add --continue for sessions

  • Provide text-only entry point for Less Computer without microphone permissions

  • Fix AppKit main thread blocking during Keychain, microphone enumeration, and WebKit IPC


Diagram Walkthrough

flowchart LR
  A[OpenCode Backend] --> B[Model Discovery]
  A --> C[Permission Flag Update --auto]
  A --> D[Session --continue]
  B --> E[Auto-refresh in Settings UI]
  E --> F[Model Selection Dropdown]
  A --> G[Text Entry Point]
  G --> H[Less Computer Panel]
  I[Concurrency Fixes] --> J[Keychain/Mic off Main Thread]
  I --> K[WebKit IPC spawn via Tauri runtime]
Loading

File Walkthrough

Relevant files
Enhancement
11 files
args.rs
Add provider-specific model resolver                                         
+41/-0   
commands.rs
Add list-opencode-models Tauri command                                     
+36/-18 
opencode.rs
Implement model discovery, permission flag, session continue
+135/-17
qa.rs
Add less_computer_window_open command                                       
+13/-0   
dictation.rs
Use provider-specific model resolver                                         
+4/-5     
Onboarding.tsx
Add continue-to-settings button                                                   
+19/-0   
en.ts
Add OpenCode and continue button strings                                 
+13/-2   
zh-CN.ts
Add OpenCode and continue button strings                                 
+13/-2   
coding-agent.ts
Add codingAgentListOpencodeModels IPC wrapper                       
+12/-0   
less-computer.ts
Add lessComputerWindowOpen IPC wrapper                                     
+5/-0     
CodingAgentSection.tsx
OpenCode model selection and refresh UI                                   
+157/-18
Bug fix
4 files
credentials.rs
Make credential commands async with spawn_blocking             
+74/-50 
misc.rs
Make microphone enumeration async                                               
+7/-3     
coordinator.rs
Add less_computer_window_open and fix text-submit spawn   
+13/-1   
lib.rs
Async microphone enumeration, window show fix                       
+81/-38 
Tests
2 files
frontend-test-runner.test.mjs
Add contract test discovery                                                           
+1/-0     
less-computer-opencode-contract.test.mjs
New contract test for OpenCode integration                             
+123/-0 
Additional files
8 files
package.json +1/-1     
Cargo.toml +1/-1     
mod.rs +2/-1     
tauri.conf.json +1/-1     
ja.ts +13/-2   
ko.ts +13/-2   
zh-TW.ts +13/-2   
index.ts +2/-0     

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 3fbf64e)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

839 - Partially compliant

Compliant requirements:

(empty)

Non-compliant requirements:

  • Update all GitHub URLs from appergb to Open-Less (no URL changes in this PR)
  • Bump version to 1.3.15-Beta.2 (version bumped to 1.3.15-Beta.3, not Beta.2)
  • Add repository-owner contract test script (no such test added; a different contract test is added)

Requires further human verification:

(empty)

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@appergb
appergb requested a review from H-Chris233 July 18, 2026 18:50
@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 3fbf64e

@H-Chris233
H-Chris233 marked this pull request as draft July 21, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant