Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ export function PullRequestDetailPanel({
</nav>
<span className="ml-auto inline-flex min-w-0 shrink items-center gap-1 font-mono text-[11px] text-muted-foreground">
<Tooltip>
<TooltipTrigger render={<span className="truncate" />}>
<TooltipTrigger render={<span className="max-w-32 shrink-0 truncate" />}>
{detail.baseBranch}
</TooltipTrigger>
<TooltipPopup side="top">{`${detail.baseBranch} ← ${detail.headBranch}`}</TooltipPopup>
Expand Down Expand Up @@ -1647,7 +1647,7 @@ export function PullRequestDetailPanel({
<Tooltip>
<TooltipTrigger
render={
<code className="min-w-0 max-w-48 shrink truncate rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground">
<code className="min-w-0 max-w-48 shrink-0 truncate rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground">
{detail.baseBranch}
</code>
}
Expand All @@ -1668,7 +1668,7 @@ export function PullRequestDetailPanel({
render={
<button
type="button"
className="grid min-w-0 max-w-64 shrink cursor-pointer rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground outline-none transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
className="grid min-w-0 shrink cursor-pointer rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground outline-none transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
aria-label={
isBranchCopied ? "Branch name copied" : "Copy pull request branch"
}
Expand Down
33 changes: 33 additions & 0 deletions docs/fork/0014-base-branch-stays-readable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 0014: The base branch stays readable in the pull request header

- PR: [TrogonStack/t3code#24](https://github.com/TrogonStack/t3code/pull/24)
- Status: active

## What you can do now

- See where a change is going without hovering for it. The base branch keeps
enough room for a name you can recognize rather than collapsing to a letter
and an ellipsis as soon as the panel narrows.
- Open a review beside a thread, at the width most reviews are actually read
at, and still have both branch names legible. The head name gives up room
first now, since it is usually the branch you are already on.

## Why

The header's whole job in one line is to say what is being merged into what.
When the base gives way first, the header keeps the branch the reader already
knows and drops the one they opened the review to check, which is backwards.

It was worst exactly where it mattered most. A wide window hid the problem
entirely, so the panel widths people use every day, docked next to a thread,
were the only ones showing a base branch cut down to nothing.

## Upstream considerations

Worth submitting. It is a plain layout bug with nothing fork specific about
it, and upstream has the same header.

The rebase burden is negligible. It is a small change to how one row shares
its width, so a sync carries it untouched unless upstream reworks that header,
in which case reapplying it is a matter of restoring which side absorbs the
slack.
2 changes: 2 additions & 0 deletions docs/fork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ Each entry uses these sections:
active, [#21](https://github.com/TrogonStack/t3code/pull/21)
- **0013** [Keep your place in a long review](./0013-keep-your-place-in-a-review.md)
active, [#23](https://github.com/TrogonStack/t3code/pull/23)
- **0014** [The base branch stays readable in the pull request header](./0014-base-branch-stays-readable.md)
active, [#24](https://github.com/TrogonStack/t3code/pull/24)
Loading