Repository navigation
feat(web): show Runtime settings and Create local agent as setting rows - #782
Conversation
There was a problem hiding this comment.
Approve with nits (2 P2, 1 P3)
Scope: base main at merge base 29ad855e; 1 commit, 10 files reviewed (dialog, tests, messages, zh-CN catalog, runtime-logo.tsx and 4 SVGs). Helper skills loaded: coderbook, ponytail-review, karpathy-guidelines. Ran in a separate session.
Findings
P2
1. Arrow keys commit a choice and collapse the row (apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx:864, with the closing calls at :245, :287, :321)
The options are native radios that share a name. In a native radio group, ArrowUp/ArrowDown moves the checked state and fires change, so React's onChange runs on every arrow press. Each Computer, Runtime and Model onChange calls selection.select* and then setOpenRow(undefined).
- Example: a keyboard user opens the Runtime row, tabs to the checked "Claude Code" radio and presses ArrowDown to look at the next option. That immediately selects "Codex", which also resets the model, and closes the row. The focused radio is unmounted, so focus falls out of the list. To reach the third option they have to reopen the row and press the arrow key again, changing the selection each time.
- The old
Selectlet them browse options before committing. Mouse users and thefireEvent.clicktests don't hit this. - Fix: close the row only on a pointer click or Enter/Space, not on every
change. Or keep the row open after a change, as Reasoning already does, and return focus to the row button when it closes. Add a test that sendsArrowDownto the radio group.
2. StatusDot duplicates the existing shared component (apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx:680-696)
apps/web/src/features/local-computer/computer-row.tsx:11 already exports StatusDot({ tone: "neutral" | "success" | "warning" }), and the Computers pages already use it. The new copy:
- adds its own
StatusTonetype (ok/off/warn); - adds a
statusDotClassmap; - uses arbitrary
bg-[var(--app-status-success-text)]/bg-[var(--app-status-warning-text)]classes instead of thebg-app-success/bg-app-warningtoken classes thatapps/web/AGENTS.mdasks for; - uses a 7px size where the existing dot is
size-1.5.
Fix: import StatusDot from @/features/local-computer/computer-row, map ok→success, warn→warning, off→neutral, and delete the local type, map and component.
P3
3. Conditional class names are built with template strings (apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx:767, :773, :785)
SettingRow builds classes like `... ${expanded ? "bg-accent" : ""}`. apps/web/AGENTS.md says to compose conditional class names with cn from src/lib/cn.ts.
Verified as fine
- Locking is the same as before. Computer and Runtime rows use
disabled={placementLocked}, whereplacementLocked = field === "model" || field === "reasoning"(edit-agent-runtime-dialog.tsx:127). The Model row usesdisabled={field === "reasoning"}. The Reasoning row is disabled when no efforts are allowed, which matches the old disabledSelectshowing the saved unavailable effort. - Initial open row: both callers mount the dialog only while it is open (
actor-profile.tsx:561,direct-agent-model-switch.tsx:107). SouseState(field)gets a freshfieldon every open.SettingRowtreatsopen && !disabledas expanded, so a locked row that the dialog was opened from never shows its panel. - The unavailable saved model is still a disabled, checked option. Upgrade-required computers are still disabled, and offline computers are still selectable (
edit-agent-runtime-dialog.tsx:250). ReasoningRow'ssavedUnavailableEffort!is guarded by the early return when neitherallowednorsavedUnavailableEffortis present.- Removed message keys (
computerOnline*,runtimeNotReady) have no other users inapps/web/src.zh-CN.jsonis the only catalog and is updated to match. No CJK outside the locale catalog, and the commit message is English. - Logos: these are static same-origin SVGs loaded via
<img alt="">, so no script can run.pi.svg'scurrentColorrenders black inside<img>, and that is fine because the app is light-only (src/app/visual-theme.css:4setscolor-scheme: light). - No new dependencies.
@hugeicons/core-free-iconsis already used and is the mandated icon set.
Process notes
- Single commit. The branch is up to date with
main(0 commits behind). The merge state shows BLOCKED only on required review.
CI
All checks that ran pass: web tests (1/2, 2/2), web-static, check (web), repository-gate, CodeQL. The non-web checks were skipped by the path plan. I ran no tests locally. The keyboard finding comes from how native radio groups handle arrow keys, and the existing tests don't exercise it.
Automated review by Claude Code
Automated review of 66ffdfc by Claude Code.
There was a problem hiding this comment.
Approve with nits (0 new findings; 3 previous findings still open: 2 P2, 1 P3)
Scope: follow-up on 66ffdfc, reviewing head d627ee4 against main (merge base 29ad855e). 4 commits and 10 files reviewed; the new changes since the previous review touch only edit-agent-runtime-dialog.tsx. Skills: the linger-pr-review recipe was followed; coderbook, ponytail-review and karpathy-guidelines were not loaded separately. Run in a separate session.
Previous findings
- P2: arrow keys select a radio and collapse the row (
edit-agent-runtime-dialog.tsx). Not resolved. The Computer, Runtime and ModelonChangehandlers still callsetOpenRow(undefined)(lines 239–242, 280–283, 313–316). A native radio fireschangeon ArrowDown/ArrowUp, so a keyboard user who moves through the list commits the neighbouring option, the row collapses, and the focused radio unmounts. - P2:
StatusDotduplicates the existing component. Not resolved.edit-agent-runtime-dialog.tsx:682still defines its ownStatusDotwith rawbg-[var(--app-status-…)]classes, whileapps/web/src/features/local-computer/computer-row.tsx:11already exports one. - P3: conditional
classNamenot built withcn. Not resolved.SettingRowstill uses template strings atedit-agent-runtime-dialog.tsx:768and:779, andStatusDotdoes the same at:686.
Findings
No new findings.
Verified as fine
- The setting-row icons were removed cleanly. The
iconprop and theIconSvgElementimport are gone, and theCommandLineIcon,Idea01IconandSparklesIconimports went with them.LaptopIconis still used for the computer options (edit-agent-runtime-dialog.tsx:248). - With the icon column gone, the
pl-[52px]indent was also dropped from the expanded panel (:785) and from the "manage models" hint (:348). Panel and hint content still line up with the row. min-w-0on the<fieldset>(:210) stops the fieldset from growing to its content's min-content width. Long model names now truncate inside the rows instead of widening the dialog. The dialog size ended up back at its original value (the net diff since66ffdfchas no size change).- No CJK in added lines outside the locale catalogs. The
·separators are U+00B7, andrepository-gatepassed.
Process notes
- The branch is 12 commits behind
main.mainrequires up-to-date branches, so it needs a rebase. b88bdc38(narrow width) and49bc3bcd(back to the original width) cancel out apart frommin-w-0.d627ee4fremoves icons that66ffdfcadded in this same PR. Sincemaintakes rebase merges, these three fix-ups should be squashed into66ffdfc(git rebase -i --autosquash).
CI
All relevant checks pass: check (web), web tests (1/2), web tests (2/2), web-static, repository-gate and CodeQL. Checks for other apps were skipped as not applicable. I ran no tests locally.
Automated review by Claude Code
Automated review of d627ee4 by Claude Code.
There was a problem hiding this comment.
Approve with nits (1 P2, 1 P3)
Scope: follow-up on d627ee4, reviewing head 45a5c88 against main (merge base 29ad855e). Reviewed 5 commits and 13 files, with a focus on the new commit 45a5c88, which touches 4 files. Loaded coderbook. I did not load ponytail-review or karpathy-guidelines and applied their checklists from memory. This ran in a separate session.
Previous findings
The previous review (d627ee4) reported no findings, so there is nothing to track.
Findings
P2
apps/web/src/features/rooms/quick-create-local-agent-dialog.tsx:202: In Create local agent, the Runtime option list now shows each Runtime's status. For Pi withauthentication_required, it usespiAuthRequiredStatusMessage(piModelsState)(line ~471). ButlocalModelsonly loads when the selected Runtime is Pi and needs authentication (selectedRuntime?.type === "pi" && selectedRuntime.status === "authentication_required").- Failure scenario: a computer has Claude Code ready (selected by default) and Pi needs authentication because it has no local model.
localModels.datais undefined, soclassifyPiLocalModelsStatereturnsunknown, and the Pi option reads "Sign-in required" instead of "Model needed", "Downloading model" or "Loading model". The user is pointed at the wrong fix. Before this commit the dropdown showed no status, so this is new. - Runtime settings already handles this case:
edit-agent-runtime-dialog.tsx:105-121turns the query on when any Pi on the computer isauthentication_required(piAuthRequiredOnComputer). - Fix: use the same condition here. Only the
!setupOpenguard needs to stay specific to this dialog.
- Failure scenario: a computer has Claude Code ready (selected by default) and Pi needs authentication because it has no local model.
P3
- PR description: commit
45a5c88also rebuilds Create local agent from the shared setting rows, moves "Connect a new computer" into the open Computer row, and rewritesquick-create-general-agent-page.test.tsx. The PR body and its Tests section still describe only the Runtime settings dialog. Please add the Create local agent change so reviewers and history reflect the user-visible change.
Verified as fine
- The new shared module
runtime-setting-rows.tsxis a move, not a fork.StatusDot,ComputerStatus,Placeholder,SettingRow,OptionList/OptionRowandEffortSegmentswere deleted fromedit-agent-runtime-dialog.tsx(diffd627ee4..45a5c88, the removed block afterRuntimeSetupGuidance). That dialog now imports them (edit-agent-runtime-dialog.tsx:48-56), andModelHeadingreplaces the inline heading markup, so there is no second copy. - Create local agent keeps its state resets. Choosing a computer still goes through
selectComputer. Choosing a Runtime clears the model and effort, and choosing a model clears the effort (quick-create-local-agent-dialog.tsxOptionListonChangehandlers). Each choice also closes its row. - Computers that need an upgrade are still excluded from Create local agent's choices (
quick-create-local-agent-dialog.tsx:131-136). The offline hint and the Pi "manage models" hint still render under their rows. - Disabled rows (no Runtimes, no models, no efforts) do not expand:
SettingRowgatesexpandedon!disabled(runtime-setting-rows.tsx:120). - No Chinese in added code, comments or commit messages. The only matches are in
apps/web/src/i18n/locales/zh-CN.json, which is allowed.
Process notes
b88bdc38("keep Runtime settings at the narrow dialog width") and49bc3bcd("keep ... as wide as the other Agent edit dialogs") undo each other.d627ee4falso only patches66ffdfcb.maintakes rebase merges, so consider squashing these into66ffdfcb(git rebase -i --autosquash).- The branch has no merge commits.
mergeStateStatusis BLOCKED, which most likely means it is waiting on review approval.
CI
All checks that ran passed: check (web), web tests (1/2), web tests (2/2), web-static, repository-gate, CodeQL. The other app checks were skipped because their paths are unchanged. I ran no tests myself; the finding comes from reading the code.
Automated review by Claude Code
Automated review of 45a5c88 by Claude Code.
Both dialogs lead with the model and list Computer, Runtime, Model and Reasoning as rows that open in place onto their choices: computers with their connection, Runtimes with their own logos and readiness, the models, and Reasoning as a segmented control. The rows live in one shared module. Runtime settings opens on the row it was started from; Create local agent keeps Connect a new computer under the open Computer row. Pi's local models load whenever Pi waits on them, so its status reads right while another Runtime is chosen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45a5c88 to
66f27f7
Compare
The model heading repeated the Model row, so it goes. An open row and its choices share one tinted block, the chosen one on white, and each choice is one line with its status at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
showModal focuses the close button, and moving focus on from it marked the first control as keyboard focus, so rows and fields showed a focus ring or fill on every open. Initial focus now lands without the indicator, which appears once the person uses the keyboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Choices and the Reasoning control start where a row's value does, so a logo sits under the logo above and the ticks line up with the chevrons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approve with nits (1 P2, 1 P3)
Scope: base main, merge base 1c35212b, 6 commits, 14 files reviewed. Follow-up on 45a5c88. The branch was rebased since then, so I compared the two versions with git range-diff. Helper skills loaded: coderbook, ponytail-review, karpathy-guidelines. This review ran in a separate session.
Previous findings
- Resolved: Pi status could read wrong in the create dialog.
quick-create-local-agent-dialog.tsx:192-201now loads local models whenever any Pi on the selected computer isauthentication_required. The test plan adds the "Model needed while Codex is chosen" case. - Resolved: the PR description left out the Create local agent redesign. The body now has a Create local agent section.
Findings
P2
apps/web/src/components/ui/modal-dialog.tsx:103-117: the PR description no longer matches the code.- The Summary says "Both now lead with the model", but
fbd9fd8eremovedModelHeading("The model heading repeated the Model row, so it goes"). Neither dialog has a model heading now. 61f04167changes initial focus in the sharedModalDialog, so it affects every dialog in the app, not only these two. It blurs the close button and then callsfocus({ focusVisible: false }). The description doesn't mention this.- Effect: reviewers and release notes see a narrower change than the one that ships.
- Fix: update the Summary. Drop the "lead with the model" line and add a line on the dialog-wide focus change.
- The Summary says "Both now lead with the model", but
P3
apps/web/src/features/rooms/create-agent.messages.ts:21:createAgentMessages.offlineComputer("{name} · Offline") has no callers now.- Its only caller was the old
<SelectItem>inquick-create-local-agent-dialog.tsx, and offline status now comes fromComputerStatus. - Fix: delete the key and its translation at
apps/web/src/i18n/locales/zh-CN.json:149. This PR already removed theagentRuntimekeys it made unused.
- Its only caller was the old
Verified as fine
- Computer choices: upgrade-required computers stay disabled in Runtime settings (
edit-agent-runtime-dialog.tsx,disabled: item.upgrade_requiredpassed toOptionList→<input disabled>inruntime-setting-rows.tsx). Offline computers stay selectable. - Unavailable saved model: it still shows as a disabled first option, and the row value uses the same
unavailableOptiontext. - Reasoning: when the model's efforts can't be read, the row is disabled and still shows the saved effort as unavailable (
ReasoningRow,disabled={!available}). - Locking: opening from Reasoning locks the Model row (
disabled={field === "reasoning"}).placementLockedstill locks Computer and Runtime. When a row is disabled,SettingRowkeeps it closed (expanded = open && !disabled), even if it was the row the dialog opened on. - Create dialog state resets: choosing a Runtime still clears the model and effort; choosing a model still clears the effort. "Connect a new computer" closes the open row before it opens setup.
- ModalDialog fallback: when the body and footer have nothing focusable, focus goes back to the close button, as before (
modal-dialog.tsx:110-113). Browsers that ignorefocusVisiblestill move focus correctly. - Assets and text: the runtime logos are static SVG imports with
alt=""next to a visible name. The only CJK added is inzh-CN.json, which is allowed. No commit message contains Chinese.
Process notes
- Several
style(web)commits patch earlier commits in this same PR; for example,4bca761bremoves the tinted block thatfbd9fd8eadded.maintakes rebase merges, so consider squashing them into66f27f73(git rebase -i --autosquash).
CI
All required checks pass: check (web), web tests (1/2, 2/2), web-static, repository-gate, CodeQL. Checks for the other apps were skipped because this PR doesn't touch them. I didn't run any tests myself.
Automated review by Claude Code
Automated review of 3705f66 by Claude Code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approve (0 findings)
Follow-up on 3705f66. Merge base 1c35212b, 7 commits, 15 files reviewed; one commit since the previous review.
Previous findings
- Resolved: PR description out of date. The body no longer mentions the model heading and now has an "Every dialog: initial focus without a ring" section for
apps/web/src/components/ui/modal-dialog.tsx:103. - Resolved: unused
offlineComputerlabel.7c07a6efremoves it fromcreate-agent.messages.tsandzh-CN.json, andgit grepfinds no references left.
Verified as fine
- Initial dialog focus: the close button gives up focus (
blur()) before the target takes it withfocus({ focusVisible: false }). When neither the body nor the footer has a focusable control, focus falls back to the close button itself (modal-dialog.tsx:107-116). Dialogs whose content already holds focus skip this branch. - Upgrade-required computers stay out of reach as before. Create leaves them out of the list (
quick-create-local-agent-dialog.tsx:120-125). Runtime settings shows them disabled (edit-agent-runtime-dialog.tsx:241). - Pi's local models now load whenever any Pi runtime on the selected computer is
authentication_required, which is what the Runtime list's Pi status needs (quick-create-local-agent-dialog.tsx:190-201).
Process notes
- The branch is 7 commits behind
main.mainrequires up-to-date branches, so it needs a rebase.
CI
web tests (1/2, 2/2),web-staticandrepository-gatewere still pending at review time.changespassed, and the other jobs were skipped because nothing they cover changed. I ran no tests myself.
Automated review by Claude Code
Automated review of 7c07a6e by Claude Code.
Summary
Runtime settings and Create local agent were four identical dropdowns each, so they read like forms and hid every choice behind a click. Both now list the settings as rows that open in place, built from one shared module (
members/runtime-setting-rows.tsx). An open row's choices line up under the value column, one line each with the status at the end and a tick on the chosen one:One row is open at a time. Choosing a computer, Runtime or model closes its row; Reasoning stays open so efforts can be compared. Options are native radios in labelled radio groups, named by their label, with the status as the description.
The Runtime logos (Claude Code, Codex, Pi, Antigravity) are bundled SVGs under
features/local-computer/runtime-logos/.Every dialog: initial focus without a ring.
ModalDialogletsshowModalfocus the close button and then moves focus to the first control in the body. Because focus moved on from a focused control, Chromium marked the new one as keyboard focus, so the first field, select or row of every dialog showed its focus ring or fill on open. Initial focus now lands withfocus({ focusVisible: false }), and the close button lets go first when nothing else can take focus. The indicator appears once the person uses the keyboard. Browsers withoutfocusVisibleignore the option and behave as before.Not in this change
The model label still comes from the daemon as one string (for Claude, the catalog's display name joined with the resolved model). A follow-up can send the resolved model as its own field so the dialog shows them separately.
Tests
edit-agent-runtime-dialog.test.tsx,quick-create-general-agent-page.test.tsx, and the dialog step ofdirect-agent-model-switch.test.tsxnow drive the rows and radios. Saved payloads, Save/Create state, hints, alerts and setup guidance assert the same as before. The dropdown-dismissal test became a test that one row opens at a time.make check-webpasses: typecheck, lint, all tests, and React Doctor (rerun after the sharedModalDialogchange).🤖 Generated with Claude Code