Skip to content

fix(mobile): the @ menu opens in group rooms and item comments - #47940

Merged
AmoabaKelvin merged 1 commit into
mainfrom
fix/room-mention-menu
Nov 24, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
fix/room-mention-menu

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Typing @ in a group room on the phone did nothing: the list of who you can mention never appeared. The same was true for @ and / in an item's comment box. Now both open, and the names in the room's list look like the agent chat's.

Files Added Deleted Net
Test 0 0 0 0
Prod 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​305 $\color{#cf222e}{\Huge{\mathbf{−}}}$​243 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​62

What Changed

  • Before: the composer's menu drew only inside the agent chat screen. It found where to draw by looking for that screen's container (closest('[data-testid="native-chat-view"]')). The group room became its own page in feat(mobile): attach photos to posts in a group room #47361 and the item page sits in a drawer, so neither had that container and the menu returned early.
  • After: MobileNativeChatComposerMenuHost is a View that hands its own ref to the menu layer through context. The agent chat, the group room and the item page each wrap the area under their header in it, and the menu draws inside that area. The header and the room's tab bar stay uncovered. The agent chat keeps its native-chat-view testID, which its lower region still reads.
  • Room members in the @ list now use the regular font at 14 pt with their 20 pt faces, centred like the agent chat's @ rows. "everyone" uses the people icon the desktop shows for it. Commands and file paths stay monospace.

Why

Making the host part of the composer's owner means any screen that renders a composer can say where its menus go, without copying a testID. There are three composer screens, and all are covered. I ruled out falling back to the page body: on a short screen with the keyboard up, the menu could then cover the nav bar's back button.

"everyone" still sorts A to Z among the members. That is the shared rankNativeChatRoomMembers order, and the desktop's @ list uses it too, so pinning "everyone" first or last would be a separate change for both apps.

Linked Issue

None. A design review on main found this.

Visual Proof

These are real page builds of the group room in Chromium through the shell double, at 393×852.

Group room, typing @ (before: no menu; after: the members)

Before After
Dark room-before-dark.png room-after-dark.png
Light room-before-light.png room-after-light.png

Room with members on other computers, after

Dark Light
room-mixed-after-dark.png room-mixed-after-light.png

Item comment box, typing @ (before: no menu; after: files)

Before After
Dark item-before-dark.png item-after-dark.png
Light item-before-light.png item-after-light.png

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

I built the page bundle (pnpm build:mobile-web) before and after the change and drove the real pages in headless Chromium:

  • In the group room, @ opened no menu before and opens the member list after. Can @re narrows the list.
  • In the item comment box, @ opened nothing before and lists files after.
  • The agent chat's / still opens the Commands list.

pnpm check:changed and the mobile typecheck pass. I added no test: this is DOM placement in the web layer, and only a rendered page shows it.

Performance

None, because this adds one context read per menu layer and one wrapper View per composer screen. Nothing runs per keystroke beyond what the layer already did.

Risk

The riskiest part is layout. The room and the item page now have one more flex-1 View around the transcript and the composer. If it broke, the room or item page would lay out wrongly. The screenshots show both unchanged. The native (non-web) menu layer still renders inline and ignores the host. A plain revert backs this out.

Level: Low

AI Disclosure

Review

Two reviewers each ran one round and found nothing.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

The sibling pattern this follows is the chat view's own lower region, which hands its scroll nodes to the menu layer through context (MobileNativeChatLowerRegion.web.tsx:69).

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

The composer's menu found where to draw by looking for the chat screen's
container, which the group room and item page don't have. Each screen that
hosts a composer now marks the area its menus may cover. Room members in the
@ menu show in the regular font with their faces, as in the agent chat.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds a context provider and hook for the native chat composer menu host. The web menu layer uses the host reference for element validation, placement, geometry, and clipping bounds. The native chat view, bot group room, and bot item page wrap their existing content in the host. Member rows and bot mention icons also receive presentation updates.

Merge Risk: Minimal · up to dc988

This change makes the composer menus appear in group rooms and item comments. No concrete defect was found in the reviewed code. Rendered-page validation was not run, so a quick manual check of the layout is worthwhile.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the @ composer menu now opens in group rooms and item comment boxes. The changeset adds a menu host per composer screen (agent chat, group room, item page) and updates…
Description check Passed The description follows the template. It covers ELI5, What Changed (before and after with mechanism), Why (including alternatives considered), Visual Proof with before and after images, Testing with m…
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 main change: the @ composer menu now opens in group rooms and item comment boxes. The changeset adds a menu host per composer screen (agent chat, group room, item page) and updates the layer to draw inside it, which matches the title. The title uses a mobile scope and a fix prefix, and it is one short sentence.

Full details: Description check

Explanation

The description follows the template. It covers ELI5, What Changed (before and after with mechanism), Why (including alternatives considered), Visual Proof with before and after images, Testing with manual steps, Performance, Risk with level, and the checklist. The Linked Issue section says 'None' and the template asks for an issue for outside contributors. The AI Disclosure section is empty, which is acceptable for an internal contributor. The Performance line is completed with a reason. The description is mostly complete.

  • 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: 7fb21e52-f167-487c-b2fc-c87ca461eb6c
Commits

Reviewing files that changed from the base of the PR and between b2065bb and dc98835.

Files selected for processing: 7

  • mobile/src/bots/MobileBotGroupRoom.tsx
  • mobile/src/bots/items/MobileBotItemPage.tsx
  • mobile/src/bots/use-mobile-bot-group-composer.tsx
  • mobile/src/session/native-chat/MobileNativeChatView.tsx
  • mobile/src/session/native-chat/composer/menus/MobileNativeChatComposerMenu.tsx
  • mobile/src/session/native-chat/composer/menus/MobileNativeChatComposerMenuHost.tsx
  • mobile/src/session/native-chat/composer/menus/MobileNativeChatComposerMenuLayer.web.tsx

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

@AmoabaKelvin
AmoabaKelvin merged commit 568c843 into main Nov 24, 2026
27 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