Skip to content

refactor(app): set field background directly in theme tokens - #3744

Merged
kodiakhq[bot] merged 3 commits into
mainfrom
elizabet/theme-field-background-tokens
Nov 20, 2026
Merged

kodiakhq[bot] merged 3 commits into
mainfrom
elizabet/theme-field-background-tokens

Conversation

@elizabetdev

@elizabetdev elizabetdev commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

In dark mode, the field background now has opacity so it works on different backgrounds, such as popovers. It was a solid #2d2d2d from the Click UI token --click-field-color-background-default, which sat wrong on surfaces that are not the page body. This PR removes that token and sets --color-bg-field directly in both themes.

  • Dark: rgb(255 255 255 / 6%), a translucent white overlay. On the page body it stays close to the old solid color. On popovers, modals, and other surfaces it picks up the background beneath it.
  • Light: unchanged (#fbfcff).

Only the theme tokens file changes. Components already read --color-bg-field, so nothing else needs updating.

Best place to test: the Group by popover on the Search page. Its "Search fields" input sits on a popover surface, so the translucent field is visible there against the popover background.

Screenshots or video

image

How to reproduce

Starting point: yarn app:dev:local connected to the demo server, or
play.hyperdx.io, in dark mode.

On main:

  1. Open Search.
  2. Click the Group by button in the search toolbar.
  3. In the popover, look at the Search fields input and compare its
    background with the popover background.

On this branch:

  1. Repeat the same steps and compare the Search fields input background
    with the popover background.

How to test on Vercel preview

Preview routes: /search

Steps:

  1. Set the theme to dark.
  2. Click the Group by button.
  3. Verify the Search fields input has a visible background that differs
    from the popover surface.

References

  • Related PRs: none

The dark field background came from a Click UI token that resolved to a
solid #2d2d2d. Set the field background directly in both themes instead.
Dark mode now uses a translucent white overlay, so the field follows the
surface beneath it. Light mode keeps its existing value.
@elizabetdev
elizabetdev requested a review from a team as a code owner November 20, 2026 14:14
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 20, 2026 8:16pm UTC
hyperdx-storybook Ready Ready Preview Nov 20, 2026 8:16pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c274d53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 6
  • Branch: elizabet/theme-field-background-tokens
  • Author: elizabetdev

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.13%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

hovered or is the currently-selected entry. */
--color-bg-option-active: var(--palette-neutral-712);
--color-bg-field: var(--click-field-color-background-default);
--color-bg-field: rgb(255 255 255 / 6%);

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.

🟡 P2 — Translucent field token makes the floating SQL autocomplete info panel see-through in dark mode

packages/app/src/components/SQLEditor/utils.ts:175 sets .cm-completionInfo to var(--color-bg-field). CodeMirror positions that panel absolutely outside the autocomplete tooltip (left: 100% / right: 100%), so the tooltip's --color-bg-surface does not sit behind it. At 6% white, the editor text and page content under the panel now show through the help text. Give the panel an opaque surface such as var(--color-bg-surface), or keep an opaque value for floating uses of the token.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 P0/P1 in code this PR adds or changes: fix before asking for review.
  • 🟡 P2 in code this PR changes: your call. Fix if small, otherwise reply.
  • 🔵 P3 is collapsed at the bottom: nobody needs to act on it before merge.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    priority. Reply with one sentence; if it is P0, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

1 finding(s): 🔴 0 P0/P1 · 🟡 1 P2 · 🔵 0 P3

Already reported on an earlier push — no new comments. 1 unchanged from an earlier push (already inline above).


Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

Refactor of dark/light field-background theme tokens: removes the --click-field-color-background-default Click UI token and sets --color-bg-field directly — dark becomes translucent rgb(255 255 255 / 6%), light stays #fbfcff. Scope is tiny (one SCSS file + one changeset), but --color-bg-field is consumed across the app, so the review focused on whether a solid→translucent swap regresses any surface that is not the page body.

Verified safe: the removed token has zero remaining references (no other consumers, Click UI does not read it back); light mode is byte-identical to the old value (#fbfcff), so it is a true no-op; the changeset is well-formed. For on-body input fields, 6% white over the dark body (#1f1f1c) composites to ~#2c2c2a, visually indistinguishable from the old solid #2d2d2d — those consumers are effectively unchanged.

✅ No critical issues found.

🟡 P2 -- recommended

  • packages/app/src/components/SQLEditor/utils.ts:175 -- the SQL-editor autocomplete info popup (.cm-completionInfo) reads --color-bg-field, which in dark mode changes from solid #2d2d2d to rgb(255 255 255 / 6%); unlike the sibling list .cm-tooltip-autocomplete (which uses opaque --color-bg-surface), this popup is a free-floating surface, so at ~6% opacity the syntax-highlighted code or lighter modal content behind it bleeds through and hurts legibility.
    • Fix: point .cm-completionInfo at an opaque surface token such as var(--color-bg-surface) so the floating popup stays readable regardless of what it overlaps, rather than inheriting the translucent field value intended for on-body inputs.
    • ce-correctness-reviewer, ce-maintainability-reviewer

Reviewers (3): ce-correctness-reviewer, ce-maintainability-reviewer, ce-project-standards-reviewer

Testing gaps: No visual/snapshot coverage asserts .cm-completionInfo stays legible in dark mode when floating over editor code or inside a modal — the one surface where the solid→translucent change is observable.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 472 passed • 1 skipped • 1296s

Status Count
✅ Passed 472
❌ Failed 0
⚠️ Flaky 10
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

The changelog should say why the field background is translucent: in dark
mode it needs opacity so it works on different backgrounds, such as popovers.
@kodiakhq
kodiakhq Bot merged commit 6a5fd11 into main Nov 20, 2026
28 checks passed
@kodiakhq
kodiakhq Bot deleted the elizabet/theme-field-background-tokens branch November 20, 2026 20:20

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — c274d53b Deployed Nov 20, 2026 by vercel[bot]
Preview – hyperdx-storybook — c274d53b Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants