Uh oh!
There was an error while loading. Please reload this page.
fix(rich-markdown-editor): fix mention chip losing ambient color inside links/h6 - #5594
Conversation
…e class as #5573) Auditing the whole "an element's own explicit color always wins over an inherited one" bug class (previously fixed for strong/em/code/del/s vs. links and h6 in #5573) turned up one more instance: the @-mention chip's label hardcoded text-[var(--text-primary)], which is redundant with the prose default anyway (matching the strong/em/code precedent) and silently overrides any ambient color a mention's container legitimately sets — a link's blue, or h6's dimmer --text-secondary — since a mention is inline content that can appear inside either (e.g. "###### see @some-file"). Removed the hardcoded color entirely so the label inherits correctly in every context, same fix as strong/em/code. The icon's own monochrome --text-icon fallback is untouched (icons intentionally don't follow ambient text color). New test renders MentionChipView directly and asserts the wrapper carries no explicit text-color utility class; verified it fails against the pre-fix className.
waleedlatif1
commented
Jul 11, 2026
waleedlatif1
commented
Jul 11, 2026
@cursor review |
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit fa40a6d. Configure here. |
Greptile SummaryThis PR fixes mention chip coloring in the rich markdown editor.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (5): Last reviewed commit: "fix(rich-markdown-editor): catch Tailwin..." | Re-trigger Greptile |
Greptile SummaryThis PR updates the rich markdown mention chip so its label inherits surrounding text color.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(rich-markdown-editor): fix mention c..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4ae69d2. Configure here.
…d beyond the exact old class Greptile: the test only matched the literal old text-[var(--text-primary)] string — a future edit swapping it for e.g. text-[var(--text-secondary)] or text-blue-500 would still silently reintroduce the ambient-color bug and pass this test. Now checks every non-descendant-scoped (excludes the [&>svg]: icon rule) text-* utility on the wrapper against a color-shaped pattern (arbitrary value, color-shade pairs, or a named color keyword), so any bare text color slipping back in fails. Verified against a text-blue-500 regression.
waleedlatif1
commented
Jul 11, 2026
waleedlatif1
commented
Jul 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9465362. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…he mention-chip test Greptile: the color-shaped regex still missed semantic theme tokens (text-primary, text-muted-foreground, text-chart-1, etc.) since they don't match a shade-suffix or bracket pattern. Rather than keep enumerating Tailwind's color-naming schemes, flag ANY unscoped text-* utility on the wrapper — none is legitimate on this chip today, so this can only be a color slipping back in. Verified against text-primary/text-muted-foreground/text-chart-1 regressions.
waleedlatif1
commented
Jul 11, 2026
waleedlatif1
commented
Jul 11, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ba4ef59. Configure here.
… variant too Greptile: the previous filter excluded ANY class starting with `[&`, which also dropped Tailwind's self-targeting arbitrary variant (`[&]:text-primary` applies to the element itself, same as a bare `text-primary`) — only descendant variants like `[&>svg]:text-*` should be excluded. Now explicitly catches both the bare and `[&]:` forms. Verified against a `[&]:text-primary` regression.
waleedlatif1
commented
Jul 11, 2026
waleedlatif1
commented
Jul 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fa40a6d. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
@-mention chip's label hardcodedtext-[var(--text-primary)], which silently overrides ambient color from a link (blue) orh6heading (dimmer--text-secondary) when a mention sits inside either — same failure mode already fixed forstrong/em/code/del/s.strong/em/code. The icon's own monochrome fallback is untouched.Type of Change
Testing
MentionChipViewdirectly and asserts the wrapper carries no explicit text-color class; verified it fails against the pre-fix classNamerich-markdown-editorsuite (412 tests) + type-check + biome all passChecklist