feat(desktop): copy GitHub URL from pull request pane header

Merged
KI
2mo ago
+66-28

What & why

Add a copy button beside the expand control in the pull request pane header, so users can copy the PR's GitHub URL without opening GitHub. The button uses the cached PR URL, briefly shows a checkmark after copying, and reports clipboard failures.

How I tested it

  • In this branch's signed-in Electron renderer at localhost:4245, opened workspace PR #7485 through the sidebar and clicked the new copy button. Confirmed the Copied state and clipboard value https://github.com/superset-sh/superset/pull/7485.
  • Captured and reviewed a pane-header screenshot locally.
  • bun run lint, bun run typecheck (39 packages), bun run check:i18n, and bun run check:plugins pass.
  • bun run test stopped in @superset/trpc on environment-variable validation during module loading (273 pass, 1 fail, 1 error). The full suite did not complete.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (CI fails on lint warnings too)
  • "Allow edits from maintainers" is checked on fork PRs (not a fork PR)

Summary by cubic

Adds a copy button beside the expand control in the pull request pane header, so users can copy the PR's GitHub URL without opening GitHub. The button only renders once the URL is loaded, shows a checkmark after copying, and reports clipboard failures with an error toast.

Summary by CodeRabbit

  • New Features
    • Added a copy-to-clipboard button for pull request URLs when available.
    • The button provides visual confirmation after copying and displays an error notification if copying fails.
    • Retained the option to open the pull request in the Pull Requests view.