At 1024 pt the Inbox detail header cuts the PR link to an unreadable sliver

Open Beginner friendly
#391 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift

Research direction

Start with TriageDetail.bar in Sources/SwitchboardApp/TriageView.swift and inspect the Inbox detail layout at a 1024 pt window. Check how the name, repo, branch, and PR link share space, then compare the result with the issue’s suggested short PR link and ViewThatFits behavior. Done means the PR number remains readable and repo or branch items disappear whole when space is tight; the issue also asks for a 1024 pt snapshot check.

Written by the indexing model from the issue text.

Description

At a 1024 pt window, the Inbox detail header cuts the PR link down to a one-character blue sliver, and the repo and branch drop to zero width. You can't read the PR number at all.

What happens

TriageDetail.bar puts the name, repo, branch, and PR link in one HStack. #355 gave each item .lineLimit(1), so the header no longer wraps letter by letter and the buttons keep their width. But the name has .layoutPriority(2) and the PR link .layoutPriority(1). At the detail's 340 pt minimum, the name takes the room it can, the repo and branch shrink to nothing, and the PR link truncates to a sliver. A capture of main at b3895e34 shows "Typo-tolerant search wi…", then a sliver of blue, then Open and Terminal.

Why it matters

A truncated item should still show something readable, with the full text on hover. A one-character link that you can click but can't read breaks that, and the PR number is what someone scans for.

Suggested fix

  • Show the PR link in its short form, #4812, with the title and status in .help, so it fits in about 50 pt.
  • Wrap the leading items in ViewThatFits so the repo and branch drop out whole instead of shrinking to zero width.
  • Add a 1024 pt snapshot check of the Inbox detail.

This is finding 1 of the #295 UI once-over. Finding 2 (#392, the Inbox's nested split view) is why the detail sits at its minimum width at 1024 pt.

Dominant language
Swift
Stars
0
Forks
0
Avg merge
6h 15m
Merged PRs (30d)
308

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haacked/switchboard

All issues in haacked/switchboard

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.