Skip to content

fix: Missing a visible quote message link #41091

Open
dougfabris wants to merge 2 commits into
developfrom
fix/quote-link-affordance
Open

fix: Missing a visible quote message link #41091
dougfabris wants to merge 2 commits into
developfrom
fix/quote-link-affordance

Conversation

@dougfabris

@dougfabris dougfabris commented Jun 26, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Currently our quote messages doesn't have a visible link, instead the link to jump to the original message is placed in the timestamp which doesn't offer a good affordance for such action. This PR aims to add a clear link for the user to jump to the original message

before

image

after

image

Issue(s)

Closes #31747

Steps to test or reproduce

Further comments

Review in cubic

Task: CORE-2352

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Quote attachments now include dedicated author metadata elements, including an author timestamp and a jump-to-message link.
    • The jump-to-message link is shown as a consistent icon button with localized hover/title text.
  • Bug Fixes

    • Improved quote author details rendering so the timestamp and message link display more reliably and consistently across quote attachments.

@dionisio-bot

dionisio-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 35e2a61

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dougfabris dougfabris added this to the 8.7.0 milestone Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 81e9bb92-a403-46b2-851d-70d5f1ec29b4

📥 Commits

Reviewing files that changed from the base of the PR and between 1480e61 and 35e2a61.

📒 Files selected for processing (2)
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Walkthrough

QuoteAttachment.tsx now renders quote timestamp and message-link content through separate structure components instead of wrapping the timestamp text in an anchor. Two new attachment structure components were added to support that split.

Changes

Quote attachment link fix

Layer / File(s) Summary
New attachment structure components
apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx, apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
Adds AttachmentAuthorTimestamp as a Box wrapper with fixed fontScale='c1', and AttachmentAuthorMessageLink as an IconButton anchor with translated tooltip text.
QuoteAttachment integration
apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
Removes the Box import, adds the new structure imports, and replaces the prior conditional timestamp/anchor rendering with separate timestamp and message-link components.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

type: bug

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds a separate visible message-link action, but the linked issue requires the entire quoted message box to be clickable. Wrap the full quote container with the message link instead of only exposing a separate link button, so clicks on the box jump to the original message.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the visible quote message link fix and matches the PR's main change.
Out of Scope Changes check ✅ Passed The new timestamp and message-link components directly support the quote-link UI fix and do not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2352: Request failed with status code 401

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.

@dougfabris

Copy link
Copy Markdown
Member Author

/jira CORE

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.15%. Comparing base (64af832) to head (35e2a61).
⚠️ Report is 23 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41091      +/-   ##
===========================================
- Coverage    70.09%   69.15%   -0.94%     
===========================================
  Files         3363     3435      +72     
  Lines       129716   132341    +2625     
  Branches     22444    23048     +604     
===========================================
+ Hits         90925    91525     +600     
- Misses       35479    37451    +1972     
- Partials      3312     3365      +53     
Flag Coverage Δ
e2e 59.34% <100.00%> (+0.01%) ⬆️
e2e-api 41.14% <ø> (-5.14%) ⬇️
unit 70.00% <77.77%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris marked this pull request as ready for review June 26, 2026 18:55
@dougfabris dougfabris requested a review from a team as a code owner June 26, 2026 18:55

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 4 files

Re-trigger cubic

@dougfabris dougfabris force-pushed the fix/quote-link-affordance branch from cad7a06 to 1480e61 Compare June 30, 2026 19:32

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In
`@apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx`:
- Line 1: The AttachmentMessageLink type annotation is using a type-only Box
import, so `ComponentPropsWithoutRef<typeof Box>` cannot resolve a value-side
component reference. Update the imports in AttachmentMessageLink to bring `Box`
in as a normal runtime import, matching the pattern used in
AttachmentAuthorTimestamp, so the `typeof Box` usage in the component type
definition works correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1d2a671d-323e-4843-adf6-54a03457dd95

📥 Commits

Reviewing files that changed from the base of the PR and between 615ae2b and 1480e61.

📒 Files selected for processing (3)
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
🧠 Learnings (2)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx
  • apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx
  • apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
🔇 Additional comments (3)
apps/meteor/client/components/message/content/attachments/structure/AttachmentAuthorTimestamp.tsx (1)

1-9: LGTM!

apps/meteor/client/components/message/content/attachments/structure/AttachmentMessageLink.tsx (1)

7-11: 🎯 Functional Correctness

Icon-only button vs. screenshot's visible "Jump to message" text.

The PR's before/after screenshots show a visible "Jump to message" text link, but this renders as an icon-only IconButton (label only surfaces via hover tooltip/title). Worth confirming this still meets the discoverability goal from the linked issue, or whether a visible text label was intended.

apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx (1)

3-3: LGTM!

Also applies to: 12-16, 61-62

@dougfabris dougfabris force-pushed the fix/quote-link-affordance branch from 1480e61 to 35e2a61 Compare June 30, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Quoted message link is wrapped with time text instead of the entire box.

1 participant