You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(scripts): drop comments the code can say, part 5 of 5 - #4051
Part 5 of 5 for scripts/ in the repo-wide comment pass. This part covers:
the settings, setup, sheet and sidebar demo regressions
shell-build.ts, shell-workflow-rules.ts, source-scan.ts and sheets-settled.ts
the terminal regressions from late-faces on
test-herdr.ts, test-hc.ts, test-shell.ts and typecheck.ts
the theme build scripts and ui-regression.ts
About 2,300 comment lines go. What stays:
Read by a test: every // fixed wait:.
Usage text the docs lack: the UI_EVIDENCE_DIR/--only=/case variables of the sidebar and setup regressions, SYNC_OUTPUT_REPORT, HERDR_TEST_MODE=unit.
Behaviour we cannot change:
Web Push, Google Play signing, Cloudflare Pages, Apple's site association, Vite, GitHub's workflow loading
browser history traversals, iOS and Safari input, CDP touch, xterm
herdr's socket and environment, zsh startup, the socket path limit
Every comment-only change was checked against origin/main by syntax tree. No test, workflow, script or doc reads a deleted comment.
Code changes (mechanical, no behaviour change)
scripts/shell-build.ts: the Apple team id in IOS_APP_ID is APPLE_TEAM_ID instead of a bare literal.
Rules that only a comment stated (deleted, not enforced yet)
User safety: AGENTS.md states the general rule ("Tests never touch the user's herdr session"), but nothing checks these cases.
test-herdr.ts: unit tests never discover or start herdr or fall back to the default socket, and the fallback socket is never the user's session.
test-hc.ts: the hc environment inherits nothing, and stopTestHc stops only a core with its own HC_SOCKET.
ui-regression.ts and update-browser-qa.ts each run on a herdr session of their own, never the live app.
ui-regression.ts asks no provider with this machine's own sign-ins, usage-regression.ts reads and sends no real sign-in, and usage-account-management-regression.ts uses throwaway credentials only.
The sidebar, settings and setup demo regressions rewrite only the disposable fixture, read no live herdr session, and send nothing off loopback.
skill-menu-case.ts runs the agents' loaders where this machine's own skills are never read.
setup-dialog keeps recorded notifications off the desktop.
Order:theme-first-paint-demo-regression.ts runs its two builds one after the other (shared xterm cache). typecheck.ts builds the vendor boundary first. Importing terminal-pinch-regression.ts's check must not start herdr.
Kept in step: the settings demo loops with settings-rows, the inline theme attributes with applyThemeEntry, and the Caddy /build.json header with Pages.
Left open (redesigns, not done here)
Copied settings and theme code:
The settings demos copy a one-item loop from settings-rows; it could be one helper in settings-pages-harness.ts.
sidebar-heads and sidebar-selection-contrast copy applyThemeEntry inline.
Demo transport seams:
settings-rows' defineProperty(window, "fetch") trick and setup-dialog's fetch chain need the demo transport to let tests register answers.
__ovisDemoHoldTurn is a global flag.
sidebar-activity wraps send per instance because DemoSocket's constructor returns its own object.
Unnamed numbers and timings:
sidebar-activity's scrollHeight * 3 + 2000.
terminal-pinch's unmarked Bun.sleep(400), sized to the app's 120 ms settle.
Values copied from the app:terminal-selection-cell-bg copies the app's minimumContrastRatio 4.5, and ui-regression.ts MAX_COMPOSER_CHARS copies src/lib/compose.ts (an import would load the app's modules).
source-scan.ts stripComments: cannot tell a regex literal from division.
shell-build.ts: copies Pages' /build.json CORS header into its Caddyfile.
Validation
bun run check fast: passed (18,574 unit tests, typecheck, build, generated files).
Unit tests of every touched test file and of the modules that import a touched one, all three conventions.test.ts included: 712 + 188 pass. scripts/shell-build.test.ts: 18 pass.
Not run here: the browser regressions themselves and the live herdr contract tests. CI runs them.
The last scripts/ slice of the repo-wide comment pass: the settings,
setup, sheet and sidebar demo regressions, shell-build.ts,
shell-workflow-rules.ts, source-scan.ts, the terminal regressions from
late-faces on, test-herdr.ts, test-hc.ts, test-shell.ts, typecheck.ts,
the theme build scripts and ui-regression.ts. About 2,300 comment lines
go; every `// fixed wait:`, the usage text the docs lack, and notes on
Web Push, Pages, Vite, GitHub, browser history, iOS, Safari, xterm,
herdr and zsh stay. The Apple team id in IOS_APP_ID is APPLE_TEAM_ID.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
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.
Summary
Summary by CodeRabbit
Tests
Expanded browser regression coverage for settings, setup dialogs, shortcuts, terminal interactions, sidebars, themes, todos, and update notices.
Added checks for paste and insert behavior, terminal scrolling and gestures, viewport layout, and release-notes display.
Documentation
Removed explanatory comments from test scripts and supporting utilities. These changes do not alter the documented features or application behavior.
The pull request removes explanatory comments from many scripts and regression checks. It also adds or adjusts selected checks for Settings, setup dialogs, shortcuts, terminal interactions, todo snapshots, and update notices. Most implementation changes are limited to test scripts.
Changes: Regression scripts and supporting helpers
Layer / File(s)
Summary
Comment cleanup and regression check updates scripts/*
Comments were removed or shortened across Settings, setup, sidebar, skill-menu, shell, terminal, theme, UI, update, and usage scripts. Several scripts also add or adjust browser assertions, test cases, fixture behavior, and evidence captures.
Settings and setup checks scripts/settings-*-regression.ts, scripts/setup-*-regression.ts
Settings checks add installed release-notes coverage. Setup-dialog checks retain or extend browser coverage for guide navigation, themes, notifications, telemetry, usage, relays, and pairing codes. Most documented scenario changes describe existing assertions whose executable logic remains unchanged.
Terminal, shortcut, and UI checks scripts/terminal-*-regression.ts, scripts/shortcut-exact-modifiers-demo-regression.ts, scripts/ui-regression.ts
Terminal checks add or adjust assertions for pinch swipes, Paste and Insert acknowledgement and reconnect cases, viewport paging and metrics, and touch-burst evidence. Shortcut and UI checks add assertions for shortcut handling while editing a message.
Sidebar and todo checks scripts/sidebar-*-regression.ts, scripts/todo-snapshots-demo-regression.ts
Sidebar checks mostly retain their existing assertions while removing explanations; the agent-tree script removes duplicated setup and checks. Todo snapshot checks add narration and observe-only coverage.
This change mostly removes comments from scripts and moves the iOS team ID into a shared constant without changing its value. It is unlikely to affect users or production behavior. The browser regressions were not run locally, but CI covers them.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "refactor(scripts): drop comments the code can say, part 5 of 5" matches the changeset, which removes comment lines across scripts/ files and makes one small code change (IOS_APP_ID uses APP…
Description check
The description follows the repository's template in substance. It covers the change (What), with scope, the one code change, and the rules that only comments stated. It also covers validation with co…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "refactor(scripts): drop comments the code can say, part 5 of 5" matches the changeset, which removes comment lines across scripts/ files and makes one small code change (IOS_APP_ID uses APPLE_TEAM_ID). It names the main change, though the 'part 5 of 5' suffix adds series context rather than content.
Full details: Description check
Explanation
The description follows the repository's template in substance. It covers the change (What), with scope, the one code change, and the rules that only comments stated. It also covers validation with commands and results, and it states which browser regressions and live herdr contract tests were not run. The template's HTML comment about CONTRIBUTING.md, changelog.d/ and the changelog is not addressed, and it does not mention a changelog entry. This is a minor gap.
Finishing Touches
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.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
Merged head 47ef00779892 as 16e66c43dc47 on GitHub's checks, with no unresolved review threads.
Reviewer
Verdict
Note
machine-proof
CLEAR
rule3
CLEAR
The owner's refactor (scripts, part 5 of 5), merged by the merge pass on his word under rule 3. A machine proof removed comments and compared the merge base with the owner's head: 98 of the 99 files are identical. The one that differs, scripts/shell-build.ts, names the Apple team id (APPLE_TEAM_ID); a fresh reviewer and Codex found IOS_APP_ID still 5987KT43TJ.sh.ovis.app and the same 16 exports.
The deleted comments were searched for the five kinds the owner keeps (434 distinct hit lines); a fresh reviewer kept 31 blocks, put back word for word by the merge pass's worker: the guards in scripts/test-herdr.ts that keep unit tests off the user's own herdr socket, the workflow rules on which jobs must never reach a self-hosted runner and which actions a job holding the Cloudflare token may use, Safari and Linux IME event orders, the xterm, herdr and WebKit facts behind two terminal checks, and measured timings.
…4085)
## What
#4051 (`scripts/`, part 5 of 5) was part of the repo-wide comment pass
and merged before the owner's rule for comment-removal PRs: security
notes, platform facts, measured values, third-party attribution, Rust
SAFETY notes and traps that name a concrete breakage stay. This PR puts
back what it dropped of those, word for word where the code is
unchanged, on today's `main`.
How the notes were picked: a Codex adversarial review (gpt-6.2-sol,
reasoning high) of the merged commit against its parent listed every
deleted comment it took for a kept kind; each finding was checked
against the code before the pass and today's file, and put back only
when it is one of those kinds. A trap came back only when it names what
the obvious change would break. Notes whose code has since moved sit on
that code now; notes whose code is gone, or that are no longer true,
stay out.
Comments only: no code changes. The refactor-merge kit's `proof.sh`
checks that every file is identical once comments are removed; lint
directives (which it counts as code) stay out.
## Details
### Lines restored per kind (approximate; a mixed block is counted under
its main kind)
| Kind | Findings accepted | Lines |
|---|---|---|
| Security | 112 | ~241 |
| Platform fact | 66 (+1 not flagged: omo 5.1.34's descriptions) | ~140
|
| Measured value | 11 | ~18 |
| Trap (names a concrete breakage), incl. cut sentences | 57 (+1 not
flagged: sidebar-tokens' 30 s re-read would drop the rows) | ~126 |
| Non-prose, attribution, SAFETY | 0 | 0 |
| **Total** | **246** | **525** |
Mixed blocks were trimmed to the kept sentences, which were reflowed
where a sentence began mid-line (the loopback/fixture-isolation
sentences, sheets-settled, source-scan, sidebar-filter `pressClear`,
touch-burst's contract and boundaries, theme-first-paint's header, the
`checkStatuslineSwitch` and `checkUpdateNotice` docs). The settings-rows
account-PC note sat in a misplaced stack of docs at P; it now sits on
`accountPcList`, and shell-build's `index.html as the shell` doc on
`shellIndexHtml`.
### Declined, rejected, skipped
- 10 trap findings declined (design reason, describes the code, or a
race with no named breakage): settings-palette-search "no screenshot
comes first here to make it"; settings-rows the fetch getter/setter
wrapper; settings-segmented "a pass that read none is not taken for a
sound one"; sidebar-activity "A requested jump is not proof ...";
sidebar-filter "endless ones (a spinner) are not waited on";
terminal-served-font header (the property under test);
terminal-sync-output "written whole before the producer can see it";
terminal-viewport "rather than racing an attach resize with pane.scroll"
and "no-jump refresh must never be sent"; ui-regression "Use a new pane
so this bridge never competes ...".
- 3 rejected as covered by a restored note in the same file:
setup-dialog header ("notifications recorded, none reach the desktop",
restored at the stub, line 105), sidebar-declutter header (the watching
device's dimmed +, restored on `loneHostWatching`), sidebar-heads header
("never a live herdr session", the fixture-only note at line 23
restored).
- 7 PR-body findings left alone (sidebar-heads:11, sidebar-split:5,
terminal-pinch:292, test-hc.test:16, test-hc:8, test-hc:21,
test-herdr:94); 2 LOW findings left alone (settings-pages:305,
ui-regression:82).
- 0 already on main.
### Security notes put back (file, a few words)
- loopback-only / no herdr session / fixture-only: settings-pages,
settings-palette-search, settings-rows, settings-segmented,
sidebar-activity, sidebar-agent-tree, sidebar-background-workspaces,
sidebar-branch-line, sidebar-context-ring, sidebar-declutter,
sidebar-filter, sidebar-heads, sidebar-peek, sidebar-spacing,
sidebar-split, sidebar-tokens (and markup that must stay text),
skill-activity-browser-qa, terminal-paste-insert-demo-run, theme-file,
theme-first-paint (served with the app's CSP), todo-snapshots,
touch-long-press, update-browser-qa, update-notice ("nothing is
installed"), usage-account-management ("only disposable credentials"),
usage-regression ("no real sign-in is read or sent")
- test-herdr: tests talk to their own herdr, HERDR_TEST_LIVE=1 escape
hatch; no test runs `ssh -G`; an old test server with the user's agents
on PATH is restarted. test-hc: no inherited HC_*/HOME/XDG_*; stops only
its own core. test-hc.test: no real core started or stopped.
ui-regression / update-browser-qa: "a herdr session of its own"
- skill-menu-case: the demo cwd and a home that does not exist, so none
of this machine's skills
- settings-rows: sign-in fixture in IndexedDB, nothing reaches
GitHub/Google/account.ovis.sh; the PC's server names the account
service; the page cannot tell whether the browser is paired; Remove on
every sign-in but the one in use
- setup-dialog: notifications recorded, not shown; permission asked only
on Turn on alerts; telemetry consent only when the line is wholly in
view and uncovered, a covered line makes no attempt, Turn off is every
copy's; opening the guide reads and sends nothing; a fresh relay offer
with the PC's current code; a way picked during relay start could spend
that way's pairing code; pairing code expiry and New code on a press; a
store QR uses no pairing code; the PC keeps one pairing code
- shell-build: per-PC scope, service worker and push subscription;
`_headers` carries the PC server's policy; account service only over
https, none when off; `/build.json` CORS as Pages answers it; the
shell's and render host's policies and caching. shell-build.test:
anything but `scripts: true` runs no scripts
- shell-workflow-rules: a term inside `||` does not hold alone; workflow
files GitHub loads under other spellings or symlinks; expression
interpolation and env/PATH handoff; background processes past their
step; where the Cloudflare secrets reach; install scripts with a cache
save; what the unpack step must refuse, each with its right SHA-256
- terminal-paste-insert-demo-run: Paste reads the clipboard from its tap
alone and drops a read for another target, nothing runs until an
explicit Enter; Insert takes no resize, focus or take-over; an
unconfirmed insert is never sent again; no Paste/Insert at a password
prompt or on a view-only connection
- terminal-safari-ime: input refused until the probe's pong; text
committed where it may not go is gone; dictation while observing
refused; a lost attachment's draft goes only on Send, once; a phrase
while not ready or while the ping is out goes to the draft; a pane
switch delivers a pending phrase to neither pane
- terminal-touch-burst-run: nothing sent after any boundary, no observer
input, no takeover; nothing of a swipe after a boundary to either pane;
an observer's swipe sends the pane nothing
- terminal-view-replay: a replayed view answers no query and writes no
clipboard. terminal-viewport: paging never reaches the program's input.
terminal-switch: a hidden tab holds no attach and so no input.
terminal-served-font: the font list is refused while signed out.
terminal-selection-cell-bg and terminal-sync-output: the app's CSP
refuses a data: URL / is bypassed for the frame generator
- text-file-edit: a file changed on the PC is not overwritten, a
read-only one says so. unconfirmed-input: nothing sent on its own after
a reconnect, held text that looks like a key never stored.
theme-bootstrap-build: an inline boot script is refused by `script-src
'self'`
- ui-regression: no provider asked with the machine's sign-ins;
automatic queue delivery is opt-in; the CSP under test is the server's
own; Ctrl+V could trigger image paste against the server's clipboard;
in-app alerts before the permission answer; readiness only from the new
connection; held copies come back for an explicit Send now only; a typed
pick waits for Confirm and does not return; an explicit hold survives
navigation; local access offers no sign-out; only the sign-out request
fails, health keeps the real cookie
- usage-regression: Claude's settings answered here, never by the test
server; no sign-in sent while off; a recorded account is no sign-in of
Claude Code; removing one forgets a list entry, not a sign-in; only
on/off is sent; only this PC's expired sign-in can sign in again, by the
account's key; a watching device signs in to nothing
## Validation
- `bun run check fast`: passed (18,593 unit tests, typecheck, build,
generated themes and types).
- `proof.sh` (comments only), `ready.sh` (required checks, threads,
CodeRabbit, main) before the merge.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <[email protected]>
maslianok
added a commit
to maslianok/ovis
that referenced
this pull request
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 5 of 5 for
scripts/in the repo-wide comment pass. This part covers:shell-build.ts,shell-workflow-rules.ts,source-scan.tsandsheets-settled.tstest-herdr.ts,test-hc.ts,test-shell.tsandtypecheck.tsui-regression.tsAbout 2,300 comment lines go. What stays:
// fixed wait:.UI_EVIDENCE_DIR/--only=/case variables of the sidebar and setup regressions,SYNC_OUTPUT_REPORT,HERDR_TEST_MODE=unit.Every comment-only change was checked against
origin/mainby syntax tree. No test, workflow, script or doc reads a deleted comment.Code changes (mechanical, no behaviour change)
scripts/shell-build.ts: the Apple team id inIOS_APP_IDisAPPLE_TEAM_IDinstead of a bare literal.Rules that only a comment stated (deleted, not enforced yet)
test-herdr.ts: unit tests never discover or start herdr or fall back to the default socket, and the fallback socket is never the user's session.test-hc.ts: the hc environment inherits nothing, andstopTestHcstops only a core with its ownHC_SOCKET.ui-regression.tsandupdate-browser-qa.tseach run on a herdr session of their own, never the live app.ui-regression.tsasks no provider with this machine's own sign-ins,usage-regression.tsreads and sends no real sign-in, andusage-account-management-regression.tsuses throwaway credentials only.skill-menu-case.tsruns the agents' loaders where this machine's own skills are never read.setup-dialogkeeps recorded notifications off the desktop.theme-first-paint-demo-regression.tsruns its two builds one after the other (shared xterm cache).typecheck.tsbuilds the vendor boundary first. Importingterminal-pinch-regression.ts's check must not start herdr.settings-rows, the inline theme attributes withapplyThemeEntry, and the Caddy/build.jsonheader with Pages.Left open (redesigns, not done here)
settings-rows; it could be one helper insettings-pages-harness.ts.sidebar-headsandsidebar-selection-contrastcopyapplyThemeEntryinline.settings-rows'defineProperty(window, "fetch")trick andsetup-dialog's fetch chain need the demo transport to let tests register answers.__ovisDemoHoldTurnis a global flag.sidebar-activitywrapssendper instance becauseDemoSocket's constructor returns its own object.sidebar-activity'sscrollHeight * 3 + 2000.terminal-pinch's unmarkedBun.sleep(400), sized to the app's 120 ms settle.terminal-touch-burstrepeatstouchFling's release rule.terminal-selection-cell-bgcopies the app'sminimumContrastRatio4.5, andui-regression.ts MAX_COMPOSER_CHARScopiessrc/lib/compose.ts(an import would load the app's modules).source-scan.ts stripComments: cannot tell a regex literal from division.shell-build.ts: copies Pages'/build.jsonCORS header into its Caddyfile.Validation
bun run check fast: passed (18,574 unit tests, typecheck, build, generated files).conventions.test.tsincluded: 712 + 188 pass.scripts/shell-build.test.ts: 18 pass.🤖 Generated with Claude Code