Skip to content

fix(web): keep the repo header's actions on one row on phones - #747

Merged
PastaPastaPasta merged 2 commits into
masterfrom
ux/mobile-repo-actions-row
Nov 25, 2026
Merged

PastaPastaPasta merged 2 commits into
masterfrom
ux/mobile-repo-actions-row

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Problem

At 390 px the repo header's actions (code search, "Copy link", Fork/Pin, Star, "…") don't fit one line. On repos with a security policy (e.g. mainnet dash-forge), the "…" menu wraps onto a row of its own above the description.

Change

Below sm, the repo header's Copy link button shows only its icon. The label stays as screen-reader text, so it's still the button's accessible name, and "Copied" still shows as the check icon. On touch screens the icon-only button keeps a 44 px minimum width, and it gets a "Copy link" tooltip for narrow desktop windows. Other pages that use CopyLinkButton are unchanged: the new prop is off by default. A unit test covers the prop.

Evidence

mainnet dash-forge, 390 px. Before (live) / after (this branch built for mainnet): Copy link and "…" sit on the same row (both top = 170 px).

Still open

The row fits for signed-out visitors (the probe's case) and for private repos. When signed in on a public repo, the extra Pin and Watch buttons still push Star and "…" onto a second line. Making those icon-only on phones would be the follow-up.

Migration / compat check

  • Presentational only: data-testid="copy-link", its data-href and the copied link don't change.
  • Untouched: storage, URLs and formats.
  • Result: compatible, no migration needed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Repository copy-link buttons now use a more compact, icon-focused layout on phones while keeping the “Copy link” label available to assistive technologies.
    • On touch devices, the button has a minimum width to make it easier to tap.
  • Bug Fixes
    • The “Copy link” title remains available when the compact phone layout is enabled.

At 390 px, search, "Copy link", Fork/Pin, Star and the "…" menu did not
fit one line, so the "…" button wrapped onto a row of its own above the
description. Below `sm` the repo header's Copy link button shows only
its icon; the label stays its accessible name, and "Copied" still shows
as the check icon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

CopyLinkButton adds an optional mobile presentation mode that visually hides its label below the sm breakpoint while retaining accessible text. RepoHeader enables this mode.

Changes: Mobile Copy Link Presentation

Layer / File(s) Summary
CopyLinkButton mobile option
forge-web/components/ui/copy-link.tsx, forge-web/components/ui/copy-link.test.tsx
CopyLinkButton adds an option that hides the label visually below sm and applies styling for coarse-pointer devices. Tests cover the enabled and default behavior.
RepoHeader wiring
forge-web/components/repo/repo-header.tsx
RepoHeader passes the mobile presentation option to CopyLinkButton.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to 33a9f

The repo header's Copy link button shows only its icon on phones, and other pages are unchanged. No concrete merge risk was found; the only open question is whether the action row still wraps on very narrow screens.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the repo header's actions are kept on one row on phones. It also names the scope (web) and the fix type. The raw summary shows the code change adds an icon-only Copy l…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem (repo header actions wrap onto two rows at 390 px), the change (Copy link shows only its icon below the sm breakpoint, with the label kept as screen-reader text and …
Full details: Title check

Explanation

The title names the main change: the repo header's actions are kept on one row on phones. It also names the scope (web) and the fix type. The raw summary shows the code change adds an icon-only Copy link mode below the sm breakpoint, which is the mechanism behind that outcome. The title is specific and fits the changeset.

Full details: Description check

Explanation

The description states the problem (repo header actions wrap onto two rows at 390 px), the change (Copy link shows only its icon below the sm breakpoint, with the label kept as screen-reader text and a 44 px minimum width on coarse pointers), and the compatibility impact (the new prop defaults to false, data-testid, data-href and storage are unchanged). It includes before and after screenshots at 390 px and notes a unit test. It does not follow the template's 'How it was tested' section: it lists no make check-rust or make check-web runs, and it does not address the rule-vector or docs/guides checklist items. Those items may not apply to a presentational web change, but the author did not say so. The screenshots are hosted on an external artifact repository and are labeled before/after as the template asks.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57debca2-e069-4c01-b8bc-3bbf1b545276
Commits

Reviewing files that changed from the base of the PR and between eeeae4c and 33a9f46.

Files selected for processing: 3

  • forge-web/components/repo/repo-header.tsx
  • forge-web/components/ui/copy-link.test.tsx
  • forge-web/components/ui/copy-link.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@PastaPastaPasta
PastaPastaPasta merged commit 59df356 into master Nov 25, 2026
21 checks passed
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