Skip to content

Fix stale CSS diff results and reduce copy-handler overhead#5

Open
jevin98 wants to merge 1 commit intomainfrom
codex/identify-optimization-opportunities-and-create-pr
Open

Fix stale CSS diff results and reduce copy-handler overhead#5
jevin98 wants to merge 1 commit intomainfrom
codex/identify-optimization-opportunities-and-create-pr

Conversation

@jevin98
Copy link
Copy Markdown
Owner

@jevin98 jevin98 commented Apr 21, 2026

Summary

  • clear cssDiffs before each comparison so the table reflects only the latest selected pair
  • initialize useClipboard once at hook setup instead of creating a new clipboard instance and watcher on every cell click
  • keep copy success feedback while avoiding repeated reactive watchers in handleCopyStyle

Why

Selecting new elements after an earlier comparison could append old rows to new results, producing stale/duplicated diffs. Also, creating a clipboard composable + watcher per click introduces avoidable overhead and potential watcher accumulation.

Scope

  • entrypoints/devtools-panel/hooks/useDevToolsPanel.ts

Validation

  • static inspection only (no runtime execution in this environment)

Codex Task

@jevin98
Copy link
Copy Markdown
Owner Author

jevin98 commented Apr 21, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant