Skip to content

fix: open the commit graph on the latest weeks on phones, with the weekdays pinned - #1588

Open
kachelle wants to merge 2 commits into
dev-null-sh:productionfrom
kachelle:fix/activity-graph-mobile-scroll
Open

kachelle wants to merge 2 commits into
dev-null-sh:productionfrom
kachelle:fix/activity-graph-mobile-scroll

Conversation

@kachelle

@kachelle kachelle commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

On phones the year of commit activity now opens on the latest weeks straight from the server-rendered page, instead of on the oldest ones until the page hydrates, and the weekday labels stay put while you scroll back.

Visual evidence

Before After
First paint, dark
First paint, light
Scrolled, dark
Scrolled, light

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the activity graph’s year view to open at the latest weeks, with weekday labels and the leading blank cell remaining visible while scrolling.
    • Kept the half-year view left-aligned and unscrolled.

…ekdays pinned

The year grid scrolled to its right end from a ref, so phones first painted the oldest weeks until the page hydrated.
The scroll container now runs right to left, which starts it at the latest weeks before any script runs, and the
weekday labels stay put while the weeks scroll under them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

YearGrid replaces its scroll-position callback with RTL direction on the year-scale scroller and LTR direction on the inner grid. It removes the grid’s horizontal gap and makes the leading spacer and weekday-label column sticky.

Changes: Activity graph layout

Layer / File(s) Summary
YearGrid scroll layout
resources/js/components/activity-graph.tsx
The year-scale scroller uses RTL direction, and the inner grid uses LTR direction with no horizontal gap. The leading spacer and weekday-label column are sticky and have card backgrounds. The weekday-label column also has right padding.

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

Change: Bug fix

Possibly related PRs

  • dev-null-sh/dev-null.sh#1150: Changes server-rendering and hydration behavior for the activity graph, including its initial scroll position and weekday labels.

Suggested reviewers: xheaven, jubianchi

Merge Risk: Minimal · up to 5f576

The change makes the phone-sized commit chart open on the latest weeks and keeps the weekday labels pinned while scrolling. It touches only the layout of one component. No concrete merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the phone commit graph now opens on the latest weeks, and the weekday labels stay pinned. The raw summary confirms this: the year-scale scroller uses RTL direction so …
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.
Full details: Title check

Explanation

The title names the main change: the phone commit graph now opens on the latest weeks, and the weekday labels stay pinned. The raw summary confirms this: the year-scale scroller uses RTL direction so it opens at the latest weeks, and the leading blank cell and weekday labels are sticky on the left. The title is specific and matches the changeset and the PR objectives. It is a single sentence, though it is somewhat long at 82 characters.

Finishing Touches

Generate unit tests (beta)

  • 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: 344ed412-c9f9-4600-bffb-c9e24b03bee9
Commits

Reviewing files that changed from the base of the PR and between 0897729 and 5f57630.

Files selected for processing: 1

  • resources/js/components/activity-graph.tsx

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

@kachelle
kachelle marked this pull request as ready for review November 15, 2026 19:29
# Conflicts:
#	resources/js/components/activity-graph.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the activity-graph scrolling and sticky-label changes.

No open issues 🎉

What changed in this PR

Updates the shared activity graph so phones show the latest weeks immediately, without waiting for JavaScript.

Changes:

  • Uses native scroll direction for the year view while preserving chronological grid order.
  • Pins weekday labels and the blank corner during scrolling, keeping the half-year view left-aligned.
File Description
resources/​js/​components/​activity-graph.tsx Replaces scripted scroll positioning and adds sticky weekday labels with matching card backgrounds.

Review effort: Balanced

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.

2 participants