Skip to content

Apply message concierge link color to inline markdown links - #184

Merged
rymorale merged 3 commits into
adobe:devfrom
rymorale:mar-3064-fix-concierge-link-color-config
Oct 8, 2026
Merged

rymorale merged 3 commits into
adobe:devfrom
rymorale:mar-3064-fix-concierge-link-color-config

Conversation

@rymorale

@rymorale rymorale commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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 optional linkColor parameter, defaulting to Color.Unspecified. If it isn't set, it falls back to colorScheme.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 from ConciergeTheme.colors.messageConciergeLink, falling back to ConciergeTheme.colors.onSurface (--color-text). It adds linkColor to the remember keys so already-rendered messages are re-colored when the theme changes.
  • ConciergeColors: the built-in dark palette's messageConciergeLink changes from Color.Blue to #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-text instead of --color-primary when neither linkIconStyle.color nor the link color is set.
  • style-guide.md: the --message-concierge-link-color row 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:

Surface Uses Falls back to (key not set in the theme)
Inline link text --message-concierge-link-color --color-text
Expanded citation URLs --message-concierge-link-color --color-text
Inline link icon linkIconStyle.color → --message-concierge-link-color --color-text

With no theme JSON loaded, the built-in palettes set the link color directly: #0000FF in light mode and #1E88E5 in dark mode.

Themes that set --color-primary but not --message-concierge-link-color will 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-color was 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.conciergeLink already 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-text so all link surfaces share one fallback.

How Has This Been Tested?

New tests:

  • MarkdownRendererTest:
    • a custom link color is applied to plain, bold and italic links
    • a custom link color is applied to links inside lists
    • Color.Unspecified falls back to the text color (onSurface)
  • MarkdownParserComposeTest: changing the theme's conciergeLink re-colors a link in a message whose text hasn't changed (checks that the cached result is invalidated)

Screenshots (if appropriate):

Screenshot_20261008_122314

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../mobile/concierge/utils/markdown/MarkdownParser.kt 66.66% 0 Missing and 1 partial ⚠️

📢 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
@rymorale
rymorale merged commit 89b988b into adobe:dev Oct 8, 2026
11 checks passed
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