Skip to content

Fix thread indicator tokens for reply link and connector - #1555

Open
martinmitrevski wants to merge 4 commits into
developfrom
fix/thread-indicator-tokens
Open

Fix thread indicator tokens for reply link and connector#1555
martinmitrevski wants to merge 4 commits into
developfrom
fix/thread-indicator-tokens

Conversation

@martinmitrevski

@martinmitrevski martinmitrevski commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

πŸ”— Issue Links

None linked yet.

🎯 Goal

The thread indicator shown under a message with replies had the wrong design tokens applied, so the reply link did not read as a link and the connector line joining the indicator to the message bubble was barely visible.

πŸ“ Summary

  • The thread reply link ("1 Thread Reply") now uses the text/link color instead of primary text.
  • The connector line now uses chat/thread/connector-incoming for incoming messages and chat/thread/connector-outgoing for outgoing ones, giving it proper contrast.
  • Added snapshot coverage for the outgoing variant of the thread indicator.

πŸ›  Implementation

MessageRepliesView was stroking the connector path with the message bubble background tokens (chatBackgroundIncoming / chatBackgroundOutgoing). Since the bubble background is close to the message list background, the line had almost no contrast. It now uses the dedicated connector tokens, which are backed by a border token for incoming and a brand tint for outgoing.

The reply label was using textPrimary. It now uses textLink. The usesInvertedStyle branch still resolves to textOnAccent, since in the message actions preview the indicator is rendered on an accent background.

The two connector tokens are added in stream-chat-swift, so the dependency is temporarily pointed at the connector-colors branch in both Package.swift and the Xcode project.

Important

This should not be merged until the connector-colors branch is merged in stream-chat-swift and the dependency here is re-pinned to a revision on the default branch.

🎨 Showcase

The updated snapshot references are part of the diff. test_messageRepliesView_snapshot and test_messageRepliesViewSentByCurrentUser_snapshot show the incoming and outgoing indicator in isolation; test_reactionsOverlayView_allAnnotations and test_messagePreview_threadReplies_snapshot show it in context.

πŸ§ͺ Manual Testing Notes

In the demo app, open a channel with a message that has thread replies. The "N Thread Replies" label should be link-blue, and the curved connector joining it to the bubble should be clearly visible β€” a neutral border color for incoming messages and a brand tint for your own messages. Check both light and dark mode, and a right-to-left locale to confirm the connector still mirrors correctly.

β˜‘οΈ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

Summary by CodeRabbit

  • Bug Fixes

    • Improved thread reply link color for better readability.
    • Enhanced contrast and visual consistency for thread indicator connector lines.
    • Refined connector rendering across incoming and outgoing messages.
    • Updated reply styling for clearer visual distinction across message types and light or dark themes.
  • Tests

    • Added visual coverage for message replies in light and dark appearances, including messages sent by the current user.

The thread reply link used textPrimary instead of the link color, and
the connector line joining the indicator to the bubble was stroked with
the bubble background tokens, leaving it with almost no contrast against
the message list.

Point the dependency at the connector-colors branch, which introduces
chatThreadConnectorIncoming and chatThreadConnectorOutgoing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@martinmitrevski
martinmitrevski requested a review from a team as a code owner August 3, 2026 12:05
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9909da39-4bc3-4f82-aefb-b584e797ed59

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 3533ee1 and 98ed200.

