Skip to content

refactor(ui): migrate devtools panel to shadcn-vue#12

Merged
jevin98 merged 31 commits into
mainfrom
codex/shadcn-vue-ui
May 15, 2026
Merged

refactor(ui): migrate devtools panel to shadcn-vue#12
jevin98 merged 31 commits into
mainfrom
codex/shadcn-vue-ui

Conversation

@jevin98

@jevin98 jevin98 commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the Element Plus DevTools panel with local shadcn-vue style components built on Reka UI, Tailwind CSS v4 tokens, lucide icons, and vue-sonner.
  • Rebuild the panel as a compact black/white workspace layout with the logo header, top-right stats/language/theme controls, selection cards, filter controls, and a native diff table.
  • Preserve the existing CSS diff workflow: two-element comparison, changed-only/all-properties modes, property filtering, copy-on-click values, clear selection, and cross-window/tab sync.
  • Improve theme and locale behavior: locale uses an extensible supported-locale selector, theme defaults to system preference, icon control labels are localized, and theme only persists after the user toggles manually.
  • Make diffs clearer: matching values stay neutral, the second differing value is emphasized, missing values are highlighted on either side, and missing values are localized instead of leaking Chinese text in English mode.
  • Polish selected-element details and table headers: compact element labels, clickable detail popovers, single-element removal, synced diff clearing after removal, one-line detail labels, and no unused back-to-top control.
  • Fix review follow-ups for narrow DevTools sidebars by removing the page-level minimum width, resetting body margin, and keeping horizontal overflow inside the diff table container.
  • Move utility coverage from entrypoints/**/*.node-test.ts into the configured Vitest unit runner so pnpm test:unit exercises locale/diff/theme helpers.
  • Merge the latest main, update WXT/Tailwind-related dependency state, add the missing ESLint node import resolver, and refresh img/screenshot.png for the new UI.

Validation

  • pnpm exec eslint .
  • pnpm run compile
  • pnpm test:unit
  • pnpm test:e2e

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d622760041

ℹ️ 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".

Comment thread entrypoints/devtools-panel/devtools-panel.vue Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72e3b8f541

ℹ️ 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".

<Button
variant="ghost"
size="icon"
:aria-label="isDark ? 'Switch to light theme' : 'Switch to dark theme'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Localize the new control labels

When the panel language is switched to zh_CN, this newly added theme button remains announced in English because the label is hard-coded instead of going through messages.json/t(). The repository instructions require updating both locales for user-visible strings; the same applies to the new Clear filter and Back to top labels, so screen-reader users still get mixed-language controls after toggling locales.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d9d43525b

ℹ️ 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".

Comment on lines +1 to +2
import assert from 'node:assert/strict'
import { describe, it } from 'node:test'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Node tests out of vue-tsc

These new .node-test.ts files sit under entrypoints, which the WXT-generated tsconfig type-checks as part of pnpm compile; the project also narrows compilerOptions.types to chrome and does not add @types/node. As a result vue-tsc --noEmit will include this import and fail on missing node:assert/strict/node:test typings before the extension can compile. Please either exclude these tests from the app tsconfig or add a separate test tsconfig/Node typings.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cfc15d901

ℹ️ 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".

Comment on lines +8 to +9
if (!row.isDiff || valueType === 'left') {
return 'muted'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Highlight missing values on either side

When a CSS custom property exists only on the right element, compareStyles emits left: '未定义', but this early return mutes every left cell before checking whether that cell is actually missing. That makes the missing side look like an ordinary value, while the reverse selection order gets the dashed missing treatment; please check for UNDEFINED_STYLE_VALUE on both sides so missing properties are highlighted regardless of selection order.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc6f291433

ℹ️ 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".

cssDiffs.length = 0

// Send selected data to other windows/tabs
SM.send(selectedEl)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear synced diffs after removing one side

When a user removes just one selected element, this sends a one-element payload to the other synced DevTools panels. The receiver clears and repopulates selectedEl, but only clears cssDiffs for an empty payload or recomputes for two elements, so synced panels keep showing the stale diff table while displaying only one selected element. This only happens in the cross-window/tab sync path for the new single-selection remove action; clear or recompute the remote diffs for payloads with fewer than two selections.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbbf92b9fe

ℹ️ 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".

Comment thread assets/main.css
Comment on lines +86 to +91
body {
@apply bg-background text-foreground antialiased;
min-width: 520px;
padding: 16px;
overflow-x: hidden;
overflow-y: hidden;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset the body margin before hiding overflow

Because browsers give body an 8px default margin, the new fixed-height panel (100vh - 32px) plus 16px top/bottom padding still occupies more than the DevTools pane once overflow-y is hidden here. In normal browser styling this clips the bottom of the sidebar/table instead of allowing it to scroll; reset the body margin or account for it before disabling overflow.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f32c9147b9

ℹ️ 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".

Comment thread assets/main.css Outdated
Comment on lines +88 to +90
min-width: 520px;
padding: 16px;
overflow-x: hidden;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let narrow DevTools sidebars shrink

When the Elements sidebar is resized below 520px, this new body min-width forces the whole panel wider than the available DevTools pane, and overflow-x: hidden prevents users from scrolling to the clipped header controls/content. Since the diff table already has its own horizontal scroller, the page shell should not impose an unscrollable minimum width on the sidebar.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4cd1a71136

ℹ️ 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".

@@ -0,0 +1,38 @@
import assert from 'node:assert/strict'
import { describe, it } from 'node:test'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Move these tests under the configured runner

These new node:test files are never exercised by the repository's test command: package.json still runs vitest run, and vitest.config.ts limits discovery to tests/unit/**/*.test.ts, so files named entrypoints/**/.node-test.ts are silently skipped. That means regressions in getDiffValueTone/getDiffValueClass can pass CI unless these cases are moved under tests/unit with the configured *.test.ts pattern or a Node test script is added.

Useful? React with 👍 / 👎.

@jevin98

jevin98 commented May 15, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccd898a735

ℹ️ 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".

variant="ghost"
size="icon"
data-testid="theme-toggle"
:aria-label="isDark ? 'Switch to light theme' : 'Switch to dark theme'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Localize the new control labels

When the panel locale is switched to Chinese, screen-reader users still get English for this newly added theme toggle label because the strings are hard-coded instead of going through t(...) and the locale files. This also violates the repo's i18n convention to update both locale files for user-visible strings; please add message keys for these new control labels and use them here.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a47bf4cef

ℹ️ 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".

Comment thread assets/main.css
min-width: 0;
margin: 0;
padding: 16px;
overflow-y: hidden;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve a vertical scroll path for short panes

When the DevTools pane is docked/resized short enough that the header plus selection/filter cards exceed the available height, the panel content overflows the fixed-height <main> but the body is no longer scrollable here; only the diff table container has overflow-auto, so the lower controls/table can be clipped and unreachable. Please keep a page-level vertical scroll fallback or make the whole panel shell scroll in this constrained-height case.

Useful? React with 👍 / 👎.

@jevin98 jevin98 merged commit 5af7e9a into main May 15, 2026
1 check passed
@jevin98 jevin98 deleted the codex/shadcn-vue-ui branch May 15, 2026 03:51
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.

1 participant