Repository navigation
feat(dashboard): add copy-to-clipboard button for json context blocks - #439
Conversation
unjica
left a comment
There was a problem hiding this comment.
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.
|
Hey @unjica! 👋 Thanks for the review. I've added the Should be good to go now. Ready for another look! 🚀 |
unjica
left a comment
There was a problem hiding this comment.
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.
|
Hey @unjica! 👋 I've checked both Could you please point me to where you're seeing the duplication? Maybe I'm missing something. Thanks! 🚀 |
unjica
left a comment
There was a problem hiding this comment.
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.
Dashboard JSON context copy button (Telemetry-Tracker#439). Co-authored-by: Cursor <[email protected]>
Base branch: open feature and fix PRs against
develop. Milestone releases promotedevelop→main— see docs/RELEASE.md.Summary
#232
How to test
Code review (Bugbot)
/review-bugbotin Cursor before opening this PR (optional but recommended — GitHub Bugbot may skip duplicate review).cursor/BUGBOT.mdif a finding was a false positive)Checklist
pnpm test; useRUN_DB_INTEGRATION_TESTS=true+ Postgres if API integration behavior changed)pnpm lint)pnpm build)[Unreleased](if user-facing)Security / privacy