Skip to content

test: width survey snapshots for picker layout at various sizes - #1613

Merged
max-sixty merged 3 commits into
mainfrom
snapshots/picker-width-survey
Mar 26, 2026
Merged

max-sixty merged 3 commits into
mainfrom
snapshots/picker-width-survey

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Adds snapshot tests showing wt list layout at 30, 40, 50, 60, 80, 100, and 120 columns
  • Includes picker-equivalent widths (terminal_width/2) simulating wt switch in Right layout
  • Three test scenarios: typical branches, long branches, and picker Right-layout simulation

No code changes — just snapshots to visualize current behavior.

Key findings visible in snapshots

Branch column dropped at narrow widths with long names (width_survey_long_30):
At 30 cols with long branch names (feature/implement-oauth2-social-login, fix/database-connection-pool-exhaustion), the Branch column is entirely absent — only Status, HEAD±, and main↕ show. This is the try_allocate() all-or-nothing behavior: the branch column's ideal width (longest name) exceeds available space, so it gets 0 allocation.

Typical branches survive down to 30 cols (width_survey_typical_30):
With shorter branch names (feature/auth-redesign, ~22 chars), Branch still fits at 30 cols — but Status column is dropped.

Picker in Right layout at 60-col terminal (width_survey_picker_right_60):
List gets 30 cols. Branch + Age fit — Status and all other columns hidden. Usable but minimal.

Picker in Right layout at 80-col terminal (width_survey_picker_right_80):
List gets 40 cols. Branch + Status + Age fit. Reasonable.

Column progression summary (typical branches):

Width Columns visible
30 Branch, Age
40 Branch, Status, Age
60 Branch, Status, HEAD±, main↕, Age
80 Branch, Status, HEAD±, main↕, Remote⇅, Commit, Age
100+ Branch, Status, Dirty, HEAD±, main↕, Remote⇅, Commit, Age, Path

Context

Requested in #1564 (comment)

Test plan

  • All 3 new tests pass (cargo test --test integration "width_survey")
  • Existing spacing edge case tests unaffected
  • pre-commit run --all-files passes (excluding lychee)

🤖 Generated with Claude Code

…l sizes

Adds snapshot tests showing `wt list` output at 30–120 columns to visualize
which columns appear and how branch names render at each width. Includes
picker-equivalent widths (terminal_width/2) to show what `wt switch` in
Right layout would display.

Context: #1564

Co-Authored-By: Claude Opus 4.6 <[email protected]>
worktrunk-bot added a commit that referenced this pull request Mar 19, 2026
The review bot consistently performs full code analysis (10-18 minutes
of CI compute) on self-authored PRs, only to stay silent because it
cannot approve its own work. Observed 6 times across PRs #1610, #1613,
#1614, #1619, #1622, #1623.

Add early-exit guidance in step 1 to skip steps 2-4 for self-authored
PRs. The bot still monitors CI and resolves threads, but skips the
redundant code review that always produces zero visible output.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner

please merge main and rerun

worktrunk-bot and others added 2 commits March 26, 2026 05:31
The layout allocator changes on main altered column visibility at narrow
widths for long branch names — Branch column now takes priority over
Status/HEAD±/main↕.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@worktrunk-bot

Copy link
Copy Markdown
Collaborator Author

Merged main and updated 2 snapshots (width_survey_long_30, width_survey_long_40) — the layout allocator changes on main now prioritize the Branch column at narrow widths, so long branch names show Branch instead of Status/HEAD±/main↕. All CI checks and codecov pass.

@max-sixty
max-sixty merged commit e885510 into main Mar 26, 2026
22 checks passed
@max-sixty
max-sixty deleted the snapshots/picker-width-survey branch March 26, 2026 05:50
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.

2 participants