Skip to content

feat: add ability to copy executionId from deployment details page#2694

Open
rmnbrd wants to merge 1 commit into
stagingfrom
feat/deployment-details-exec-id-copy-button
Open

feat: add ability to copy executionId from deployment details page#2694
rmnbrd wants to merge 1 commit into
stagingfrom
feat/deployment-details-exec-id-copy-button

Conversation

@rmnbrd
Copy link
Copy Markdown
Contributor

@rmnbrd rmnbrd commented May 20, 2026

Summary

Issue: Slack thread

Screenshots / Recordings

Screen.Recording.2026-05-20.at.08.24.16.mov

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@rmnbrd rmnbrd marked this pull request as ready for review May 20, 2026 06:25
Copilot AI review requested due to automatic review settings May 20, 2026 06:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a copy-to-clipboard interaction for the “execution id” shown in the deployment details header, providing quick access to the full ID directly from the UI.

Changes:

  • Wraps the execution id badge in a clickable button that copies the current deploymentId to the clipboard.
  • Adds temporary “copied” feedback via icon transitions (code → copy on hover → check after click).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 19 to +66
@@ -47,14 +58,50 @@ export function HeaderEnvironmentStages({
{Math.floor(totalDurationSec / 60)}m : {totalDurationSec % 60}s
</span>
</Badge>
<Badge variant="surface" className="max-w-full whitespace-nowrap">
<Tooltip side="bottom" content={<span>Execution id: {deploymentId}</span>}>
<span className="flex items-center gap-1.5 truncate">
<Icon iconName="code" iconStyle="regular" className="text-sm text-neutral-subtle" />
<span className="font-normal text-neutral">{trimId(deploymentId ?? '')}</span>
</span>
</Tooltip>
</Badge>
<Tooltip side="bottom" content={<span>Execution id: {deploymentId}</span>}>
<button
type="button"
aria-label="Copy execution id"
disabled={!deploymentId}
onClick={handleCopyExecutionId}
Comment on lines 21 to +103
@@ -47,14 +58,50 @@ export function HeaderEnvironmentStages({
{Math.floor(totalDurationSec / 60)}m : {totalDurationSec % 60}s
</span>
</Badge>
<Badge variant="surface" className="max-w-full whitespace-nowrap">
<Tooltip side="bottom" content={<span>Execution id: {deploymentId}</span>}>
<span className="flex items-center gap-1.5 truncate">
<Icon iconName="code" iconStyle="regular" className="text-sm text-neutral-subtle" />
<span className="font-normal text-neutral">{trimId(deploymentId ?? '')}</span>
</span>
</Tooltip>
</Badge>
<Tooltip side="bottom" content={<span>Execution id: {deploymentId}</span>}>
<button
type="button"
aria-label="Copy execution id"
disabled={!deploymentId}
onClick={handleCopyExecutionId}
className="group inline-flex disabled:cursor-default"
>
<Badge
variant="surface"
className="max-w-full cursor-pointer whitespace-nowrap transition-colors hover:bg-surface-neutral-componentHover group-disabled:cursor-default group-disabled:hover:bg-surface-neutral-subtle"
>
<span className="flex items-center gap-1.5 truncate">
<span className="relative flex size-4 shrink-0 items-center justify-center">
<Icon
iconName="code"
iconStyle="regular"
className={clsx('absolute text-sm text-neutral-subtle transition-opacity', {
'opacity-0': isCopied,
'opacity-100 group-hover:opacity-0': !isCopied,
})}
/>
<Icon
iconName="copy"
iconStyle="regular"
className={clsx('absolute text-sm text-neutral-subtle transition-opacity', {
'opacity-0': isCopied,
'opacity-0 group-hover:opacity-100': !isCopied,
})}
/>
<Icon
iconName="check"
iconStyle="regular"
className={clsx('absolute text-sm text-neutral-subtle transition-opacity', {
'opacity-100': isCopied,
'opacity-0': !isCopied,
})}
/>
</span>
<span className="font-normal text-neutral">{trimId(deploymentId ?? '')}</span>
</span>
</Badge>
</button>
Comment on lines +24 to +30
const handleCopyExecutionId = () => {
if (!deploymentId) return

copyToClipboard(deploymentId)
setIsCopied(true)
setTimeout(() => setIsCopied(false), 1000)
}
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.87%. Comparing base (925eea4) to head (e27558e).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...r-environment-stages/header-environment-stages.tsx 50.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2694      +/-   ##
===========================================
- Coverage    44.72%   35.87%   -8.86%     
===========================================
  Files         1093        7    -1086     
  Lines        23121      131   -22990     
  Branches      6762       50    -6712     
===========================================
- Hits         10342       47   -10295     
+ Misses       10986       73   -10913     
+ Partials      1793       11    -1782     
Flag Coverage Δ
unittests 35.87% <50.00%> (-8.86%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@RemiBonnet RemiBonnet left a comment

Choose a reason for hiding this comment

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

Thanks @rmnbrd !

The behavior/UI is different with other page, could we harmonize this one?
You can check here for example

Image

@rmnbrd
Copy link
Copy Markdown
Contributor Author

rmnbrd commented May 20, 2026

Thanks @rmnbrd !

The behavior/UI is different with other page, could we harmonize this one? You can check here for example

Image

Yes, but this one is plain text, the other is inside a Badge component with borders.
@TheoGrandin74 What do you think? If we want to harmonize it, how should we do it?

@TheoGrandin74
Copy link
Copy Markdown
Contributor

@rmnbrd We can harmonize, and maybe put everything in the deployment logs in badge so we don't have the issue again.
Also, minor comments but since it's the same behavior as the one we have in the commit badge in the service list, we should have the same visuals? With the "copied" in green etc.
image

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.

4 participants