cmux-layout-reducer: sidebar.item.update takes room, a Pinned item's space (split from #27308)
The reducer half of #27308 (cmux NEXT spaces: each space owns its pins and groups), split out so it can land first.
Why the split: #27308 changes cmux-layout-reducer, an app FFI input, so check-app-ffi-pin.sh fails its 'cmux-next checks' job until Package.swift pins a CCmuxAppFFI release built from the new sources. app-ffi-release.yml publishes only from feat-cmux-next pushes, so a PR can never repin itself. The sanctioned order is: the crate change lands, the release workflow publishes cmux-app-ffi-<sha> and opens its re-pin PR, the re-pin lands, and then #27308 (Swift side) merges on top with the pin passing.
What it changes:
ItemPatch.room:sidebar.item.update {patch: {room}}stores the item's space asextra.room; null clears it; the update's inverse takes it back.- A reducer test for set, undo and clear (
pin_tests.rs). - One sentence in
cmux-tui/spec/resource-api-v2.md.
No Swift changes here, so the app keeps linking the current pinned FFI until the re-pin lands; nothing on the Swift side sends room until #27308 merges.
Expected red: 'Check the app FFI pin' in 'cmux-next checks' fails on this PR (it is the reason for the split) and clears with the release workflow's re-pin PR.
Risk: low. One additive optional field (serde default, skipped when Keep), no existing callers construct ItemPatch by literal.
Tests: cargo test -p cmux-layout-reducer --locked on the fleet (cmux-ci).
Agent session: agent session
š¤ Generated with Claude Code
Summary by cubic
Adds room to sidebar.item.update so a link, tab, or app moved into Pinned stores its acting window's space as extra.room; null clears it and the update's inverse takes it back.
This is the reducer half of #27308, split out so the crate change lands first. Because it changes an app FFI input, the 'cmux-next checks' job's check-app-ffi-pin.sh will fail until app-ffi-release.yml publishes a new release from feat-cmux-next and its re-pin PR lands. No Swift changes here, so the app keeps linking the current pinned FFI.
Tests ā cargo test -p cmux-layout-reducer --locked covers set, undo, and clear for room.