Repository navigation
Make the user's own bubble follow the theme instead of inverting it - #29
Conversation
--user is defined as the inverse of the surface (#0a0a0a on light, #f2f2f2 on dark), so the outgoing bubble inverts in both themes while every Bot bubble stays on --bubble and reads as normal chat. On the light surface the outgoing bubble looks like a system message rather than something the user wrote. Tint it with the accent instead. --accent is already resolved per theme by inkOf(), so this keeps the outgoing side identifiable without leaving the palette. Scoped to .msg.user .bubble on purpose: --user is also used by .btn.primary, .send.stop and the toast, and redefining the variable would change those three surfaces as well. WCAG 2.1 contrast for the outgoing bubble stays well above the 4.5:1 AA threshold: 15.56:1 light, 12.35:1 dark with the default ocean accent, and 11.18:1 in the worst case across all twelve palettes (yellow on dark).
There was a problem hiding this comment.
Thanks for this change — the analysis is solid. I ran npm run check on the merged tree (Node 22: validate clean, 69/69 tests pass) and also loaded the real app.css in headless Chrome to verify computed styles: light bubble background #e4ecff, dark #262d3a, body text contrast at worst 15.1:1 (light) / 11.2:1 (dark) across all 12 accent palettes, matching your numbers. One extra win: dark-theme @-mention chips on the user bubble were all below 3:1 on the inverted bubble and are now ~4.5:1 or better. Scope is correctly limited to .msg.user .bubble; .btn.primary, .send.stop, and toast still use --user unchanged.
Required changes
- CONTRIBUTING line 17 asks for a version bump when updating an existing app. This is an official package; if we take the design change, please bump
.minimax-plugin/plugin.jsonandpackage.jsonto0.7.3in sync (validate does not check that the two match). I can do that at merge time, or you can add it in this PR. - CONTRIBUTING line 17 also asks to install and check in MiniMax Code. You've noted you haven't seen it in a running client; I'll install it before merge and confirm both themes look right.
Suggestions (optional)
- Light-theme lime / yellow @-mention chips on the bubble are ~2.7:1. That's an existing palette-ink issue (same on Bot bubbles), not something this PR needs to fix — we'll follow up separately.
| .msg.user .bubble { | ||
| background: var(--user); | ||
| color: var(--user-ink); | ||
| background: color-mix(in srgb, var(--accent) 12%, var(--surface)); |
There was a problem hiding this comment.
Verified in headless Chrome: light #e4ecff, dark #262d3a, body text at worst 15.1 / 11.2:1 — looks good. If we merge, please bump plugin.json / package.json versions in sync (CONTRIBUTING:17).
CONTRIBUTING.md:17 asks for a version bump when updating an existing app. Both manifests move 0.7.2 -> 0.7.3 together, since validate does not check that they match.
MyPrototypeWhat
left a comment
There was a problem hiding this comment.
Thanks for the bump. 5af6983 only changes the version in .minimax-plugin/plugin.json and package.json, both 0.7.2 → 0.7.3, and nothing else; no other 0.7.2 references are left in the package. Merged onto current main, repository validation passes with minimax-bot: OK.
I didn't get to an install in a running client, but the change is a single .msg.user .bubble rule and I'd already checked the real app.css in headless Chrome (computed #e4ecff light / #262d3a dark, body text ≥15.1:1 / ≥11.2:1 across all 12 accents), so I'm comfortable merging. Approving.
Summary
The outgoing bubble inverts against the surface in both themes, because
--useris defined as the inverse of the background:--user(outgoing bubble)--user-ink--bubble(Bot bubbles)#0a0a0a#fcfcfc#efefef#f2f2f2#141414#262626Every Bot bubble sits on
--bubble, a low-contrast tone that reads as ordinary chat. Only the outgoing bubble is fully inverted, so in the light theme it renders near-black on near-white and reads closer to a system message than to something the user wrote.This replaces that background with a 12% tint of the accent, which
inkOf()already resolves per theme.Change
One rule,
miniapp/client/app.css:Scoped to
.msg.user .bubbleon purpose.--useris also used by.btn.primary(app.css:299),.send.stop(app.css:1305) and the toast (app.css:2450), so redefining the variable would change those three surfaces as well. All four remaining--userreferences are untouched.Contrast
WCAG 2.1 ratios for the outgoing bubble, AA body-text threshold is 4.5:1:
Because the tint keeps the background close to
--surface, no palette can collapse the ratio. Checked against all twelve palettes inoctopus.js:Tested environment
ea3c8a3)npm run checkon the branch:validateclean, 69/69 tests pass (same as the base commit).bubble/.msg.user .bubblerules, and compared the outgoing bubble before and after side by side in each themeUnverified: I did not install the patched package and view it inside a running MiniMax Code instance, so the result in the live app is inferred from the reproduction rather than observed there. The rounding corner radius, spacing and hover states are unchanged, so the visible difference is limited to the bubble fill and text colour.
I also left the package version at 0.7.2 rather than bumping it, since releasing an official package looks like a maintainer decision and a bump would collide with your release PRs. Happy to add it if that is the convention for outside contributions.
Note on scope
This is a visual design change rather than a defect fix: the current inversion is internally consistent and fully readable, so if the inversion is deliberate, closing this is a perfectly reasonable outcome. The change is reversible and self-contained.
Need help on this PR? Tag
@codesmith-botwith what you need.