Repository navigation
Apply message concierge link color to inline markdown links - #184
Merged
rymorale merged 3 commits intoOct 8, 2026
Merged
Conversation
Inline links in AI messages, including "View Store" links, used to always take --color-primary. They now use --message-concierge-link-color. If the theme doesn't set it, they fall back to --color-primary. - Pass a link color through MarkdownRenderer to plain, bold, italic and nested links - Look up the link color in MarkdownParser and add it to the remember keys so a theme change re-colors existing messages - Change the built-in dark palette link color from pure blue to #1E88E5 so links are readable on the dark message background - Add unit tests for custom, nested and fallback link colors, plus a Compose test for re-coloring after a theme change - Update the style guide to describe the link color fallbacks
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
If a theme doesn't set --message-concierge-link-color, inline links and the link icon now use --color-text instead of --color-primary. Citation URLs already did this, so every link now has the same fallback. - MarkdownParser, MarkdownRenderer and ConciergeResponse now fall back to the text color - Remove the unused colorScheme variable in ConciergeResponse - Update the link color assertions in MarkdownRendererTest - Update the fallback wording in the style guide
- Add Compose test verifying inline links fall back to the theme text color - Extract LinkHintUiUtils.resolveLinkIconColor and unit test its fallbacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Inline links in AI messages now use
--message-concierge-link-color(colors.message.conciergeLink) instead of always using--color-primary. This includes the Store Info / "View Store" link and any other markdown link. When the theme doesn't set the link color, every link surface falls back to--color-text.MarkdownRenderer:render()takes a new optionallinkColorparameter, defaulting toColor.Unspecified. If it isn't set, it falls back tocolorScheme.onSurface. The color is passed through to plain, bold and italic links, and to links inside lists, blockquotes and nested markdown.MarkdownParser: picks the link color fromConciergeTheme.colors.messageConciergeLink, falling back toConciergeTheme.colors.onSurface(--color-text). It addslinkColorto therememberkeys so already-rendered messages are re-colored when the theme changes.ConciergeColors: the built-in dark palette'smessageConciergeLinkchanges fromColor.Blueto#1E88E5, the dark primary color. Pure blue on the dark message background (#2B2930) has a contrast ratio of about 1.67:1. This only applies when no theme JSON is loaded. It also affects dark-mode citation URLs and the link-icon fallback.ConciergeResponse: the inline link icon now falls back to--color-textinstead of--color-primarywhen neitherlinkIconStyle.colornor the link color is set.style-guide.md: the--message-concierge-link-colorrow now lists every place the color is used and what each falls back to. The implementation-status table lists the components that read it.Fallback behavior:
--message-concierge-link-color--color-text--message-concierge-link-color--color-textlinkIconStyle.color→--message-concierge-link-color--color-textWith no theme JSON loaded, the built-in palettes set the link color directly:
#0000FFin light mode and#1E88E5in dark mode.Themes that set
--color-primarybut not--message-concierge-link-colorwill see inline links and the link icon change from the primary color to the text color.Related Issue
MAR-3064
Motivation and Context
--message-concierge-link-colorwas already parsed and used for citation URLs and the link-icon fallback, but not for the link text itself. So themes couldn't change the color of the "View Store" link or other inline links without also changing--color-primary, which affects much more of the UI.On iOS,
colors.message.conciergeLinkalready sets the color of inline link text, source links and the link icon. This change brings Android in line with iOS. One difference remains: on iOS an unset link color uses the system accent color, while Android uses--color-textso all link surfaces share one fallback.How Has This Been Tested?
New tests:
MarkdownRendererTest:Color.Unspecifiedfalls back to the text color (onSurface)MarkdownParserComposeTest: changing the theme'sconciergeLinkre-colors a link in a message whose text hasn't changed (checks that the cached result is invalidated)Screenshots (if appropriate):
Types of changes
Checklist: