Align Studio CI contracts with the tightened Debugger chrome
Traceability
- Spec ID: studio-ci-chrome-contracts
- Status: Implemented
Intent
Main is red because Studio browser tests still describe the pre-unification chrome, and the ACP host fails cargo fmt --check on two lines added with the diagnostics work. Bring those CI contracts onto the chrome and formatting that already shipped, without restoring retired labels or collapsing the composer stylesheet back into workbench.
Acceptance Scenarios
- AC-1: The Studio layout contract counts the four owned
/assets/*.csssheets linked fromindex.html(tokens.css,shell.css,workbench.css,live-composer.css). Adding a fifth sheet still fails the contract. - AC-2: Theme contrast is measured from a primary-fill control that exists on every Studio view:
button.primary,button.new-run, or the selected sidebar View. A missing node must not throwgetComputedStyleonnull. - AC-3: After opening Debugger on a discovered Project, the status bar names that Project and the title-bar action is
New live run. The retired concatenated harness label is not required. - AC-4:
cargo fmt --checkforharness-acp-hostis clean onconnection.rsandservices.rs. - AC-5: At the compact 1024px Debugger layout, the session notebook is at least half the grid width, so live trial evidence stays the primary pane.
- AC-6: Studio server tests retry Windows
EBUSY/EPERMtemp-dir removal after an ACP Agent run, instead of failing teardown while the child still holds its cwd.
Non-goals
- Restoring Overview, Inputs, or the concatenated
Project default · Qoder · fixture-projectchrome. - Merging
live-composer.cssintoworkbench.css. - Changing theme tokens, ACP handshake behavior, or the live-run dialog.
Plan and Tasks
- Format the two ACP host hunks the way rustfmt 1.96 wraps them.
- Name the four owned stylesheets in
assertRenderedContract. - Guard the contrast helper with a selector that matches current chrome.
- Point the Debugger workspace assertion at
.studio-status-barandNew live run. - Shrink the default tree and inspector pane widths so a 1024px overlay layout still leaves the notebook at least half the grid.
- Retry
rminserver.test.tsteardown for Windows lock codes.
Test and Review Evidence
- AC-1/AC-2/AC-3/AC-5: Playwright
packages/harness-studio/test/browser/tool-call.spec.mjslayout tests andpackages/harness-studio/test/browser/artifact-host.spec.mjstheme and workspace tests. Full Studio browser suite: 65 passed. - AC-4:
cargo fmt --checkinpackages/better-harness-desktop/rust/acp-host. - AC-6:
test/server.test.tsteardown retriesEBUSY/EPERM/ENOTEMPTYfor up to 5s afterclose(). - Risk: relaxing the stylesheet count to an un-named integer would hide a fifth sheet. Named filenames keep the original gate.
- Risk: a probe-only contrast check would pass with no on-screen primary fill. Measuring the selected View row covers the landing surface at 375px.