Skip to content

fix(frontend): improve native select readability in dark mode - #683

Merged
khaira777 merged 5 commits into
mainfrom
codex/fix-issue-681-native-options
Sep 9, 2026
Merged

khaira777 merged 5 commits into
mainfrom
codex/fix-issue-681-native-options

Conversation

@khaira777

@khaira777 khaira777 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fix GitHub issue #681: make every native HTML select and its option popup readable in the app's dark mode, including Add Product category, sale unit, tax selectors, Staff role, Support, Settings language, Print Method, printer settings, Orders, and Tax controls. Use a shared renderer-side CSS solution that follows the light/dark/System theme, explicitly themes native select and option foreground/background colors, and leaves Radix dropdown components unchanged. Keep backend, API, database, translations, and Electron main code untouched. Include executable real-Electron regression coverage for dark, light, and System theme transitions against the actual Add Product native selects. Deliver from the isolated feature branch through the no-mistakes pipeline, including review, tests, lint, push, PR creation, and CI validation. Do not touch the unrelated codex/settings-request-storm branch or its settings PR.

What Changed

  • Added shared renderer-side styling for native selects and option popups, including explicit foreground/background colors and dark color-scheme support.
  • Expanded real-Electron regression coverage for Add Product native selects across dark, light, and System theme transitions.

Risk Assessment

✅ Low: The change is narrowly scoped to shared renderer CSS and real-Electron theme regression coverage, with no backend, API, database, translation, or Electron main-process changes found.

Testing

Built the backend and renderer, then ran the focused real-Electron theme regression across Dark, Light, System transitions and persisted relaunch; Add Product select and option colors were asserted against actual computed theme colors. All focused tests passed, direct Add Product dark-mode evidence was captured, generated test/build artifacts were cleaned, and only the two intended source files remain changed. Lint and full-suite validation were not run per this test-phase boundary.

Add Product native selects in dark mode
Dark theme Settings surface
System theme surface
Persisted dark theme after relaunch

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • npm ci
  • cd frontend && npm ci
  • npm run build
  • cd frontend && npx cross-env NEXT_BUILD_MODE=desktop npm run build
  • FLO_E2E_EVIDENCE_DIR=... npx playwright test e2e/desktop/theme.electron.spec.ts --config=playwright.electron.config.ts --project=electron-desktop
  • Direct real-Electron Add Product screenshot/evidence check
  • Visual inspection of captured screenshots
  • Final git status and diff scope verification
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ frontend/e2e/desktop/theme.electron.spec.ts - Targeted frontend ESLint could not run because the local eslint executable/dependencies are unavailable (eslint: command not found).
✅ **Push** - passed

✅ No issues found.

Summary by CodeRabbit

  • New Features
    • Improved native dropdown styling to match the app’s light and dark themes.
    • Dropdown text, backgrounds, and option colors now adapt consistently when switching themes or using system theme settings.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8cad5ab9-11a8-41aa-861c-98b82ff3a854

📥 Commits

Reviewing files that changed from the base of the PR and between 6399f1b and 0bf984f.

📒 Files selected for processing (1)
  • frontend/e2e/desktop/theme.electron.spec.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ea284146-9726-4f3d-b96f-7a5762f716be

📥 Commits

Reviewing files that changed from the base of the PR and between e572aff and 6399f1b.

📒 Files selected for processing (2)
  • frontend/e2e/desktop/theme.electron.spec.ts
  • frontend/src/app/globals.css

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Native <select> and <option> elements now use theme-aware colors. Electron tests verify these styles in explicit Dark and Light modes and in System mode.

Changes

Native select theming

Layer / File(s) Summary
Select theme styling
frontend/src/app/globals.css
Base styles set select and option colors from card theme variables. Dark mode selects use the dark color scheme.
Electron theme validation
frontend/e2e/desktop/theme.electron.spec.ts
Tests inspect computed select and option styles after explicit and system theme changes. The file comment references native select theming.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6399f

