Skip to content

iris: add IP cp buttons#3655

Merged
ravwojdyla merged 2 commits intomainfrom
rav-add-ip-cp-btn
Mar 14, 2026
Merged

iris: add IP cp buttons#3655
ravwojdyla merged 2 commits intomainfrom
rav-add-ip-cp-btn

Conversation

@ravwojdyla
Copy link
Copy Markdown
Contributor

Add Iris copy IP buttons, to make it easier to SSH into stuff.

@ravwojdyla ravwojdyla requested a review from rjpower March 14, 2026 04:10
@rjpower
Copy link
Copy Markdown
Collaborator

rjpower commented Mar 14, 2026

@claude there's got to be a shared components area we can put things like these copy commands?

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 14, 2026

Claude finished @rjpower's task in 3m 19s —— View job


Extracted copy button into shared component

  • Read PR changes to understand the copy button pattern
  • Explore the dashboard component structure for shared components
  • Create CopyButton.vue in components/shared/
  • Refactor EndpointsTab.vue, FleetTab.vue, WorkerDetail.vue to use it
  • Run pre-commit and push

Yes — there's already a lib/iris/dashboard/src/components/shared/ directory with reusable components (DataTable, InfoCard, StatusBadge, etc.).

I extracted the duplicated copy-to-clipboard button into a new CopyButton.vue shared component, reducing ~82 lines of duplicated logic/SVG across 3 files down to a single 30-line component + ~44 lines of clean usage.

The component takes a value prop (the address to copy) and an optional title prop. Each instance manages its own copied/checkmark state internally — no need for parent ref tracking.

Testing: Pre-commit checks pass. This is a pure Vue template refactor with no behavior change — the copy logic (strip protocol/port, write to clipboard, show checkmark for 1.5s) is preserved exactly.
·

Move the duplicated copy-to-clipboard logic and SVG icons from
EndpointsTab, FleetTab, and WorkerDetail into a reusable
CopyButton component in components/shared/.

Co-authored-by: Russell Power <rjpower@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ravwojdyla ravwojdyla enabled auto-merge (squash) March 14, 2026 04:21
@ravwojdyla ravwojdyla merged commit 925472f into main Mar 14, 2026
16 checks passed
@ravwojdyla ravwojdyla deleted the rav-add-ip-cp-btn branch March 14, 2026 04:26
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