Skip to content

Fix duplicate dark-mode utility conflicts, correct UMAP highlight scaling, and harden URL session codec tests#76

Merged
akutuva21 merged 3 commits intomainfrom
copilot/fix-duplicate-dark-mode-classes
Apr 19, 2026
Merged

Fix duplicate dark-mode utility conflicts, correct UMAP highlight scaling, and harden URL session codec tests#76
akutuva21 merged 3 commits intomainfrom
copilot/fix-duplicate-dark-mode-classes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 19, 2026

This PR removes conflicting/duplicate Tailwind dark-mode utilities flagged in UI components, fixes double-application of node size scaling in UMAP highlighting, and tightens URL session codec tests around optional/default and malformed-input behavior.

  • UI class cleanup (dark-mode consistency)

    • components/EditorPanel.tsx
      • Removed duplicate dark:border-slate-700
      • Removed conflicting dark:bg-* combinations (dark:bg-slate-900/50 vs dark:bg-slate-800/50, etc.)
      • Removed non-hover dark background on parameter-slider header where it conflicted with hover behavior
    • components/Header.tsx
      • Removed duplicate/conflicting dark backgrounds (dark:bg-slate-900 vs dark:bg-slate-800, dark:bg-slate-900 vs dark:bg-slate-700)
      • Removed duplicated dark:border-slate-700 and dark:text-slate-400
    • components/VisualizationPanel.tsx
      • Removed duplicate dark:border-slate-700
      • Kept a single dark background value where conflicting dark:bg-* classes existed
      • Removed duplicate dark text utilities in tab button variants
  • UMAP node highlight scaling fix

    • public/umap.html
      • Highlighted nodes previously multiplied nodeSize twice (base radius + highlight factor), causing quadratic slider behavior.
      • Introduced a named constant and applied only linear highlight scaling:
const HIGHLIGHT_SIZE_MULTIPLIER = 1.3;
let r = (mode === '3d' ? Math.max(3, 8 - p[2] * 0.2) : 6) * zoom * nodeSize;
if (isHovered || isSelected || isLocked) r *= HIGHLIGHT_SIZE_MULTIPLIER;
  • URL codec test strengthening

    • tests/urlStateCodec.spec.ts
      • Assert model= is omitted when modelId is undefined.
      • Assert default-tab URL (#/session?) decodes back to { tab: 'time-courses' }.
      • Make malformed-param warning assertions deterministic (exact count/order pattern).
      • Enforce deterministic compact short-payload prefix (u:).
      • Replace manual compact payload construction with production encodeSessionUrl(..., { forceCompact: true }) for schema-invalid coverage.
  • screenshot

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • rest.uniprot.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/bngplayground/bngplayground/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/bngplayground/bngplayground/node_modules/vitest/dist/workers/forks.js (dns block)
  • www.pathwaycommons.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/bngplayground/bngplayground/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/bngplayground/bngplayground/node_modules/vitest/dist/workers/forks.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"Multiple duplicate dark mode classes: 'dark:bg-slate-800/50' and 'dark:bg-slate-800' conflict, and 'dark:border-slate-700' is duplicated. Remove the conflicting and duplicate declarations.","fixFiles":[{"filePath":"components/EditorPanel.tsx","diff":"diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx\n--- a/components/EditorPanel.tsx\n+++ b/components/EditorPanel.tsx\n@@ -280,7 +280,7 @@\n                 </span>\n               )}\n               {loadedModelName && (\n-                <span className=\"text-[10px] font-bold text-slate-500 dark:text-slate-400 bg-slate-100 dark:bg-slate-800/50 dark:bg-slate-800 px-2 py-0.5 rounded-full border border-slate-200 dark:border-slate-700 dark:border-slate-700 truncate max-w-[120px]\" title={loadedModelName}>\n+                <span className=\"text-[10px] font-bold text-slate-500 dark:text-slate-400 bg-slate-100 dark:bg-slate-800 px-2 py-0.5 rounded-full border border-slate-200 dark:border-slate-700 truncate max-w-[120px]\" title={loadedModelName}>\n                   {loadedModelName}\n                 </span>\n               )}\n"}]},{"message":"Duplicate dark border class 'dark:border-slate-700' appears twice in the same className string. Remove the duplicate declaration.","fixFiles":[{"filePath":"components/EditorPanel.tsx","diff":"diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx\n--- a/components/EditorPanel.tsx\n+++ b/components/EditorPanel.tsx\n@@ -332,7 +332,7 @@\n         {/* Removed redundant big warning panel as per request */}\n       </div>\n \n-      <div className=\"mt-4 flex flex-col gap-3 shrink-0 border-t border-slate-200 dark:border-slate-700 pt-4 dark:border-slate-700\">\n+      <div className=\"mt-4 flex flex-col gap-3 shrink-0 border-t border-slate-200 dark:border-slate-700 pt-4\">\n         {/* Row 1: Actions & Simulation Controls */}\n         <div className=\"flex flex-wrap gap-3 items-center justify-between\">\n           <div className=\"flex flex-wrap items-center gap-2\">\n"}]},{"message":"Multiple duplicate dark mode classes: 'dark:border-slate-700' is duplicated, and 'dark:bg-slate-900/50' and 'dark:bg-slate-800/50' conflict. Remove the conflicting and duplicate declarations.","fixFiles":[{"filePath":"components/EditorPanel.tsx","diff":"diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx\n--- a/components/EditorPanel.tsx\n+++ b/components/EditorPanel.tsx\n@@ -389,7 +389,7 @@\n         </div>\n \n         {/* Row 2: Collapsible Parameter Sliders */}\n-        <div className=\"border border-slate-200 dark:border-slate-700 dark:border-slate-700 rounded-md bg-slate-50 dark:bg-slate-900/50 dark:bg-slate-800/50 overflow-hidden\">\n+        <div className=\"border border-slate-200 dark:border-slate-700 rounded-md bg-slate-50 dark:bg-slate-800/50 overflow-hidden\">\n           <button\n             onClick={() => setIsParamsOpen(!isParamsOpen)}\n             aria-expanded={isParamsOpen}\n"}]},{"message":"The dark background class 'dark:bg-slate-800/50' conflicts with the hover state 'dark:hover:bg-slate-700/50'. Consider removing 'dark:bg-slate-800/50' to let the background remain transparent until hover, or ensure both classes are intentional.","fixFiles":[{"filePath":"components/EditorPanel.tsx","diff":"diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx\n--- a/components/EditorPanel.tsx\n+++ b/components/EditorPanel.tsx\n@@ -394,7 +394,7 @@\n             onClick={() => setIsParamsOpen(!isParamsOpen)}\n             aria-expanded={isParamsOpen}\n             aria-controls=\"parameter-sliders-panel\"\n-            className=\"flex w-full items-center justify-between px-3 py-2 text-xs font-semibold text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:bg-slate-800/50 dark:hover:bg-slate-700/50 transition-colors\"\n+            className=\"flex w-full items-center justify-between px-3 py-2 text-xs font-semibold text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors\"\n           >\n             <span>Parameter Sliders</span>\n             <ChevronDownIcon className={`w-4 h-4 transition-transform duration-200 ${isParamsOpen ? 'rotate-180' : ''}`} />\n"}]},{"message":"Duplicate dark border class 'dark:border-slate-700' appears twice in the same className string. Remove the duplicate declaration.","fixFiles":[{"filePath":"components/EditorPanel.tsx","diff":"diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx\n--- a/components/EditorPanel.tsx\n+++ b/components/EditorPanel.tsx\n@@ -401,7 +401,7 @@\n           </button>\n \n           {isParamsOpen && (\n-            <div id=\"parameter-sliders-panel\" className=\"border-t border-slate-200 dark:border-slate-700 dark:border-slate-700 p-2\">\n+            <div id=\"parameter-sliders-panel\" ...

Copilot AI changed the title [WIP] Fix duplicate dark mode classes in EditorPanel Fix duplicate dark-mode utility conflicts, correct UMAP highlight scaling, and harden URL session codec tests Apr 19, 2026
Copilot AI requested a review from akutuva21 April 19, 2026 14:11
@akutuva21 akutuva21 marked this pull request as ready for review April 19, 2026 14:15
@akutuva21 akutuva21 merged commit 36399ef into main Apr 19, 2026
7 checks passed
@akutuva21 akutuva21 deleted the copilot/fix-duplicate-dark-mode-classes branch April 19, 2026 14:25
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.

2 participants