Skip to content

fix(users): readable MQTT permissions hint banner (Catppuccin vars)#3109

Merged
Yeraze merged 1 commit into
mainfrom
fix/mqtt-hint-readability
May 20, 2026
Merged

fix(users): readable MQTT permissions hint banner (Catppuccin vars)#3109
Yeraze merged 1 commit into
mainfrom
fix/mqtt-hint-readability

Conversation

@Yeraze

@Yeraze Yeraze commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

The MQTT-scope hint banner under the permissions grid (added in #3108) used var(--bg-soft) and var(--accent) — variables that aren't defined in MeshMonitor's Catppuccin theme. Both fell back to their hex defaults (#f5f5f5 bg, #2563eb border), and no color was set, so the text inherited the surrounding panel's color. Result: light-blue-on-white, unreadable in light mode; wrong contrast in dark mode.

Fix: switch to the project's Catppuccin vars (--ctp-surface0 bg, --ctp-text color, --ctp-blue border) and add an explicit color so the hint reads correctly in both themes.

Test plan

  • Users tab → Permissions → scope to an MQTT broker/bridge source → confirm the hint banner is readable in both light and dark themes.

🤖 Generated with Claude Code

The hint banner under the MQTT-scope permissions grid used `var(--bg-soft)`
and `var(--accent)` — variables that aren't defined in the MeshMonitor
theme. Both fell back to the literal hex defaults (`#f5f5f5` background,
`#2563eb` border), and no `color` was set, so the text inherited whatever
the surrounding panel used — invisible light-blue-on-white in light mode
and wrong contrast in dark mode.

Switch to the project's Catppuccin variables (`--ctp-surface0`,
`--ctp-text`, `--ctp-blue`) and set an explicit `color` so the hint is
readable in both themes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown

Claude finished @Yeraze's task —— View job


PR Review: MQTT permissions hint banner readability fix

Todo List:

  • Read the modified UsersTab.tsx file to understand the changes
  • Analyze the CSS variable usage and theme consistency
  • Check for potential bugs or issues
  • Review code quality and best practices
  • Provide comprehensive feedback

Review Feedback

✅ Excellent Fix - Addresses Core Issue Well

This is a solid, focused fix that addresses the exact problem described. The changes correctly replace undefined CSS variables with proper Catppuccin theme variables.

Code Quality & Best Practices

Strengths:

  • Proper theme integration: Correctly uses established Catppuccin variables (--ctp-surface0, --ctp-text, --ctp-blue)
  • Explicit color specification: Adding color: var(--ctp-text) prevents text inheritance issues
  • Consistent formatting: Well-structured inline styles with proper spacing
  • Maintains semantic meaning: The color choices (blue border, surface background) preserve the visual hierarchy

CSS Variable Usage:

  • --ctp-surface0: Appropriate choice for background (lighter than base, good contrast)
  • --ctp-text: Correct for readable text across all themes
  • --ctp-blue: Good choice for accent border, maintains visual prominence

Theme Compatibility

Verified against all 4 Catppuccin themes in App.css:

  • Latte (light): #ccd0da bg, #4c4f69 text, #1e66f5 border ✓
  • Frappé (medium): #414559 bg, #c6d0f5 text, #8caaee border ✓
  • Macchiato (medium-dark): #363a4f bg, #cad3f5 text, #8aadf4 border ✓
  • Mocha (dark): #313244 bg, #cdd6f4 text, #89b4fa border ✓

All combinations provide excellent readability and proper contrast.

Performance & Security

  • No performance impact - simple CSS variable substitution
  • No security concerns - purely presentational changes
  • Inline styles are appropriate for this component-specific usage

Minor Suggestions

  1. Consider CSS class approach (optional): For future maintainability, you might consider extracting to a CSS class:

    .permission-hint {
      margin: 8px 0 12px;
      padding: 8px 12px;
      background: var(--ctp-surface0);
      color: var(--ctp-text);
      border-left: 3px solid var(--ctp-blue);
      border-radius: 4px;
      font-size: 0.9em;
    }
  2. Font size consistency: The fontSize: '0.9em' is a good addition - consider if other hint banners should use the same sizing.

Test Coverage ⚠️

The test plan covers the primary use case. Consider also testing:

  • Theme switching while the hint is visible
  • Different source types to ensure the conditional rendering works correctly

Summary

This is a high-quality fix that directly addresses the readability issue described in #3108. The implementation properly integrates with the existing Catppuccin theme system and will work correctly across all four theme variants.

Verdict: ✅ Approved - Ready to merge

The change is focused, well-executed, and solves the exact problem without introducing any risks or regressions.


@Yeraze Yeraze merged commit 8d87c73 into main May 20, 2026
19 checks passed
Yeraze added a commit that referenced this pull request May 20, 2026
* chore(release): bump version to 4.6.3

Five user-visible files bumped per the CLAUDE.md version recipe:
package.json, package-lock.json (regenerated), helm/meshmonitor/Chart.yaml,
desktop/src-tauri/tauri.conf.json, desktop/package.json. CLAUDE.md
banner line bumped to match.

CHANGELOG entry covers the five PRs since 4.6.2-1:
- #3105 unified tapback metadata fix
- #3106 docs: drop worktree restriction
- #3107 meshcore contact advType persistence
- #3108 MQTT channel permissions via channel_database
- #3109 hint banner Catppuccin restyle
- #3110 node.channel ingest + traceroute/neighbor channel gate

Companion blog post (docs/blog/2026-05-20-v4.6.3-permissions.md)
walks operators through the new Virtual Channel Permissions flow,
the map-visibility behavior change, and the floating-lines fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(release): regenerate desktop/package-lock.json for 4.6.3

The desktop sub-project carries its own lockfile and the bump to 4.6.3
left it pinned to 4.6.1. The Windows Desktop CI job runs `npm install`
without `--legacy-peer-deps` and fails on the package.json /
package-lock.json version mismatch. Regenerate to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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