Skip to content

feat(dashboard): add copy-to-clipboard button for json context blocks - #439

Merged
unjica merged 3 commits into
Telemetry-Tracker:developfrom
FelineFantasy:feature/dashboard-code-copy
Jul 15, 2026
Merged

unjica merged 3 commits into
Telemetry-Tracker:developfrom
FelineFantasy:feature/dashboard-code-copy

Conversation

@FelineFantasy

Copy link
Copy Markdown
Contributor

Base branch: open feature and fix PRs against develop. Milestone releases promote develop → main — see docs/RELEASE.md.

Summary

#232

How to test

Code review (Bugbot)

  • For notification, alert, billing, ingest, or auth changes: ran /review-bugbot in Cursor before opening this PR (optional but recommended — GitHub Bugbot may skip duplicate review)
  • Addressed or replied to Bugbot findings (resolve thread + update .cursor/BUGBOT.md if a finding was a false positive)

Checklist

  • Tests pass (pnpm test; use RUN_DB_INTEGRATION_TESTS=true + Postgres if API integration behavior changed)
  • Lint passes (pnpm lint)
  • Build succeeds (pnpm build)
  • CHANGELOG.md updated under [Unreleased] (if user-facing)
  • Documentation updated (if needed)
  • New code follows the existing style
  • No breaking changes (or called out clearly above)

Security / privacy

@FelineFantasy
FelineFantasy requested a review from unjica as a code owner July 14, 2026 20:28

@unjica unjica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for working on this! The copy-button implementation looks good and matches the existing DocsCodeBlock pattern.

There’s one merge blocker at the moment: JsonContextView.tsx now uses useState/useCallback, but it’s missing the "use client"; directive, which causes the dashboard build to fail.

Could you please add "use client"; at the top of the file and push an update? After that I’ll take another look.

The missing aria-label and clipboard error handling are minor and can be improved later if you’d like.

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

Hey @unjica! 👋

Thanks for the review. I've added the "use client"; directive to JsonContextView.tsx.

Should be good to go now. Ready for another look! 🚀

unjica

This comment was marked as outdated.

@unjica
unjica dismissed their stale review July 15, 2026 10:40

Approval withdrawn.

@unjica unjica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding the "use client" directive — the build issue is resolved.

I noticed one remaining UI issue in the current diff: the original title header is still present, and the new title + copy-button header is nested inside it. This appears to render the title twice and adds a duplicated border/header wrapper.

Could you remove the old header wrapper and keep only the new flex header containing the title and Copy button? After that, this should be ready to merge.

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

Hey @unjica! 👋

I've checked both errors/[id]/page.tsx and events/[id]/page.tsx - there's no duplicate title header around JsonContextView. The component is used correctly in both files.

Could you please point me to where you're seeing the duplication? Maybe I'm missing something.

Thanks! 🚀

@unjica unjica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Correction: I re-checked the final branch state and the header is not duplicated. I had misread GitHub’s unified diff, where the removed and added lines appeared together.

The final component correctly contains a single header with the title and Copy button. Sorry for the confusion — this looks good now.

@unjica
unjica merged commit 94aa6af into Telemetry-Tracker:develop Jul 15, 2026
5 of 8 checks passed
@unjica unjica mentioned this pull request Jul 15, 2026
1 of 3 tasks
@FelineFantasy
FelineFantasy deleted the feature/dashboard-code-copy branch July 15, 2026 11:48
FelineFantasy pushed a commit to FelineFantasy/telemetry-tracker that referenced this pull request Jul 16, 2026
Dashboard JSON context copy button (Telemetry-Tracker#439).

Co-authored-by: Cursor <[email protected]>
@unjica unjica added this to the v1.9.x — Platform releases milestone Jul 17, 2026
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