Skip to content

Add deployment markers to sitespeed graphs#605

Merged
shyim merged 5 commits intomainfrom
claude/add-deployment-marker-to-graphs
Mar 15, 2026
Merged

Add deployment markers to sitespeed graphs#605
shyim merged 5 commits intomainfrom
claude/add-deployment-marker-to-graphs

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Mar 15, 2026

Adds vertical dashed line markers to sitespeed performance graphs showing when deployments occurred, similar to Tideways deployment annotations.

Changes

  • Added chartjs-plugin-annotation dependency (v3.1.0)
  • Extract unique deployments from sitespeed data via computed property
  • Render deployment markers as vertical lines with rotated labels on all three charts (Performance Metrics, Transfer Size, CLS)

Implementation

The sitespeed data already includes deploymentId foreign key references. The implementation:

  1. Extracts unique deployments and their timestamps from the existing sitespeed measurements
  2. Configures Chart.js annotation plugin to draw vertical dashed lines at deployment times
  3. Displays deployment names as rotated labels in indigo color (rgba(99, 102, 241, 0.8))
const deploymentMarkers = computed(() => {
  if (!shop.value?.sitespeed) return [];
  
  const deploymentMap = new Map<number, { id: number; name: string; timestamp: number }>();
  
  shop.value.sitespeed.forEach((item) => {
    if (item.deployment?.id && !deploymentMap.has(item.deployment.id)) {
      deploymentMap.set(item.deployment.id, {
        id: item.deployment.id,
        name: item.deployment.name || `Deployment #${item.deployment.id}`,
        timestamp: new Date(item.createdAt).getTime(),
      });
    }
  });
  
  return Array.from(deploymentMap.values()).sort((a, b) => a.timestamp - b.timestamp);
});

Annotations are then applied to all chart instances via the Chart.js plugin configuration.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add deployment marker to sitespeed graphs</issue_title>
<issue_description>### Please describe the feature you would like to see implemented.

Similar to tideways deployment marker in the graphs

Image</issue_description>

Comments on the Issue (you are @claude[agent] in this section)

@Claude Claude AI assigned Claude and shyim Mar 15, 2026
@Claude Claude AI changed the title [WIP] Add deployment marker to sitespeed graphs Add deployment markers to sitespeed graphs Mar 15, 2026
@Claude Claude AI requested a review from shyim March 15, 2026 09:23
@shyim shyim force-pushed the claude/add-deployment-marker-to-graphs branch from c4eb35b to c8afc91 Compare March 15, 2026 15:55
@shyim shyim marked this pull request as ready for review March 15, 2026 15:55
@shyim shyim merged commit 8c91581 into main Mar 15, 2026
4 checks passed
@shyim shyim deleted the claude/add-deployment-marker-to-graphs branch March 15, 2026 15:56
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.

Add deployment marker to sitespeed graphs

2 participants