Skip to content

feat(claude): Ultracode as its own switch, beside effort (#2232) - #2266

Merged
devswha merged 2 commits into
mainfrom
feat/claude-ultracode-switch
Oct 28, 2026
Merged

devswha merged 2 commits into
mainfrom
feat/claude-ultracode-switch

Conversation

@devswha

@devswha devswha commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Closes #2232.

Since Claude Code 2.1.284, Ultracode is its own setting that keeps the session's effort level, not an effort level. Ovis still offered it as one. This PR moves it to a switch in both places the issue names. It also fixes an existing gap it exposed: Claude Code's /effort card never showed while Ultracode was on, or in a pane narrower than 70 columns.

New workspace / New tab

  • Effort list: Claude Code's Effort select now lists low–max only.
    • A new Ultracode switch for Claude Code sits after Effort. It reuses Settings' Toggle, has a label and a hint, and the hint is linked with aria-describedby.
    • On: the launch adds --settings '{"ultracode":true}' after --effort.
    • Off: it adds nothing, so Claude Code's own settings decide, as Agent default does.
    • The switch resets on every open and goes off for any other agent.
  • Bridge: it still accepts --effort ultracode (xhigh + Ultracode) from older pages and other clients. launchArgsFault uses a separate accepted list (shared/launch-rules.ts). Nothing in Ovis or herdr passes --settings today, so there is nothing to merge.
  • Native Windows:
    • Problem: PowerShell 5.1 strips the JSON's double quotes on the hop from npm's claude.ps1 shim to claude.exe, and Claude Code then exits with Error: Invalid JSON provided to --settings.
    • Fix: the bridge passes the same JSON as the path of a content-addressed file in %LOCALAPPDATA%\ovis\claude-settings (server/claude-settings-file.ts). If that write fails, it falls back to the inline JSON.
    • Linux, macOS and remote PCs are unchanged.
  • Demo: the demo's tab/create read any two-item args as a resume, so ["--settings", json] became a fake session id. It now counts a resume only by the agent's own resume flag.
  • Hidden choices: when the agent list moves a remembered agent away before it arrives, choices the new agent cannot take are dropped, as a pick already did. A hidden switch, model or effort no longer blocks Start.

/effort card

  • Reader: parseClaudeEffort now reads every 2.1.311 slider screen. A card now appears in these cases:
    • Ultracode on, where Claude draws Ultracode: dynamic workflows on every task under the names;
    • narrow panes, where the switch is two lines under the slider;
    • max on a model without Ultracode, where the description sits right under the names;
    • an unbound toggle key, which draws the state with no hint.
  • Still no card: a switch drawn half, twice, or both beside and under the slider, and panes of about 44 columns or fewer (Claude cuts the names there).
  • New row: "Turn Ultracode on" or "Turn Ultracode off". It sends Tab, then s once a re-read shows the switch flipped with ▲ on the same level; otherwise the route answers 409. Tab alone only flips a draft in Claude's dialog, Esc discards it, and s applies it for this session only. A level row still sends arrows then s, and s goes out only while the switch shows the state the card was read with. The row appears only when the key reads Tab.
  • Shared picker plan: in server/dialogs/interaction-plan.ts (claude-model, claude-effort, codex-model, pi ×2, omo-model, omp-model), only arrow keys move the cursor now. Before, any other key counted as a step back, so a Tab would have been counted as ←. The other pickers send only arrows before their final key, and their tests pass unchanged.
  • No HTTP/WS contract change. The drawn state is an internal ParsedPrompt field that publicPrompt does not send. An older client shows the row in English.
  • Fixtures: 12 real 2.1.311 screens captured through an isolated herdr's pane.read at 120/70/69/60 columns, trimmed to the dialog.

Verification

  • Real Claude Code 2.1.311, no model prompts:
    • --effort medium --settings '{"ultracode":true}' starts at medium with Ultracode on.
    • With two --settings flags, only the last applies, as the issue says.
    • A --settings value adds to ~/.claude/settings.json rather than replacing it.
    • On a model without xhigh, or with workflows off, the key is ignored without an error.
    • The /effort layouts at 120/70/69/60/44 columns were captured.
    • Tab, Esc, s and Enter behave as described above, and nothing is written to settings.json.
  • herdr 0.9.5: passes agent.start args intact and adds no flags. Checked in an isolated session with a stand-in claude, including JSON, quotes, $ and backticks.
  • Windows 11 (PowerShell 5.1), real npm @anthropic-ai/claude-code 2.1.312 in a temp prefix:
    • Inline JSON through herdr's script fails with Invalid JSON provided to --settings.
    • A file path gets through, including one with spaces, an apostrophe or Hangul.
    • A new server/windows-native.test.ts case proves the same with a stand-in shim in the Native Windows job.
  • Checks: bun run check fast passes, and scripts/new-session-skills-browser-qa.ts passes. The QA covers the switch, the create body, Codex with no switch, the agent-switch and reopen resets, and the 390/1280 layout.
  • Reader: run over all 254 captured screens. The only differences from main are the intended ones.

Notes

  • Bundle version: server/ and shared/ changed, so the next release PR raises REMOTE_BUNDLE_VERSION. Nothing here needs it for compatibility: an older bridge already accepts the new args.
  • Resume: herdr's auto-resume and Ovis's Resume run plain claude --resume <id>. They do not re-apply Ultracode, nor model, effort or permission mode, as before.
  • Version requirement: the switch's hint names Claude Code 2.1.284 or later. Ovis cannot see the PC's Claude Code version.

🤖 Generated with Claude Code

Since Claude Code 2.1.284 Ultracode is a setting of its own that keeps the
session's effort level, not an effort level.

- New workspace and New tab drop `ultracode` from Claude Code's effort list
  and offer an Ultracode switch after Effort. On, the launch adds
  `--settings '{"ultracode":true}'` (verified on 2.1.311: medium effort with
  Ultracode on); off adds nothing. The bridge still accepts
  `--effort ultracode` from older pages and other clients.
- On a native Windows PC the bridge passes that inline JSON as the path of a
  settings file under %LOCALAPPDATA%\ovis\claude-settings: PowerShell 5.1
  strips its quotes on the hop through npm's claude.ps1 shim, and Claude Code
  then exits with "Invalid JSON provided to --settings" (reproduced on a
  Windows 11 PC with the real npm package).
- Claude Code's /effort card reads the 2.1.311 slider with Ultracode on, in
  panes narrower than 70 columns, at max without Ultracode and with the key
  unbound, where it showed no card before, and offers a Turn Ultracode on/off
  row: Tab, then `s` only once the slider shows the switch flipped on the
  same level. Only arrow keys move the shared picker plan's cursor now.
- Real 2.1.311 /effort screens from an isolated herdr as fixtures, trimmed
  to the dialog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9a44f27 and f5398bc.

Files selected for processing: 50
  • DESIGN.md
  • changelog.d/claude-ultracode-switch.md
  • docs/agent-commands.md
  • docs/guide.md
  • scripts/demo-tabs.test.ts
  • scripts/new-session-skills-browser-qa.ts
  • server/agent-launch.test.ts
  • server/agent-launch.ts
  • server/claude-settings-file.test.ts
  • server/claude-settings-file.ts
  • server/dialogs/claude.test.ts
  • server/dialogs/claude.ts
  • server/dialogs/interaction-plan.test.ts
  • server/dialogs/interaction-plan.ts
  • server/dialogs/shared.ts
  • server/fixtures/claude-effort-2.1.311-none-120.txt
  • server/fixtures/claude-effort-2.1.311-none-60.txt
  • server/fixtures/claude-effort-2.1.311-off-120.txt
  • server/fixtures/claude-effort-2.1.311-off-60.txt
  • server/fixtures/claude-effort-2.1.311-off-max-120.txt
  • server/fixtures/claude-effort-2.1.311-on-120.txt
  • server/fixtures/claude-effort-2.1.311-on-60.txt
  • server/fixtures/claude-effort-2.1.311-on-69.txt
  • server/fixtures/claude-effort-2.1.311-on-70.txt
  • server/fixtures/claude-effort-2.1.311-on-max-120.txt
  • server/fixtures/claude-effort-2.1.311-on-max-60.txt
  • server/fixtures/claude-effort-2.1.311-set-120.txt
  • server/outcome.test.ts
  • server/prompt.test.ts
  • server/windows-native.test.ts
  • shared/card-text.ts
  • shared/launch-rules.test.ts
  • shared/launch-rules.ts
  • site/demo/fixtures.ts
  • site/demo/transport.ts
  • src/components/NewSessionDialog.css
  • src/components/NewSessionDialog.tsx
  • src/components/SettingsControls.tsx
  • src/lib/agentLaunchMode.test.ts
  • src/lib/agentLaunchMode.ts
  • src/lib/i18n.test.ts
  • src/lib/i18n/composer.ja.ts
  • src/lib/i18n/composer.ko.ts
  • src/lib/i18n/composer.zh.ts
  • src/lib/i18n/workspace.ja.ts
  • src/lib/i18n/workspace.ko.ts
  • src/lib/i18n/workspace.zh.ts
  • src/lib/inputRow.test.ts
  • src/lib/newSession.test.ts
  • src/lib/newSession.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an optional Ultracode switch when starting Claude Code workspaces and tabs. It’s off by default and doesn’t change the effort level.
    • Added an Ultracode control to Claude Code’s /effort card for toggling it during the current session.
  • Bug Fixes
    • Improved launch validation so models and Ultracode settings are checked against the selected agent.
  • Documentation
    • Updated the agent guide with Ultracode availability and compatibility details.

The change adds a Claude Code Ultracode switch to new-session launches and /effort cards. It also adds Windows settings-file handling for Claude launches and restricts demo resumed-session detection to recognized agent-specific resume arguments.

Changes: Ultracode controls

Layer / File(s) Summary
Launch capability and arguments
shared/launch-rules.ts, src/lib/agentLaunchMode.ts, src/lib/newSession.ts, docs/agent-commands.md, DESIGN.md, changelog.d/claude-ultracode-switch.md
Claude’s listed effort levels exclude Ultracode, while launch validation still accepts --effort ultracode. Supported Claude launches append the Ultracode settings JSON after effort.
New-session dialog and launch guidance
src/components/NewSessionDialog.tsx, src/components/SettingsControls.tsx, src/components/NewSessionDialog.css, scripts/new-session-skills-browser-qa.ts, src/lib/i18n/*
The dialog shows the switch for supported agents, resets it when the dialog opens or the selected agent does not support it, and passes the choice into launch configuration. Browser checks and translations cover the switch.
Windows Claude settings arguments
server/claude-settings-file.ts, server/agent-launch.ts, server/claude-settings-file.test.ts, server/agent-launch.test.ts, server/windows-native.test.ts
On Windows, Claude inline JSON settings arguments are rewritten to settings-file paths. If file handling fails, the original arguments are retained.
Claude /effort Ultracode card
server/dialogs/claude.ts, server/dialogs/interaction-plan.ts, server/dialogs/shared.ts, server/dialogs/*test.ts, server/prompt.test.ts, server/outcome.test.ts, server/fixtures/claude-effort-2.1.311-*, shared/card-text.ts, docs/agent-commands.md, docs/guide.md, changelog.d/claude-ultracode-switch.md
The card recognizes the displayed switch and offers a toggle when its Tab binding is present. Interaction plans reread the prompt and apply changes only when the switch and effort state match the plan.

Demo resumed-session detection

Layer / File(s) Summary
Agent-specific resume arguments
site/demo/fixtures.ts, site/demo/transport.ts, scripts/demo-tabs.test.ts
Tab creation assigns a session ID only when the agent’s arguments match its recognized resume flags and a single string session ID.

Priority: Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature · Severity of issue fixed: Medium

Merge Risk: Minimal · previous review f5398

No actionable issue remains identified; the change appears mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 78.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: separating Claude Code Ultracode into its own switch beside effort.
Description check Passed The description is detailed and covers the change, resulting behavior, compatibility, validation, tests, and scope. It does not use the exact template headings, but it provides the required informatio…
Linked Issues check Passed Issue #2232 requires an independent Claude Ultracode control, effort values without ultracode, session launch settings, /effort state detection and Tab handling, and continued acceptance of `--eff…
Out of Scope Changes check Passed The changed files remain connected to issue #2232. The Windows settings-file path preserves the required launch behavior through PowerShell. Demo resume detection prevents settings arguments from beco…
Full details: Description check

Explanation

The description is detailed and covers the change, resulting behavior, compatibility, validation, tests, and scope. It does not use the exact template headings, but it provides the required information in clearly labeled sections.

Full details: Linked Issues check

Explanation

Issue #2232 requires an independent Claude Ultracode control, effort values without ultracode, session launch settings, /effort state detection and Tab handling, and continued acceptance of --effort ultracode. src/lib/agentLaunchMode.ts implements the separate capability and emits --settings {"ultracode":true} only when enabled. shared/launch-rules.ts keeps ultracode out of CLAUDE_EFFORTS and accepts it for compatibility. The updated Claude reader, interaction plans, fixtures, and tests cover the requested layouts and guarded toggle application. The conditional settings merge is not needed for the current Ovis or herdr launch paths because they do not supply another --settings value.

Full details: Out of Scope Changes check

Explanation

The changed files remain connected to issue #2232. The Windows settings-file path preserves the required launch behavior through PowerShell. Demo resume detection prevents settings arguments from becoming fake session IDs. Agent-choice resets, picker toggle tracking, accessibility attributes, documentation, fixtures, and automated tests support the new switch and /effort card behavior. No demonstrated unrelated change is present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 78.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 19 functions across 33 files. (17 skipped: 17 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

Merging 242e4d0, from the owner's own session (w28). Codex was at capacity, so an omo reviewer and an independent second reviewer reviewed it. Ultracode is now its own switch beside effort: the launch adds --settings '{"ultracode":true}' as separate argv entries (no shell; injection probes found nothing a browser field can add), the effort list is low to max, and Claude Code 2.1.311's /effort card is read with and without the switch at 120, 70, 69 and 60 columns with the right keys (arrows then s; Tab then s for the switch); the installed Claude Code 2.1.311 accepts the combined flags. On Windows the settings go through a content-addressed cache file under %LOCALAPPDATA%\ovis\claude-settings; the user's own Claude settings are never touched, and 24 concurrent writers leave one correct file. The first review reproduced a HIGH: the cache followed links, so a linked cache folder or a linked entry made Claude use a file outside the cache. The merge pass fixed it on the branch in 242e4d0: linked folders (and Windows junctions) and linked entries are refused, opened entries are checked to be regular files inside the cache, and on refusal the launch keeps the inline JSON. Re-verified on Linux and on a Windows VM, including swaps during the open; the four new tests fail on f5398bc. The same commit removed two tests' English-sentence checks (behaviour and aria checks kept). Not filed: a link above the cache folder (a profile moved by junction) always takes the inline JSON, which can bring back the npm PowerShell shim's JSON quoting problem (server/claude-settings-file.ts ~76-86); a pre-existing hardlinked entry inside the cache is accepted; Windows CI does not run server/claude-settings-file.test.ts.

@devswha
devswha merged commit ba234ef into main Oct 28, 2026
33 of 37 checks passed
@devswha
devswha deleted the feat/claude-ultracode-switch branch October 28, 2026 16:26
devswha added a commit that referenced this pull request Oct 28, 2026
…r-fit timing out under load (#2287)

Closes #2285

## What was wrong

`Browser regression (other scripts)` kept ending as cancelled at its
50-minute `timeout-minutes`. It looked like hung demo scripts, but no
script hung. Each job waited a long time for a herdr check slot
(`scripts/check.ts`, `check: took a slot after Ns`) and then ran the
lane until the job timeout stopped it:

| job | PR | slot wait | lane before the cancel |
| --- | --- | --- | --- |
| 122862337418 | #2266 attempt 1 | 1340 s | finished, 107/108 in 1238 s
(a real `file-viewer-regression.ts:1395` failure) |
| 122889113275 | #2266 attempt 2 | 2110 s | 14 min, cancelled |
| 122878703515 | #2260 | 1755 s | 20 min, cancelled |
| 122872125320 | #2275 | 1635 s | 22 min, cancelled |

The scripts that "STARTed and never finished" were the ones running at
the cancel. Their logs in the browser-logs artifact print `PASS` lines
up to the cancel second. For example,
`sidebar-activity-demo-regression.log` ends with a PASS at 15:35:59, the
same second as `##[error]The operation was canceled.` The longest single
script run in these jobs was 357 s.

`ci.yml` gives these jobs `timeout-minutes: 50` and `CHECK_WAIT_SECONDS:
2400`, and time spent waiting for a slot counts against the timeout. On
2026-10-28 the P620 had 20 runners queuing for 4 slots
(`CHECK_HOST_MAX_RUNS=4`), and waits reached 37.6 min.

## What this PR changes

`scripts/ci-browser-parallel.ts` now limits each run of a script to
`BROWSER_SCRIPT_TIMEOUT_SECONDS` (default 600 s, about twice the slowest
run seen on a loaded host). Before this, a script that really hung, or a
process it started that kept its output open, would have used up the
whole job. Past the limit:
- the script's whole process tree (read from `ps` before anything is
signalled, so Chromium and servers it started are included) gets
SIGTERM, then SIGKILL after 5 s;
- the lane prints `TIMEOUT <script>` and the script's last 40 log lines
straight away;
- the script fails with exit 124 and is not run a second time;
- the summary, `summary.json`, the `::error` annotation and the job
summary all name it with `Timed out after Ns`.

It also fails a script that exits but leaves a process holding its
output open: if the output is still open 5 s after the exit, the run
fails with `Exited N, but a process it started still held its output`. A
run's processes carry a mark in their environment, so the stop finds
them through `/proc` on Linux even after they are moved to init.
Anything still alive after the SIGTERM grace gets SIGKILL, including a
child that ignores SIGTERM and writes nowhere. The script's own pid is
only signalled while the script is still running.

`scripts/composer-fit-demo-regression.ts:278` gave `setInputFiles` a 32
MiB + 1 byte buffer. Playwright sends a buffer to the page as base64
(about 45 MB), which on a loaded host ran past the 30 s timeout. That is
a real load failure inside this job: it failed twice in #2260's job and
twice in a row locally at load 80-110. It now passes a sparse file of
the same size by path. Chromium reads only its size, and the app still
refuses it by size (`src/lib/api.ts`) before reading.

`docs/development.md` documents the setting and says to check the slot
wait first when a job is cancelled at its timeout.

No workflow file is changed.

## Done outside this PR

- Host (Dori's call): the P620's runner count goes from 20 to 8 (2
reserved for main, 6 for PRs), with `CHECK_HOST_MAX_RUNS=4` kept. With 4
slots, at most 4 jobs can wait, so in the worst case a job waits one
slot round (about 20 min) and then runs the lane (about 21 min), within
50 min. Jobs beyond that now queue at GitHub, which does not count
toward `timeout-minutes`.
- Proposal for the owner, not applied: `timeout-minutes: 50` -> `75` for
Integration tests, Browser regression (ui-regression) and Browser
regression (other scripts), so the 40-minute `CHECK_WAIT_SECONDS` budget
and the lane both fit inside the job.

## Verification

- `bun test scripts/ci-browser-parallel.test.ts`: 4 pass. The two
deadline tests fail on the runner before this PR: the hung stub runs
into the test's 15 s spawn limit, and the exit-but-holding stub is never
caught.
- The real runner on a hung stub that leaves a child holding stdout,
with `BROWSER_SCRIPT_TIMEOUT_SECONDS=2`. Before this PR it still showed
only `START` when the outer bound killed it at 30 s, and the child was
left alive. With it, the run exits 1 after 2.4 s, with `TIMEOUT`, the
script's last lines and exit 124, and the child is gone.
- A child that ignores SIGTERM and writes nowhere. It survived the first
commit of this PR (Codex's HIGH) and is killed by the second.
- The six scripts named in the issue, run through the parallel runner
with 6 workers and `BROWSER_RETRY=0` under `dori heavy` on a host at
load 60-110:
- with the composer-fit fix: 6/6 in each of three runs (359 s, 334 s,
320 s);
- before it: 5/6 twice, both times composer-fit failing with
`setInputFiles` timing out at line 278.
The other five scripts passed every time. None hung, and none was
reported STOPPED with real Chromium.
- `bun run check fast` on 72d6486: typecheck, build, and unit tests
(8250 pass, 0 fail).
- Reviews:
- omo-native-code-reviewer: PASS, with one MEDIUM (a script that exits
but leaves a process holding its output) that is now fixed.
- Codex Sol 6.1 fast xhigh: first review BLOCK, on a HIGH (a child
ignoring SIGTERM survived), two MEDIUMs (re-parented children, stale
pids) and one LOW (zombies in the test). All were reproduced and fixed,
and the re-review is a PASS. Known limits it names: on Linux, orphans
are found through `/proc`, and a narrow pid-reuse race remains between
reading and signalling.
  - The composer-fit change (test only) had no separate reviewer.
devswha added a commit that referenced this pull request Oct 29, 2026
#2282)

<!-- See CONTRIBUTING.md for checks, translations, contract tests and
the changelog (a file in changelog.d/, never CHANGELOG.md). -->

## Change

Thanks to @fivetaku for this PR. #2266 shipped the Ultracode switch
first, with its Windows settings file and the `/effort` card's row. In
New workspace and New tab, though, the switch took a third column with a
three-line hint. This PR's compact line under the effort level reads
better, so the maintainers carried that layout over to main here, with
maintainer edits:

- **Merged main in.** The 7 conflicts resolve to main's #2266
implementation. It supersedes this branch's first commit: the effort
list, `--settings '{"ultracode":true}'`, the resets, Windows and the
`/effort` card all stay as #2266 made them.
- **One line under Model and Effort.** In New workspace and New tab with
Claude Code, Model and Effort take the row: two columns at desktop and
phone widths. Ultracode goes below them as one line, as tall as the
switch:
  - Settings' theme switch (`role="switch"`, not a native checkbox);
  - the name "Ultracode";
  - a dim note, "Claude Code 2.1.284 or later", which ellipsizes first.
- **The full sentence.** "Dynamic workflows at any effort level. Needs
Claude Code 2.1.284 or later." is now the switch's description
(`aria-describedby`, visually hidden) and the line's tooltip (`title`).
The note keeps the version requirement visible on a phone, where a
tooltip never shows. ko, ja and zh have the note.
- **This branch's shared constant.** `CLAUDE_ULTRACODE_SETTINGS` is now
in `shared/launch-rules.ts`, and `src/lib/agentLaunchMode.ts` uses it in
place of its own copy. The value is byte-identical, and the launch-rules
test checks it through the constant.
- **Docs.** DESIGN.md and #2266's unreleased changelog fragment describe
the new layout and credit @fivetaku. The fragment already says "Reported
by @fivetaku".

The layout follows the owner's review of #2266 and this PR's compact
line. It is not modeled on another app: it reuses this app's own
Settings row, a switch with its name beside it, so the control looks the
same in both places.

Nothing else changes for the switch:
- it is off at every opening and goes off when another agent is picked;
- the launch arguments are the same;
- the native Windows settings file and the `/effort` card are as before.

## Before and after

Left is main (#2266), right is this PR. Both are from the demo build at
1280x800 and 390x844, light and dark, in New workspace and New tab, with
Ultracode off and on (plus Korean). The Ultracode block went from
116-134 px to 36 px.

The owner reviewed 20 before/after pairs from the demo build before this
push; the merge pass can see them at `~/.dori/reports/ultracode-row/`
(`index.html`, `pair-*.png`) on the maintainer's PC. 320 px phone shots
are in `raw/after-320/`.

## Validation

- **Browser QA** (`scripts/new-session-skills-browser-qa.ts`):
- **New check:** `assertUltracodeLine` checks, at 1280, 390 and 320,
that Model and Effort share a row, Ultracode sits below them on one line
no taller than its switch, and the version is in its note, description
and tooltip.
- **Fails on main:** run on main's dialog it fails with "Ultracode is
under Model and Effort, not beside them at 1280".
- **Passes here:** all 7 scenarios pass on this branch. They cover the
create body, the resets after Start and Escape, and the tab order.
- **Old check replaced:** #2266's own layout check ("on Effort's row at
a desk") is replaced by this one.
- **Checks:** `bun run check fast` passes: typecheck, build and unit
tests.
- **Reviews:** two adversarial reviews of the diff against main.
  - **omo-native-code-reviewer:** PASS, with 5 LOW findings.
- **Codex Sol 6.1 Fast xhigh:** found 1 MEDIUM: Model and Effort stacked
on a 320 px phone. 4f76bfe fixes it and adds a 320 px check to the
browser QA. Codex's re-review of that fix is PASS.
- **LOWs fixed:** the label now dims while the switch is disabled, and
DESIGN.md's wording is corrected.
  - **LOWs left as they are:**
- On touch screens the tooltip never shows, by design: the short note
keeps the version requirement visible there.
- At 320 px the note and the Korean Effort placeholder may be cut short.
- The "no taller than its switch" check is loose, but the one-line
checks on the label and the note cover wrapping.

---------

Co-authored-by: fivetaku <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: devswha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ultracode as its own toggle, independent of effort (Claude Code 2.1.284+)

1 participant