Skip to content

Fix light mode active request payload modal - #1714

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.7.3from
rdself:coder/light-mode-log-payload-popover
Apr 28, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.7.3from
rdself:coder/light-mode-log-payload-popover

Conversation

@rdself

@rdself rdself commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the missing card theme token so existing bg-card utilities resolve consistently.
  • Make the active request payload panel and modal use opaque surface backgrounds in light mode.
  • Refine the modal overlay, border, and shadow so payload cards stay readable without background bleed-through.

Validation

  • prettier --check src/app/globals.css src/shared/components/ActiveRequestsPanel.tsx
  • eslint src/shared/components/ActiveRequestsPanel.tsx
  • Captured a light-mode screenshot with a mocked active request payload.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new --color-card CSS variable across light and dark themes and updates the styling of the ActiveRequestsPanel component. The changes replace bg-card with bg-surface and adjust the modal's backdrop blur, borders, and shadow effects. Feedback was provided regarding the use of hardcoded values and custom shadows in the modal, suggesting a return to theme-aware variables and standard Tailwind scales to ensure design consistency and maintainability.

Comment on lines +123 to +124
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/55 px-4 py-6 backdrop-blur-[2px]">
<div className="flex max-h-[85vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-black/10 bg-surface shadow-[0_24px_80px_rgba(15,23,42,0.24)] dark:border-white/10 dark:shadow-2xl">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The modal styling introduces several arbitrary values and inconsistencies with the application's design system. Using border-black/10 and a custom hardcoded shadow deviates from the theme variables (like border-border and --shadow-elevated) and other modals in the app (e.g., AuditLogTab.tsx). This makes the UI less consistent and harder to maintain if theme colors are updated. Additionally, the custom shadow is only applied in light mode, creating a different sense of depth compared to the shadow-2xl used in dark mode. Consider using standard Tailwind scales and theme-aware variables to ensure a unified design language.

Suggested change
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/55 px-4 py-6 backdrop-blur-[2px]">
<div className="flex max-h-[85vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-black/10 bg-surface shadow-[0_24px_80px_rgba(15,23,42,0.24)] dark:border-white/10 dark:shadow-2xl">
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/55 px-4 py-6 backdrop-blur-sm">
<div className="flex max-h-[85vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-2xl">

@rdself
rdself marked this pull request as ready for review April 28, 2026 08:26
@rdself
rdself requested a review from diegosouzapw as a code owner April 28, 2026 08:26
Copilot AI review requested due to automatic review settings April 28, 2026 08:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes light-mode readability issues in the Active Request payload panel/modal by ensuring theme tokens and modal surfaces are opaque and consistently themed.

Changes:

  • Adds a missing --color-card theme token for consistent bg-card resolution across light/dark themes.
  • Updates ActiveRequestsPanel container and modal to use opaque bg-surface backgrounds, and refines overlay/border/shadow styling.
  • Adds an integration wiring test to prevent regressions in the theme surface/modal class usage and token presence.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/integration/integration-wiring.test.ts Adds a regression test asserting --color-card presence and that the modal/panel use bg-surface (and not translucent bg-card/...).
src/shared/components/ActiveRequestsPanel.tsx Switches panel + modal surfaces to bg-surface, adjusts overlay opacity/blur, and tunes border/shadow for light mode.
src/app/globals.css Introduces --color-card for both light and dark theme definitions and exposes it in the Tailwind @theme block.

Comment on lines +260 to +273
it("keeps the active request payload modal on opaque theme surfaces", () => {
const activeRequests = readProjectFile("src/shared/components/ActiveRequestsPanel.tsx");
const globals = readProjectFile("src/app/globals.css");

assert.ok(activeRequests, "ActiveRequestsPanel should exist");
assert.ok(globals, "globals.css should exist");
assert.match(globals, /--color-card:\s+#ffffff/);
assert.match(globals, /--color-card:\s+#161b22/);
assert.match(globals, /--color-card:\s+var\(--color-card\)/);
assert.match(activeRequests, /rounded-xl border border-border bg-surface/);
assert.match(activeRequests, /backdrop-blur-sm/);
assert.match(
activeRequests,
/rounded-2xl[^"]*border border-border[^"]*bg-surface[^"]*shadow-2xl/

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The repo’s coverage gate is enforced via npm run test:coverage (c8 --check-coverage at 60%+). This PR changes production code in src/, so please run that command (or CI equivalent) and ensure it passes; if it fails, add/update tests in this PR until the gate is green.

Copilot generated this review using guidance from repository custom instructions.
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.7.3 April 28, 2026 11:21
@diegosouzapw
diegosouzapw merged commit 2f1c904 into diegosouzapw:release/v3.7.3 Apr 28, 2026
1 check passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @rdself for fixing the light mode payload modal! 🎉 Adding the missing card token and switching to opaque surfaces with backdrop-blur was the right call. Merged into release/v3.7.3.

@diegosouzapw diegosouzapw mentioned this pull request Apr 28, 2026
@rdself
rdself deleted the coder/light-mode-log-payload-popover branch April 28, 2026 18:10
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
Integrated into release/v3.7.3 — fixes light mode payload modal transparency
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
Integrated into release/v3.7.3 — fixes light mode payload modal transparency
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Integrated into release/v3.7.3 — fixes light mode payload modal transparency
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.

3 participants