Add deterministic sidebar ownership and scale gates
Closed
AZ
2mo ago+666+666+012345678901234567890123456789-17-17-01234567890123456789
Summary
- assert viewport resize does not re-enter the sidebar owner during the active layout transaction
- assert lazy row realization preserves the exact parent-owned observation-token topology
- render production immutable row snapshots at 1, 10, 100, and 1,000 workspaces and bound work to the viewport
- cover sidebar snapshot publisher behavior when demand pauses, callbacks re-enter, and
AsyncPublisher.valuesconsumes values
This changes no release behavior. The only source change is DEBUG probe plumbing that records which workspace rows SwiftUI realizes.
Verification
- 25 selected sidebar ownership and scale tests passed
- hierarchy tests passed 5 repeated in-process runs, 10 test executions total
- publisher tests passed, 22 of 22
- strict determinism check passed with 0 findings
- sidebar lazy-layout guard, its Python tests, project test wiring, and diff checks passed
- tagged
sblifeapp exercised with 55 workspaces, top-to-bottom scrolling, and selection at both ends; no reentrant-layout, fatal, assertion, crash, or exception log entries
Historical red replay
The two ownership tests were replayed against pre-#8211 sidebar commit 856a18629d8fb5d245aacccdfee37ed4e6d1f514. No publisher fixes were applied.
- 2 tests executed, 2 failed
- active viewport resize reevaluated
VerticalTabsSidebar.body8 times, expected 0 - pure scrolling changed observer identities at all 5 offsets
- the non-vacuity check passed, proving scrolling realized rows beyond the initial viewport
The historical sidebar implementation remained unchanged. Compatibility adjustments only mapped the probe to the old tab.id name and exposed an existing test helper.