Skip to content

Timeline: add Dependabot assignment and Copilot work timeline events#8147

Open
janmaarten-a11y wants to merge 2 commits into
mainfrom
janmaarten-a11y-timeline-dependabot-assignment-copilot-e
Open

Timeline: add Dependabot assignment and Copilot work timeline events#8147
janmaarten-a11y wants to merge 2 commits into
mainfrom
janmaarten-a11y-timeline-dependabot-assignment-copilot-e

Conversation

@janmaarten-a11y

Copy link
Copy Markdown
Contributor

Summary

This is a Phase 2 follow-up (github/primer#6663) that fills the remaining gaps in the Dependabot alert Timeline event stories. It adds the three live Dependabot timeline events that our merged stories were missing: assignment, copilot_work_started, and copilot_work_finished. The work is Storybook-only and stays surgical: it adds two new exported stories to the existing Timeline.dependabot.features.stories.tsx file and reuses the shared internal story helpers.

What it adds

  • EventAssignment: mirrors the existing Secret scanning assignment story with five variant sections (self-assigned, assigned another user, removed own assignment, unassigned another user, and a combined assign + unassign). It uses a default (gray) PersonIcon badge and renders both the actor and the assignee with avatars, following this file's own linked, muted UserActor convention.
  • EventCopilotWork: one story with two variant sections (work started and work finished). The started row uses a default GitBranchIcon badge and a right-aligned small anchor Button ("View session"); the finished row uses a default RepoPushIcon badge. In both rows "Copilot" renders as bold plain text (a <strong>), matching how this file already renders bold non-link text.

Source of truth

Dependabot is server-rendered ERB (ViewComponent), so each event is translated faithfully from the live monolith components in app/components/dependabot_alerts/timeline_items/:

  • assignment_component.{rb,html.erb} (badge person; action_text collapses self-actions to "self-assigned this" / "removed their assignment", otherwise the bare action word plus the assignee).
  • copilot_work_started_component.{rb,html.erb} (badge git-branch; optional right-floated "View session" anchor button when a session URL is present).
  • copilot_work_finished_component.{rb,html.erb} (badge repo-push).

Each new story carries a JSDoc doc-comment citing its ViewComponent source, matching the style of the existing stories.

Out of scope

Per the Phase 2 plan, these stories are intentionally not wired into Timeline.docs.json or build.ts, and no data-* filtering attributes are added (deferred to Phase 3). No new CSS was needed.

Testing & Reviewing

  • prettier, eslint, stylelint, and type-check all pass with zero new errors.
  • Rendered EventAssignment and EventCopilotWork headlessly in Chromium against the local Storybook build and confirmed: assignment rows show actor and assignee avatars with the correct copy; Copilot rows show bold plain "Copilot" (no avatar), the git-branch and repo-push badges, and the "View session" button only on the started row, all with zero component or React console errors or warnings.

Note: primer/react main is currently locked for a release, so this will not appear in the public Storybook until the release cuts.

Rollout strategy

  • None; Storybook-only stories that do not change any published, consumer-facing API. A skip changeset label is applied.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a634ea1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Pull request overview

This PR extends the Dependabot Timeline Storybook feature stories to cover remaining live event types from the server-rendered Dependabot alert timeline, specifically focusing on assignment and Copilot work lifecycle events.

Changes:

  • Added a new EventAssignment story with five variants covering self-assignment, assignment/unassignment of another user, and a combined case.
  • Added a new EventCopilotWork story with “work started” and “work finished” variants, including a right-aligned “View session” action for the started state.
  • Introduced two additional public avatar fixtures for use in the new assignment examples.
Show a summary per file
File Description
packages/react/src/Timeline/Timeline.dependabot.features.stories.tsx Adds new Dependabot timeline event stories for assignment and Copilot work started/finished, aligning Storybook coverage with live ERB behavior.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: Timeline integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants