Repository navigation
fix(cmux CLI): a list that lacks the window's workspace reads the window again with the barrier (#32201 follow-up) - #32327
Conversation
…w again with the barrier (#32201 review red)
…dow again with the barrier (#32201 review) The review of #32201 found one daemon write that can leave the app's last published snapshot behind: `workspace close <shown>` and then `workspace list`. The fast snapshot still shows the closed workspace, so the overlay set every row unfocused. When a list of the app's session lacks the window's workspace, the overlay now reads the window once more with `after: "sync"`; every other list keeps the fast read. The read barrier's doc names the caller-chosen `after`.
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. |
|
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)
Shipped in:
|
|
Review (subagent, correctness first): SHIP at f283afe Scope: The change applies cleanly on the merged #32201 code
The earlier review's points still holdThe code is the same, so the analysis in #32201 (comment) applies unchanged:
Residuals that still apply (Low, do not block, follow-ups):
New
No other findings. Label |
Summary
Follow-up to #32201 (CLI-1:
workspace listreads the app window without the app's read barrier). #32201 merged at its first reviewed head (8185ff0), before this fix for that review's Medium finding (#32201 (comment)) reached it.The gap:
cmux workspace close <the workspace the window shows>; cmux workspace list. The app's last published snapshot, which #32201 reads withafter: 0, can still show the closed workspace. The overlay then marks every row unfocused until the app publishes again.Fix: when a workspace list of the app's session lacks the workspace the app's window shows, the snapshot is older than the daemon's answer, so the overlay reads the window once more with
after: "sync". Every other list keeps the single fast read.app_workspacestakes the barrier; thewith_read_barrierdoc names a caller-chosenafter.Owner: the cmux CLI (cmux-tui/crates/cmux-tui).
Changelog
none
Testing
Regression test:
a_list_without_the_window_s_workspace_reads_the_window_again_with_the_barrier(cmux-tui,cli/app_focus/tests.rs): a fake app answersafter: 0with the pre-close window andafter: "sync"with the post-close window; the list must read twice and takefocusedfrom the second read.mux/tests/read_paths.rs, the known base red from perf(cmux-tui-core): a pane or tab list inside one workspace reads only that workspace (CLI-1) #32177 that base red: read_paths test drops qualifications in scope and a redundant clone (clippy, from #32177) #32282 fixes; no finding in this PR's files.after: 0read only); green step 3c90020eb58a5a13f5a46cf6, app_focus and agents tests 14 of 14. Independent review of those commits: SHIP at 82312c5 (perf(cmux CLI): workspace list reads the app window without the app's read barrier (CLI-1) #32201 (comment)); a new review covers this head.Observed / Not run
Observed: the red and green steps above. Not run: an app round with a close then a list under load.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the
workspace close <shown>thenworkspace listcase where the overlay marked every row unfocused because the app's last published snapshot still showed the closed workspace. When a list of the app's session lacks the workspace the window shows, the overlay now reads the window once more withafter: "sync"; every other list keeps the single fast read, and the read barrier's doc now notes the caller-chosenafter.Written for commit f283afe. Summary will update on new commits.