Repository navigation
cmux NEXT: the agent pane ships every stylesheet it imports, listed from the imports (base red) - #24161
cmux NEXT: the agent pane ships every stylesheet it imports, listed from the imports (base red)#24161teamleaderleo wants to merge 6 commits into
Conversation
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Bead |
328523c to
ea2d75d
Compare
|
Found 58 test failures on Blacksmith runners: Failures
...and 48 more test failures. View all on Blacksmith: run 39785809015, run 39785808836, run 39785808978
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: Gallery before/after for |
The page build writes its <style> from a hand-kept sheet list, and each new CSS import (ContextSection.css, then ui/wave.css) stopped the web step and every fleet app build. This asks bundle.mjs for the list from the imports (--page-styles), in cascade order, and checks the page carries each sheet. Red on feat-cmux-next fbcb3d3: the list is sorted, has no page-level sheets, and pageStyles.ts does not exist. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom the imports
build-agent-pane-web.sh wrote the page's <style> from a hand-kept list and
refused any imported sheet the list missed, so each new CSS import stopped
the web step and every fleet app build ("the agent pane imports
webviews/src/ui/wave.css but build-agent-pane-web.sh does not add it to the
page's styles"; ContextSection.css before it).
bundle.mjs --css-inputs now lists the sheets in the order the page applies
them: the import graph of acpmux/pageStyles.ts (the page's own sheets, the
old list's order) and then main.tsx, as esbuild orders a CSS bundle. The
script writes the <style> from that list, drops a sheet's @import of a
sibling (the sibling ships ahead of it), and still checks every listed
sheet ships. dev.tsx and the gallery load pageStyles.ts, so dev, gallery
and app share one order.
The page is byte-identical to the old list plus wave.css, except that
wave.css lands after the listed sheets instead of after glass.css.
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…siblings Review (codex xhigh) found two gaps. The page guard only caught @import at column 0, so an indented or conditioned one stayed in the <style>, where the browser drops it; it now refuses any @import outside comments, and the sibling strip allows leading whitespace. The gallery listed only pageStyles.ts's direct imports, so an edit to git.css (which changes.css @imports) neither reloaded the gallery's pane sheet nor marked pane entries touched; agentPaneStylesheets now puts each sheet after the siblings it @imports, as the page does, and the test compares the lists unfiltered. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ea2d75d to
934d72b
Compare
Review (codex xhigh): CSS keywords ignore case, so "@import \"./print.css\" print;" got past the case-sensitive guard and its sheet would ship without its condition. The guard, the sibling strip, the gallery's sibling regex and the test now ignore case. Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (codex xhigh, correctness first): SHIP at c3184d5 Codex (xhigh) reviewed the diff over three rounds:
At this head the whole agent pane output is byte-identical to the base build, and an appended |
|
|
|
|
|
|
|
|
|
|
|
|
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Orphaned: no activity for 12 h, and no lane holds a lease on it. The orphan sweep could not merge |
|
Review (codex gpt-6-astra xhigh, next-review): BLOCK at adc7fa6
|
|
Owned by an agent session · session |
|
Closing as superseded. feat-cmux-next 8125a40 (2026-10-25, "the page's sheets are derived from the dev server's entry; no hand-kept list in the script") already removed the hand-kept stylesheet list from |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Every fleet DEV build (
cmux-ci build, pr-capture) and the webview CI shards stop in the agent pane's web step onfeat-cmux-next:build-agent-pane-web.shwrote the page's one<style>from a list of sheets kept by hand, and refused any sheet the pane imports that the list missed. So each new CSS import (ContextSection.css, thenui/wave.cssfromdesktop.tssince #23995) stopped the web step, and with it every native capture, until someone added a line (78c71ce did forwave.css; fe14026 addedcomposer/dropOverlay.cssthe same way while this PR was open). This PR removes the hand-kept list, so the next import can't do it again. It also covers the ContextSection.css case that #23939 fixes for that one file, and thewave.csscase of #24141.What changes
webviews/scripts/agent-pane/bundle.mjs --css-inputsnow lists the sheets in the order the page applies them: esbuild's CSS bundle order (import order, each sheet at its first import, a sheet's@importahead of it) for the graph of--page-stylesand then the entry, followed by any sheet only a lazily loaded chunk imports, by path. It used to be a sorted list that only fed the check.webviews/src/agent-session/acpmux/pageStyles.tsimports the page's own sheets (the desktop layer, the base layer, the transcript and composer rules), in the old list's order. A component's ownimport "./x.css"needs no entry: it ships after these, at its first import.build-agent-pane-web.shwrites the<style>from that list. It drops a sheet's@importof a sibling (the list carries the sibling ahead of it, asgit.cssbeforechanges.css), skipsacpmux/tailwind.css(still compiled and put last), and keeps both guards: every listed sheet's rules are in the page, and no@importreaches it.dev.tsxand the gallery (dev-server/galleryHost.ts, which used to regex the shell script) readpageStyles.ts, so the dev server, the gallery and the app share one order. The gallery's list puts each sheet after the siblings it@imports (git.cssbeforechanges.css), as the page does, so editinggit.cssreloads the gallery's pane sheet and marks pane entries touched.Behaviour
None for the app: built on cmux16 at base 972843d and at this head, the whole page output (
index.html,pane.js,chunks/,locales/, the highlight worker) is byte-identical (diff -rq).Takes back
Takes back #22710: its
cat .../ui/importCards.cssline in the hand-kept list goes with the list;pageStyles.tsimportsui/importCards.cssat the same place, and the page still ships it there (output byte-identical).Takes back #22815: its
cat .../ui/glass/glass.cssline goes the same way;pageStyles.tsimportsui/glass/glass.cssright afterdesktop.css, as before.Testing
webviews/test/agent-pane-styles.test.tsasksbundle.mjsfor the list as the script does and checks that it holdswave.css,ContextSection.css,ghost.css,git.cssand the page-level sheets, that it starts withdesktop.css, thatgit.csscomes right beforechanges.css, that it starts with the gallery's list, and that the built page carries every sheet in the list's order.bun test test/agent-pane-styles.test.tsfails 2 tests (the list is sorted and has no page-level sheets).scripts/cmux-next/build-agent-pane-web.sh(5 of 5 withtest/popup-surface-dev.test.ts, which now checkspageStyles.ts).Observed / Not run
build-agent-pane-web.sh --checkfailed with the error above on fbcb3d3 (before 78c71ce) and passes on the head. The head's page output is byte-identical to base 972843d's.@import "./ghost.css" screen;appended toui/wave.cssmakes the script exit 1 with "an @import reached the agent pane's styles".c436caaec321f545bb84096b(328523c) andbe6439987e581e9e309e48c5(ea2d75d).vp fmt --checkandvp linton the changed files pass, as doesscripts/cmux-next/prepush-gate.py.test/gallery-touched-rank.test.tspasses.bun run checkand the whole webviews suite (the sparse checkout lacks the Swift packages that some checks read) and the gallery dev server; the PR's CI covers those.Changelog
none
Agent session: cosmic-gray
🤖 Generated with Claude Code