Summary
Current tests cover SettingsStore and PinSessionStateMachine, but not the higher-risk sidebar session behavior.
Current behavior
There are only two test files:
Tests/SwitcherTests/SettingsStoreTests.swift
Tests/SwitcherTests/PinSessionStateMachineTests.swift
High-risk behavior in PinSessionManager is currently untested.
Suggested coverage
Add tests for:
- width clamping per display
- stack layout for 1, 2, and 3 pinned apps
- unpin/reorder behavior
- moved/resized manual break detection
- persistence of edge/display/width settings
- closed-window removal behavior where feasible
Suggested implementation approach
- Extract pure layout helpers where useful.
- Introduce injectable display/window doubles for session tests.
- Keep UI/AppKit integration tests manual for now.
Acceptance criteria
- Sidebar layout/session logic has focused unit tests.
- Tests avoid requiring live third-party app windows.
- CI can run the test suite reliably.
Summary
Current tests cover
SettingsStoreandPinSessionStateMachine, but not the higher-risk sidebar session behavior.Current behavior
There are only two test files:
Tests/SwitcherTests/SettingsStoreTests.swiftTests/SwitcherTests/PinSessionStateMachineTests.swiftHigh-risk behavior in
PinSessionManageris currently untested.Suggested coverage
Add tests for:
Suggested implementation approach
Acceptance criteria