Skip to content

refactor: Clean up unused clipboard handler and dead code in ResultDashboard #230

Closed

Description

@O2sa

In src/features/comparison/components/result-dashboard.tsx, clipboard copying logic is defined but never rendered.

Motivation

Unused hooks and dead functions clutter the component and confuse contributors. We should either wire this up to an active button or clean up the unused state.

Tasks

  • Inspect result-dashboard.tsx lines 65 and 113-128 (useClipboardCopy and handleCopy).
  • Either:
    • Option A (Recommended): Add a small 'Copy Raw JSON' / 'Debug Data' action button or dropdown item that invokes handleCopy for developers needing raw payload data.
    • Option B: Remove the unused handleCopy, copied, and unused icon imports (Check, Copy).
  • Run pnpm lint and npx tsc --noEmit to ensure clean code.

Tip

🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨

Activity

  1. rahul05ranjan commented on Oct 23, 2026

    @rahul05ranjan

    assign me

  2. github-actions commented on Oct 23, 2026

    @github-actions

    🎉 Issue assigned to @rahul05ranjan! Happy coding!

  3. rahul05ranjan commented on Oct 23, 2026

    @rahul05ranjan

    Verified on current main: handleCopy (result-dashboard.tsx) is wired to a rendered secondary Copy button — onClick={handleCopy} with the copied state, Check/Copy icons and aria-labels — next to the Share and Copy-markdown buttons, so both it and the useClipboardCopy instance at line 66 are in use. This looks already implemented (Option A); sharing in case it helps you close the issue.

  4. O2sa commented on Oct 23, 2026

    @O2sa
    OwnerAuthor

    @rahul05ranjan
    Thanks for pointing this out! I checked the current main branch, and the raw JSON copy functionality is already implemented in ResultDashboard. The Copy button is rendered and connected to handleCopy, so this issue appears to have been resolved already. I appreciate your effort in reviewing the code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions