Skip to content

fix(web): on a phone, the repo home shows Clone above the README - #770

Merged
PastaPastaPasta merged 2 commits into
masterfrom
fix/phone-clone-first
Nov 27, 2026
Merged

PastaPastaPasta merged 2 commits into
masterfrom
fix/phone-clone-first

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

Problem

The rail drops under the content below lg (1024 px), so on a phone a visitor reached the repo's Clone card (git clone, install, .zip) only after scrolling through the whole README. Wave 8's live probe found this.

Change

  • The repo home now shows the Clone card between the file list and the README on phone-width screens. The rail leaves it out there, so only one Clone card renders.
  • New components/repo/phone-clone.tsx does this:
    • PhoneCloneProvider in the scaffold tells the rail whether a page has claimed Clone.
    • PhoneCloneBox on the repo home claims it under 1024 px and gives it back on unmount.
    • The rail therefore keeps Clone on every other rail page, and on the home while it's loading, empty or in an error state.
  • A private repo the viewer has no role in shows Clone nowhere, the same rule the rail already applied.
  • Desktop (≥1024 px) is unchanged.

Compat

Layout only. No data, storage, contract or URL change.

Tests

  • New phone-clone.test.tsx covers phone, wide, a page without the home, private with no role, and rendering with no provider.
  • e2e b-8 (390 px) now checks there is exactly one Clone card and that it sits between the file list and the README.

🤖 Generated with Claude Code

Below lg the rail drops under the content, so a phone visitor found Clone only after
the whole README. The repo home now shows the Clone card between the file list and the
README on phone-width screens, and the rail leaves it out there; desktop is unchanged.

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

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: 54e31c96-07a2-4d51-9f43-9b99c9c706c7
Commits

Reviewing files that changed from the base of the PR and between a15614b and 9f72955.

Files selected for processing: 6

  • forge-web/components/repo/phone-clone.test.tsx
  • forge-web/components/repo/phone-clone.tsx
  • forge-web/components/repo/repo-home-content.tsx
  • forge-web/components/repo/repo-rail.tsx
  • forge-web/components/repo/repo-scaffold.tsx
  • forge-web/e2e/v2-home.spec.ts
  • 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

@PastaPastaPasta
PastaPastaPasta merged commit abfd649 into master Nov 27, 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