Skip to content

fix: stop the row-fitting check from overriding the switcher's preview limit - #83

Open
trsdn wants to merge 1 commit into
mainfrom
fix/switcher-preview-row-fallback
Open

trsdn wants to merge 1 commit into
mainfrom
fix/switcher-preview-row-fallback

Conversation

@trsdn

@trsdn trsdn commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • The switcher still fell back to icons on a busy Space even under 0.2.3's new Previews up to setting, because TileSizing.fit independently forced icon mode whenever a window count needed more than three rows without scrolling — a check unrelated to the configured limit, and unnecessary since the switcher grid is already inside a ScrollView.
  • 28 windows, the exact case named in 0.2.3's commit message, still hit this: at the overlay's capped 1400pt width, three rows of 120pt tiles fit at most 27.
  • TileSizing.fit now returns the floor width instead of giving up; TileModePolicy.resolve (driven by switcherPreviewLimit) is the only thing left deciding previews vs. icons.

Test plan

  • swift test — 245/245 pass, including a new regression test reproducing the 28-window/1400pt case (red before the fix, green after)
  • bash scripts/check.sh — all checks pass

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ez14nyXC16CaNvU6z7vN6W

…w limit

The switcher still fell back to icons on a busy Space even under the 0.2.3
"Previews up to" setting, because TileSizing.fit independently forced icon
mode whenever windowCount tiles could not fit in three rows without
scrolling -- a check unrelated to the configured limit, and one the switcher
grid (already inside a ScrollView) never needed. 28 windows, the exact case
0.2.3's commit message named, still hit this: at the overlay's capped 1400pt
width, three rows of 120pt tiles fit at most 27.

TileSizing.fit now returns the floor width instead of giving up, and the
grid scrolls for the rest. TileModePolicy.resolve, driven by
switcherPreviewLimit, is the only thing left deciding previews vs. icons.

Claude-Session: https://claude.ai/code/session_01Ez14nyXC16CaNvU6z7vN6W

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant