Repository navigation
chore(layout): delete the dev-only layout round-trip watch - #27597
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No merge-blocking issue is established by the selected timing-data change. Pre-merge checks |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime.ts (1)
87-92: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftPreserve a write-triggered round-trip check for in-memory sessions.
The current oracle is not equivalent to the removed watcher for every covered state. The watcher checked each workspace-session write before persistence completed. The headless oracle checks only saved partitions at
oracle.step, so it can miss a pending in-memory finding and any write that is not followed by a step. Add an equivalent write-triggered check against the current session while retaining the saved-profile check.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
82b56676-5841-475c-8b68-c51826e182b0
📥 Commits
Reviewing files that changed from the base of the PR and between 8e01e6d and 56a432ecb353e1fee83dad8e278a6185a5654de1.
📒 Files selected for processing (5)
config/scripts/ci-shard-timings.jsonsrc/main/runtime/orca-runtime.tssrc/main/runtime/workspace-layout-round-trip-watch.test.tssrc/main/runtime/workspace-layout-round-trip-watch.tstests/e2e/AGENTS.md
💤 Files with no reviewable changes (4)
- src/main/runtime/workspace-layout-round-trip-watch.test.ts
- config/scripts/ci-shard-timings.json
- src/main/runtime/orca-runtime.ts
- src/main/runtime/workspace-layout-round-trip-watch.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
The layout oracle checks the saved profile's round trip at every settled step and the live layout's model rules on every published frame, which covers what this 1 s settle logger did.
56a432e to
eabdcef
Compare
ELI5
In development and test runs, the app had a small background logger that, one second after each burst of saves, re-checked the saved window layout and printed warnings. The layout test suite now does that same check itself, at every step, and fails the run when something is wrong. The logger is redundant, so this removes it.
What Changed
src/main/runtime/workspace-layout-round-trip-watch.tsand its test, plus the one call that started it inorca-runtime.ts. It only ran in development, e2e, or withORCA_LAYOUT_ROUND_TRIP_CHECK=1. It never ran in shipped builds.checkLayoutRoundTrip(src/shared/workspace-layout/workspace-layout-round-trip-check.ts), because the layout oracle (tests/e2e/helpers/workspace-layout-oracle.ts, theroundTriprecord at each settled step) and two unit tests still use it.tests/e2e/AGENTS.mdand drops the deleted test from the CI shard timings.Before: dev and e2e runs printed
[workspace-layout] round-trip check:andfirst-load changes:lines in the console, on a 1 s timer after each burst of writes. After: those lines are gone. The layout oracle runs the same check on the saved profile at every step and fails on a finding.Why
The logger only warned, and a person had to notice the warning. The oracle runs the same check and fails the run. Keeping both means two copies of one check plus a timer that does nothing in production. Deleting it also removes one of the layout env switches before the layout rework stack lands.
Linked Issue
N/A (maintainer cleanup within the terminal layout rework).
Visual Proof
N/A. Nothing changes for users: the removed code never ran in shipped builds.
Testing
pnpm tcpasses. oxlint andpnpm run check:code-quality:changedpass.vitestonsrc/shared/workspace-layout/andworkspace-layout-stream.test.ts: 196 passed.Layout oracle specs, run hidden (
ORCA_BACKGROUND_LAUNCH=1) against an--mode e2ebuild:workspace-layout-oracle.spec.tsand the orcad cases ofworkspace-layout-oracle-headless.spec.tspass. The 9 Electronorca serveheadless cases fail withTypeError: Cannot read properties of undefined (reading 'deviceToken'). They fail the same way on unmodifiedmain: the oracle helper still passes a decoded pairing offer wheresubscribeRemoteRuntimeRequestnow expects a paired connection. That is outside this PR.I manually tested these changes locally
Automated tests added/updated, or explained why not below (deleted the removed module's own test, and no new behaviour)
Agent skill upstream boundary
Notes
Deletion only, dev/e2e-only code. No effect on security, platforms, SSH, mobile, compatibility, or performance in shipped builds.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)