Skip to content

Linkify timeline event timestamps to match GitHub.com behavior #7293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 14, 2025

Timeline event timestamps are now clickable links that navigate to the PR/issue page, matching the behavior shown on GitHub.com.

Changes Made

Updated 8 timeline event components in webviews/components/timeline.tsx to use the href prop on their Timestamp components:

  • HeadDeleteEventView
  • CrossReferencedEventView
  • AssignUnassignEventView
  • ClosedEventView
  • ReopenedEventView
  • CopilotStartedEventView
  • CopilotFinishedEventView
  • CopilotFinishedErrorEventView

Implementation

The fix leverages the existing Timestamp component's href prop functionality:

// Before:
<Timestamp date={event.createdAt} />

// After:
<Timestamp href={pr.url} date={event.createdAt} />

Each timeline event component now uses useContext(PullRequestContext) to access the PR URL and pass it to the timestamp component, making the timestamps clickable links that navigate to the PR/issue page.

Visual Changes

Timeline timestamps are now underlined and clickable, consistent with GitHub.com behavior:

Timeline Event Timestamp Linkify

The implementation is minimal and surgical, following the same pattern already used by MergedEventView and CommentBox components.

Fixes #7009.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Linkify event time text Linkify timeline event timestamps to match GitHub.com behavior Jul 14, 2025
@Copilot Copilot AI requested a review from alexr00 July 14, 2025 17:05
Copilot finished work on behalf of alexr00 July 14, 2025 17:05
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.

Linkify event time text
2 participants