fix(ui): Size Select popups to the widest option and truncate the PR repo name

Virtualised list rows are absolutely positioned, so the popup only took the
trigger's width and cut short labels like "Merged". The Pull Requests header
now keeps the repository on one line with an ellipsis and a tooltip.
This commit is contained in:
l0ng-ai committed 2026-10-24 10:02:13 +08:00
1 parent 1309ce10e4
commit 4f74f22624
4 files changed
+38 -4

No files matched your search

+4
View File
@@ -37,7 +37,11 @@
white-space: nowrap;
}
.repo {
min-width: 0;
margin-left: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
+6 -1
View File
@@ -591,5 +591,10 @@ export function PullRequestsView() {
export function PullRequestsHeader() {
const availability = useGithub((s) => s.availability);
if (availability?.kind !== "ready") return null;
return <span className={styles.repo}>{availability.repo.nameWithOwner}</span>;
const name = availability.repo.nameWithOwner;
return (
<span className={styles.repo} title={name}>
{name}
</span>
);
}