β›” Files ignored due to path filters (10)
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.default-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.extraExtraExtraLarge-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.rightToLeftLayout-default.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.small-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewSentByCurrentUser_snapshot.default-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewSentByCurrentUser_snapshot.default-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewShownInChannel_snapshot.1.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesView_snapshot.1.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ReactionsOverlayView_Tests/test_reactionsOverlayView_allAnnotations.default-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ReactionsOverlayView_Tests/test_reactionsOverlayView_allAnnotations.default-light.png is excluded by !**/*.png
πŸ“’ Files selected for processing (1)
  • Sources/StreamChatSwiftUI/ChatMessageList/MessageRepliesView.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • Sources/StreamChatSwiftUI/ChatMessageList/MessageRepliesView.swift

πŸ“ Walkthrough

Walkthrough

The dependency is pinned to a specific revision. MessageRepliesView uses geometry-based connector paths, dedicated connector colors, and link-colored non-inverted reply text. Snapshots cover current-user replies in light and dark styles.

Changes

Thread reply styling

Layer / File(s) Summary
Pinned dependency
Package.swift, StreamChatSwiftUI.xcodeproj/project.pbxproj
The stream-chat-swift dependency now uses revision b1842c5e95698c420b2462615ff9cee7d90dacb7.
Connector and reply rendering
Sources/StreamChatSwiftUI/ChatMessageList/MessageRepliesView.swift, StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift, CHANGELOG.md
MessageRepliesView uses configurable BΓ©zier connector geometry, dedicated incoming and outgoing colors, and link-colored non-inverted reply text. Snapshots and the changelog cover the changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: laevandus

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately describes the main changes: fixing design token application for thread indicator styling, specifically addressing the reply link color and connector line appearance.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/thread-indicator-tokens

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift (1)

1482-1505: πŸ“ Maintainability & Code Quality | πŸ”΅ Trivial | ⚑ Quick win

Cover the inverted reply style.

This test uses the default usesInvertedStyle: false. It validates the outgoing connector and non-inverted textLink path only. Sources/StreamChatSwiftUI/ChatMessageList/MessageContainerView.swift passes shownAsPreview into MessageRepliesView, so the textOnAccent path is production-reachable. Add a snapshot with usesInvertedStyle: true, or verify that an existing test covers it.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift` around
lines 1482 - 1505, The snapshot coverage for
test_messageRepliesViewSentByCurrentUser_snapshot only exercises the default
non-inverted style. Add a corresponding snapshot configuration with
usesInvertedStyle set to true, ensuring MessageRepliesView receives the inverted
style and validates the textOnAccent path while preserving the existing outgoing
connector coverage.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift`:
- Around line 1482-1505: The snapshot coverage for
test_messageRepliesViewSentByCurrentUser_snapshot only exercises the default
non-inverted style. Add a corresponding snapshot configuration with
usesInvertedStyle set to true, ensuring MessageRepliesView receives the inverted
style and validates the textOnAccent path while preserving the existing outgoing
connector coverage.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b79e923-1f42-46c4-9133-4a277e9890ea

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between d462a9e and 89f3d60.

β›” Files ignored due to path filters (10)
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.default-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.extraExtraExtraLarge-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.rightToLeftLayout-default.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageItemView_Tests/test_messagePreview_threadReplies_snapshot.small-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewSentByCurrentUser_snapshot.default-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewSentByCurrentUser_snapshot.default-light.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesViewShownInChannel_snapshot.1.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageRepliesView_snapshot.1.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ReactionsOverlayView_Tests/test_reactionsOverlayView_allAnnotations.default-dark.png is excluded by !**/*.png
  • StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ReactionsOverlayView_Tests/test_reactionsOverlayView_allAnnotations.default-light.png is excluded by !**/*.png
πŸ“’ Files selected for processing (5)
  • CHANGELOG.md
  • Package.swift
  • Sources/StreamChatSwiftUI/ChatMessageList/MessageRepliesView.swift
  • StreamChatSwiftUI.xcodeproj/project.pbxproj
  • StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to adjust the thread connector, it can't overlap the bubble anymore because it has a different color.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check if this is ok?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CHANGELOG.md (1)

4-25: πŸ“ Maintainability & Code Quality | 🟑 Minor | ⚑ Quick win

Move the new entry under # Upcoming, not under the released 5.8.0 section.

The new entry at Line 25, "Fix the thread reply link color and the low contrast of the thread indicator's connector line [#1555]," sits under ### 🐞 Fixed (Line 14), which now falls under the # [5.8.0] release header (Line 8), dated "August 03, 2026". This places the entry in an already-cut, dated release instead of the unreleased section.

Add this entry under # Upcoming (Line 4) in its own ### 🐞 Fixed subsection instead.

πŸ“ Proposed fix
 # Upcoming

-### πŸ”„ Changed
+### 🐞 Fixed
+- Fix the thread reply link color and the low contrast of the thread indicator's connector line [`#1555`](https://github.com/GetStream/stream-chat-swiftui/pull/1555)

 # [5.8.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/5.8.0)
 _August 03, 2026_
...
 ### 🐞 Fixed
 - Fix media attachment picker being unresponsive and slow with many iCloud assets [`#1546`](https://github.com/GetStream/stream-chat-swiftui/pull/1546)
@@
 - Fix thread list items appearing lighter than the app background in dark mode [`#1550`](https://github.com/GetStream/stream-chat-swiftui/pull/1550)
-- Fix the thread reply link color and the low contrast of the thread indicator's connector line [`#1555`](https://github.com/GetStream/stream-chat-swiftui/pull/1555)
πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` around lines 4 - 25, Move the entry about fixing the thread
reply link color and thread indicator's connector line from the "### 🐞 Fixed"
subsection under the "# [5.8.0]" release header to a new "### 🐞 Fixed"
subsection under the "# Upcoming" section at the top of the changelog. This
ensures unreleased changes are documented in the Upcoming section rather than in
the already-dated 5.8.0 release section.

Source: Coding guidelines

🧹 Nitpick comments (1)
StreamChatSwiftUI.xcodeproj/project.pbxproj (1)

1546-1547: πŸ“ Maintainability & Code Quality | πŸ”΅ Trivial | ⚑ Quick win

Track the temporary revision pin for repinning.

This pins stream-chat-swift to a specific commit b1842c5e95698c420b2462615ff9cee7d90dacb7 on the connector-colors branch instead of a released version. The PR objectives state this must be repinned after that branch merges into the default branch. Confirm a follow-up task or issue exists to track this repin, so the dependency does not stay on a branch commit after release.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@StreamChatSwiftUI.xcodeproj/project.pbxproj` around lines 1546 - 1547, Verify
that a tracking issue or task exists in your project management system (such as
GitHub Issues, Jira, or your team's tracker) that documents the need to repin
the stream-chat-swift dependency away from the temporary revision
b1842c5e95698c420b2462615ff9cee7d90dacb7 once the connector-colors branch merges
into the default branch. If no such task exists, create one with clear
instructions to update the revision pin to a released version and link it to
this PR so the temporary pin does not persist after release.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@CHANGELOG.md`:
- Around line 4-25: Move the entry about fixing the thread reply link color and
thread indicator's connector line from the "### 🐞 Fixed" subsection under the
"# [5.8.0]" release header to a new "### 🐞 Fixed" subsection under the "#
Upcoming" section at the top of the changelog. This ensures unreleased changes
are documented in the Upcoming section rather than in the already-dated 5.8.0
release section.

---

Nitpick comments:
In `@StreamChatSwiftUI.xcodeproj/project.pbxproj`:
- Around line 1546-1547: Verify that a tracking issue or task exists in your
project management system (such as GitHub Issues, Jira, or your team's tracker)
that documents the need to repin the stream-chat-swift dependency away from the
temporary revision b1842c5e95698c420b2462615ff9cee7d90dacb7 once the
connector-colors branch merges into the default branch. If no such task exists,
create one with clear instructions to update the revision pin to a released
version and link it to this PR so the temporary pin does not persist after
release.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 01125fa1-e4cd-4157-bd0a-2cdbc549f95b

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 89f3d60 and 3533ee1.

πŸ“’ Files selected for processing (3)
  • CHANGELOG.md
  • Package.swift
  • StreamChatSwiftUI.xcodeproj/project.pbxproj
🚧 Files skipped from review as they are similar to previous changes (1)
  • Package.swift

The connector was drawn in a fixed-height frame centred on the replies
row, which started the line roughly 18pt up inside the bubble. That was
invisible while the stroke reused the bubble's background colour, but
the dedicated connector colour made it show along the bubble's edge.

Anchor the path to the bubble's bottom edge and to the avatar's centre,
derived from the row's measured height so it also holds at larger
dynamic type sizes.

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

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Public Interface

πŸš€ No changes affecting the public interface.

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

SDK Size

title develop branch diff status
StreamChatSwiftUI 5.79 MB 5.79 MB 0 KB 🟒

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MessageRepliesView.o +568

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@laevandus laevandus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! βœ…

Comment thread Package.swift
],
dependencies: [
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "5.8.0")
.package(url: "https://github.com/GetStream/stream-chat-swift.git", revision: "b1842c5e95698c420b2462615ff9cee7d90dacb7")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to change to develop

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.

3 participants