Native select and option colors now follow the application theme, with Electron coverage for light, dark, and system theme transitions. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: improving native select readability in dark mode.
Description check ✅ Passed The description is detailed and relevant. It explains the issue, implementation, scope, testing, screenshots, compatibility impact, and pipeline status. It does not use the repository template heading…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-issue-681-native-options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds shared theme-aware styling for native select controls and expands real-Electron regression coverage across explicit and system theme transitions.

  • Applies light and dark color schemes and explicit theme colors to native selects and options.
  • Verifies Add Product selects in dark, light, and System modes.
  • Removes the historical issue tag previously reported in the test header.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
frontend/src/app/globals.css Adds shared foreground, background, and color-scheme rules for native select controls and options.
frontend/e2e/desktop/theme.electron.spec.ts Adds real-Electron assertions for native select styling across dark, light, and System theme transitions and resolves the prior historical-tag comment issue.

Reviews (2): Last reviewed commit: "Update frontend/e2e/desktop/theme.electr..." | Re-trigger Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@khaira777
khaira777 merged commit d79341c into main Sep 9, 2026
15 checks passed
@khaira777
khaira777 deleted the codex/fix-issue-681-native-options branch September 9, 2026 20:25
@itoqa

itoqa Bot commented Sep 9, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: 0bf984f: 12 test cases ran, 12 passed ✅.

Summary

Coverage spans product creation and editing, unit and quantity rules, theme persistence and rapid switching, readable native dropdowns across product and settings flows, and successful build and lint behavior. It includes normal user flows, persistence checks, UI rendering across light, dark, and system themes, and an adversarial review of tax controls when taxes are disabled.

Safe to merge — no failures are attributable to this PR, with no regressions, new failures, or previously flagged PR-related failures remaining. The observed behavior is broadly healthy; the tax-control observation was independently judged intentional rather than a product defect.

Tests run by Ito

View full run

Result Severity Type Description
✅ — General The System theme check was blocked by the unavailable local Electron test environment, but the inspected application code contains the expected light and dark theme update path. No product defect was confirmed.
✅ — General The Add Product choices stayed readable in both light and dark themes. All four selects and their first options used the matching card colors, and the native controls reported the correct light or dark color scheme.
✅ — General The Add Product form showed readable dark colors for all four selects and their first options. The same colors and dark color scheme remained after reloading the page.
✅ — General After repeated dark and light theme changes, all four Add Product selectors showed the colors and native theme of the final setting.
✅ — Form Selecting kg updated the form, and submitting the completed Add Product form created Native Select Product under E2E Menu at ฿125.00.
✅ — Rev Native dropdowns on orders, support, and settings stayed readable in dark mode, including the tax settings page.
✅ — Rev In dark mode, choosing kg turned on fractional quantities and choosing each turned them off. The product was created, changed back to kg, and reopened with kg and fractional quantities still selected.
✅ — Rev Verified acceptable by independent adversarial review: the observed behavior is intended and documented in this codebase. Review notes: The finding incorrectly equates the checkout-facing no-tax mode with disabling configuration and diagnostic tools. The code and documentation consistently preserve an active pack, expose Advanced tax tools, and run a side-effect-free test calculation regardless of taxes_enabled; changing a test input while taxes are off is therefore intended rather than an inconsistent persisted checkout state. Th…
✅ — Rev The frontend lint check and production build completed successfully. The running product form loaded without console problems, and native selects showed readable colors in both dark and light themes.
✅ — Select All four product dropdowns and their first options use the light card colors and a light color scheme.
✅ — Select The Add Product form shows all four native choice fields with dark backgrounds and light text. Their option lists use the same readable colors, and the controls report the dark native color scheme.
✅ — Select System theme resolved to light, and all four Add Product selects and their options used matching light colors.

Tip

Reply with @itoqa to send us feedback on this test run.

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