Skip to content

fix(native-chat): keep the mention snippet helper the phone picker uses - #48415

Merged
Jinwoo-H merged 1 commit into
mainfrom
fix/mobile-mention-snippet
Nov 24, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
fix/mobile-mention-snippet

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Main's mobile build is broken. #48223 and #48302 merged minutes apart and conflict:

Because of this, Mobile verify typecheck and the mobile web bundle build (orcad terminal smoke) fail on main and on every PR.

This PR adds nativeChatMentionSnippet and the detailHits field back to the shared module, taken unchanged from 69a81ec^. The desktop picker still shows only the name, since it doesn't read either one. Mobile behavior is the same as what #48302 shipped.

Verified locally: mobile typecheck and typecheck:tests, pnpm typecheck:ci, both mention test files, and pnpm run build:mobile-web all pass.

Performance

None, because this only adds back a pure string helper and one match field that the shared mention ranker already computed before #48223.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Detail matching now returns text ranges instead of a boolean. Tier-4 member matches include these ranges in detailHits. The new nativeChatMentionSnippet helper clips detail text around the first hit, adjusts hit offsets to the clipped text, and reports whether clipping occurred.

Merge Risk: Minimal · up to 2292c

This restores two previously removed helpers that the mobile mention picker needs, and desktop behavior is unchanged. No concrete merge-blocking risk remains. The PR description's Performance section should be completed so the description check passes.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem (main's mobile build is broken by conflicting PRs #48223 and #48302), what the change restores (nativeChatMentionSnippet and the detailHits field), why it is safe … Add the missing template sections: an ELI5 summary; a What Changed section describing the before and after; a Why section explaining why restoring the code is preferred over alternatives such as reverting #48223 or changing the mobile impor…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the change: restoring the mention snippet helper that the mobile phone picker uses. The changeset adds back nativeChatMentionSnippet and the detailHits field in the shared mention modu…
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.
Full details: Title check

Explanation

The title names the change: restoring the mention snippet helper that the mobile phone picker uses. The changeset adds back nativeChatMentionSnippet and the detailHits field in the shared mention module, so the title matches the main change. The title uses the fix prefix and a scope, which fits the repository convention. It is specific and does not use vague terms.

Full details: Description check

Explanation

The description explains the problem (main's mobile build is broken by conflicting PRs #48223 and #48302), what the change restores (nativeChatMentionSnippet and the detailHits field), why it is safe (desktop picker does not read either value), and the local verification performed. It gives a Performance rationale. It does not follow the repository template: the ELI5, Visual Proof, Testing checkboxes, Risk level, Linked Issue ('Fixes #'), AI Disclosure, and Review sections are missing. The Risk section is not filled in, and no visual proof or N/A statement is given for the behavior change on mobile.

Resolution

Add the missing template sections: an ELI5 summary; a What Changed section describing the before and after; a Why section explaining why restoring the code is preferred over alternatives such as reverting #48223 or changing the mobile import; a Linked Issue with 'Fixes #<issue number>' (or an explanation that a maintainer link is not needed); a Visual Proof section with a before/after or 'N/A' with reason; a Testing section that checks the applicable boxes and lists the platforms tested; a Risk section with a Level (Low, Medium, or High), the riskiest part, what users would see on failure, and how to back out the change; an AI Disclosure section if applicable; and the Review and Agent skill upstream boundary sections. Also complete the Checklist items that apply.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 58ea990b-9a46-4acc-99f7-696242a46eda
Commits

Reviewing files that changed from the base of the PR and between 4b6407a and 2292c79.

Files selected for processing: 1

  • src/shared/native-chat/input/native-chat-room-mentions.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@Jinwoo-H
Jinwoo-H merged commit c146a11 into main Nov 24, 2026
57 of 59 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