test: run the matrix's sidebar-order cases on the app's placement (cx-rq6i5)
Runs the shared matrix's sidebar-order cases (Tests/Matrix/cases.json) headless on the app's own placement code. This covers cx-rq6i5, the follow-up to cx-gkyi1. The core runner (#20253) can't check these cases, because sidebar order is the home session's personal order: the app computes it and the daemon only stores it.
ModelMatrixPersonalOrderTests covers 15 cases: New Workspace Above, Below, At Top and At Bottom from the context menu, palette and CLI, plus Move to Bottom. For each case it:
- seeds three workspaces in personal order (for a create, also the new workspace, listed as its daemon lists it);
- runs the slot the action resolves to through
WorkspaceVerbHandlers.place, the step every positioned create and Move to Bottom ends in; - reads the sidebar's order straight away (the optimistic edit) and compares it with the case's
order-is.
It runs once with personal-mixed-order-v1 and once without. It needs no daemon, window or clock, and every failure starts with MATRIX <id>:.
Not covered: Move Up/Down. movePersonalWorkspace only writes to the daemon and needs an active window, so a headless test sees no change. Those cases stay with the HID runner. Routing them through place would make them testable here, but it changes behavior, so it is not in this PR.
Verification
- Fleet run
run-swift-testing-suites.shon 7941bead7b38:ModelMatrixPersonalOrderTestspassed in both modes (0.23 s), andModelMatrixTestspassed. - The one red in that run is
DaemonCapabilityExportTests.exportIsFresh.plans/cmux-next/daemon-capabilities.jsonis stale on the base; this PR only adds one test file.
Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds ModelMatrixPersonalOrderTests to run the shared matrix's sidebar-order cases against the app's own placement logic, which the core runner can't check because sidebar order is the home session's personal order. The test seeds three workspaces, runs each case through the app's placement code (creates via the pending-placements path, Move to Bottom via WorkspaceVerbHandlers.place), and checks both the sidebar's immediate order and the personal order written to the daemon, once with personal-mixed-order-v1 and once without. Move Up/Down cases remain with the HID runner because they only write to the daemon and require an active window.