You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): keep the mention snippet helper the phone picker uses - #48415
feat(mobile): @ in an agent chat shows what each agent is for #48302 added mobile/src/session/native-chat/composer/menus/use-mobile-native-chat-mention-bot-menu.ts, which imports nativeChatMentionSnippet and reads match.detailHits so the phone can show what each agent is for.
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.
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: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
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 checks: 3 passed
Check name
Status
Explanation
Title check
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
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
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.
Main's mobile build is broken. #48223 and #48302 merged minutes apart and conflict:
nativeChatMentionSnippetand thedetailHitsmatch field fromsrc/shared/native-chat/input/native-chat-room-mentions.ts, because the desktop @ picker now shows only the name.mobile/src/session/native-chat/composer/menus/use-mobile-native-chat-mention-bot-menu.ts, which importsnativeChatMentionSnippetand readsmatch.detailHitsso the phone can show what each agent is for.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
nativeChatMentionSnippetand thedetailHitsfield 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:
mobiletypecheck and typecheck:tests,pnpm typecheck:ci, both mention test files, andpnpm run build:mobile-weball 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.