Skip to content

Add configurable menu hover highlight color and opacity - #4412

Closed
cynicalight wants to merge 1 commit into
steipete:mainfrom
cynicalight:feat/custom-menu-hover-highlight
Closed

cynicalight wants to merge 1 commit into
steipete:mainfrom
cynicalight:feat/custom-menu-hover-highlight

Conversation

@cynicalight

Copy link
Copy Markdown

Summary

  • Add an opt-in menu hover highlight setting with a color picker and opacity slider.
  • Apply the custom color to SwiftUI menu cards, GPU-rendered selection rows, and the persistent Refresh row.
  • Adjust highlighted text color for translucent and bright custom fills.
  • Add localized labels and focused preference-loading tests.

Validation

  • swift build — passed.
  • PATH=/opt/homebrew/bin:$PATH make check — passed.
  • swift test --skip-build --filter MenuHighlightStyleTests — passed (3 tests).
  • swift test --skip-build --filter MenuCardViewRecyclingTests — passed (28 tests).
  • PATH=/opt/homebrew/bin:$PATH make test — failed in AbacusPluginTests because two existing timeout-sensitive cases reported .timedOut; the runner retried the group and one case still timed out.

UI

No screenshot was captured. The menu bar app was not launched against local accounts during validation.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T15:54:22.074320Z b65966f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

This PR adds an optional menu highlight color picker and opacity slider for custom menu cards and the Refresh row.

Example: Enable custom highlights with color #E8B078 and opacity 42%.

  • Before: Hovered custom rows use the system selection appearance.
  • After: Hovered custom rows use a translucent orange fill and normal label text.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation and isolated loading tests support review, but the contrast defect remains and persisted-preference compatibility lacks a fresh-install and stable-release upgrade run.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Needs a maintainer decision
User problem: Users cannot choose a custom hover fill instead of the designed system selection appearance.
Reason: The PR adds three persistent appearance settings without a linked usability requirement or owner approval.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep this PR open under repository policy; the optional customization needs an owner decision and has a concrete text-contrast defect.

Priority: P3
Reviewed head: b65966f1c081f7c031e62acb667aa58667560499
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should CodexBar add persistent custom menu highlight color and opacity preferences?
  • Recommendation: Retain native selection styling: Decline the additional preferences unless a concrete accessibility or usability need establishes their value.
  • Why: This changes intentional native appearance behavior through new settings, and no recorded owner decision approves that direction.

Before merge

  • Add real behavior proof - The body explicitly reports no app launch or screenshot, and the full discussion supplies no runtime artifact exercising the changed menu rendering; provide screenshots or a recording of the scoped scenarios and redact account details, keys, and private endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Choose foreground colors using the rendered fill's contrast (P2) - Enable custom highlights, choose #989898, and set opacity to 100%. The weighted sRGB channels evaluate to about 0.596, so this branch chooses white text over an opaque gray fill, yielding roughly 2.9:1 contrast instead of about 7.3:1 with black. The same foreground feeds card labels, GPU-tinted Overview content, and Refresh. The unconditional label-color choice below 65% opacity also ignores how the fill changes the background. Compare foreground contrast against the composited fill rather than using these fixed thresholds, and cover opaque gray and translucent fills in both appearances.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Choose foreground colors using the rendered fill's contrast — Sources/CodexBar/MenuHighlightStyle.swift:31-34

Tests

  • Missing end-to-end proof: Show the freshly built app applying and disabling custom highlights across SwiftUI cards, Overview GPU rows, and Refresh in light and dark appearances, including readable gray/translucent fills and an upgrade from v0.74.0.
Agent review details

How this fits together

Menu preferences persist appearance values in UserDefaults, which the shared styling helper supplies to SwiftUI cards, GPU selection layers, and the custom Refresh row.

flowchart TD
    A[Menu preferences] --> B[UserDefaults]
    B --> C[MenuHighlightStyle]
    C --> D[SwiftUI menu cards]
    C --> E[GPU selection rows]
    C --> F[Refresh row]
Loading

Technical review

Best possible solution:

If approved, preserve native styling by default and choose readable foreground colors from the rendered custom fill across all three paths.

Do we have a high-confidence way to reproduce the issue?

Source establishes the contrast failure for an enabled #989898 highlight at 100% opacity; no runtime reproduction was performed.

Is this the best way to solve the issue?

The shared helper is a sensible implementation boundary, but custom styling needs owner approval and foreground selection must account for actual contrast and transparency.

Full review comments:

  • [P2] Choose foreground colors using the rendered fill's contrast — Sources/CodexBar/MenuHighlightStyle.swift:31-34
    Enable custom highlights, choose #989898, and set opacity to 100%. The weighted sRGB channels evaluate to about 0.596, so this branch chooses white text over an opaque gray fill, yielding roughly 2.9:1 contrast instead of about 7.3:1 with black. The same foreground feeds card labels, GPU-tinted Overview content, and Refresh. The unconditional label-color choice below 65% opacity also ignores how the fill changes the background. Compare foreground contrast against the composited fill rather than using these fixed thresholds, and cover opaque gray and translucent fills in both appearances.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6e118bdb5782.

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 36610ff adds Sources/CodexBar/StatusItemController+MenuPresentation.swift:473 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 36610ffaaee0; files: Sources/CodexBar/StatusItemController+MenuPresentation.swift)
  • Zihao Qi: Raw commit ada3660 adds Sources/CodexBar/StatusItemController+MenuPresentation.swift:377 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: ada3660e9d61; files: Sources/CodexBar/StatusItemController+MenuPresentation.swift)

Labels

Label changes:

  • add P3: The central request is optional appearance customization with a limited user impact.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P3: The central request is optional appearance customization with a limited user impact.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 11:53 AM ET / 15:53 UTC.

@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: b65966f1c0

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

static var selectionTextColor: NSColor {
guard let appearance = self.customAppearance() else { return .selectedMenuItemTextColor }
// A translucent fill leaves the menu background visible. Keep the normal label contrast there.
guard appearance.opacity >= 0.65 else { return .labelColor }

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 Choose text color from the composited highlight

For a dark-mode user who chooses white at 60% opacity (an allowed slider value), this low-opacity branch returns dynamic .labelColor, which is also white, while the fill composites to a light gray; the same mistake occurs in reverse for dark fills in light mode, so highlighted card text can lose most of its contrast. Choose the text color after compositing the selected RGB/alpha with the effective menu background instead of using the 0.65 cutoff alone.

Useful? React with 👍 / 👎.

"menu_highlight_section" = "تمييز القائمة";
"menu_highlight_custom" = "استخدام تمييز مخصص";
"menu_highlight_color" = "اللون";
"menu_highlight_opacity" = "الشفافية";

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 Label the Arabic control as opacity

In the Arabic locale, الشفافية means transparency, while the bound value is customHighlightOpacity and is passed directly to alpha, so the displayed 0% is fully transparent and 100% is fully opaque—the reverse of the label. Arabic users therefore get a misleading slider; use an opacity/opaqueness term such as التعتيم rather than transparency.

Useful? React with 👍 / 👎.

@cynicalight

Copy link
Copy Markdown
Author

Closing this PR after testing the local build. The customization did not change the Codex card's hover color as intended. The existing selected-row treatment also turns colored text and the Weekly left progress bar white, which makes the menu harder to read. I made this change too broad. I will replace it with a smaller opt-out setting that removes the menu card hover highlight without recoloring its contents.

@cynicalight
cynicalight deleted the feat/custom-menu-hover-highlight branch October 10, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant