Skip to content

feat(mobile): rename a thread from the row menu - #5648

Closed
sideeffffect wants to merge 2 commits into
pingdotgg:mainfrom
sideeffffect:feat/mobile-thread-rename
Closed

feat(mobile): rename a thread from the row menu#5648
sideeffffect wants to merge 2 commits into
pingdotgg:mainfrom
sideeffffect:feat/mobile-thread-rename

Conversation

@sideeffffect

@sideeffffect sideeffffect commented Aug 7, 2026

Copy link
Copy Markdown

What changed

The thread row long-press menu previously offered only Archive and Delete. This adds a Rename item, matching the web per-thread action menu.

Selecting Rename opens a small dialog prefilled with the current title; confirming dispatches thread.meta.update { title }.

Appears in every thread-row menu variant across both list implementations (the v1 ThreadListRow and the v2 ThreadListV2Row) and on both surfaces (compact Home list and the iPad sidebar).

Why

Renaming a thread is a core action on the web client but was unreachable anywhere in the mobile app.

How

  • RenameThreadDialogHost (new) — an imperative, cross-platform text-input dialog styled to match the existing ConfirmDialogHost. React Native's Alert.prompt is iOS-only, so Android needs a custom modal. Mounted once at the app root. Rename stays disabled until the trimmed value is non-empty, and an unchanged title dispatches nothing.
  • useThreadListActions gains renameThread, reusing the existing threadEnvironment.updateMetadata command — no new command or contract.
  • The row components take an optional onRenameThread prop and render the item when provided.

No server, contract, or shared-runtime changes.

Scope

Split out of the original combined PR per request. Sibling PRs cover the other row-menu actions independently: Regenerate title and Unarchive.

Testing

  • tsc --noEmit, vp fmt --check, vp lint: clean
  • Mobile unit suite: 617 tests / 99 files pass

Screenshots

I don't have an Android device/emulator here to capture before/after images as CONTRIBUTING.md requests — happy to add them. The change adds "Rename" above the existing Archive/Delete items in the row long-press menu.

🤖 Generated with Claude Code


Note

Low Risk
Client-only UI and menu wiring that reuses an existing metadata update path; no server or contract changes.

Overview
Adds Rename to thread row long-press menus on Home and the iPad sidebar, for both v1 and v2 list rows, aligning mobile with the web thread menu.

Choosing Rename opens a new cross-platform showRenameThreadDialog modal (mounted via RenameThreadDialogHost at the app root, patterned after ConfirmDialogHost). The field is prefilled with the current title; Rename stays disabled until the trimmed name is non-empty, and confirming an unchanged title skips the update.

useThreadListActions.renameThread drives the flow and calls the existing threadEnvironment.updateMetadata command with the new title, with an alert on failure.

Reviewed by Cursor Bugbot for commit d7cb11a. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add rename thread action to thread row menus in mobile

  • Adds a 'Rename' option to the long-press/context menu in both ThreadListRow and ThreadListV2Row, visible when a rename handler is provided.
  • Introduces RenameThreadDialogHost, a modal with a prefilled text input and Cancel/Rename actions; confirm is disabled until the trimmed value is non-empty and differs from the original.
  • Adds showRenameThreadDialog, an imperative function to trigger the modal from anywhere in the app.
  • Wires the rename flow through useThreadListActions, which calls updateMetadata to persist the new title and shows an alert on failure.
  • The rename action is available in both the home screen thread list and the navigation sidebar.

Macroscope summarized d7cb11a.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f67e651-8287-41f7-8f53-2acaac8f9714

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 7, 2026
Comment thread apps/mobile/src/features/home/useThreadListActions.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (rename thread from row menu) with a new dialog component and integration across multiple screens. While it uses existing APIs and follows established patterns, new capability warrants human review.

You can customize Macroscope's approvability policy. Learn more.

The thread row long-press menu only offered Archive and Delete. Add a
"Rename" item that opens a prefilled dialog and dispatches
thread.meta.update { title }, matching the web per-thread action menu.

- New RenameThreadDialogHost: a cross-platform text-input dialog (RN's
  Alert.prompt is iOS-only, so Android needs a custom modal), mounted at the
  app root next to ConfirmDialogHost. Rename stays disabled until the trimmed
  value is non-empty, and an unchanged title dispatches nothing.
- useThreadListActions gains renameThread, reusing the existing
  updateMetadata command.
- Both the v1 (ThreadListRow) and v2 (ThreadListV2Row) row menus render the
  item across every variant, on both the Home list and the iPad sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sideeffffect
sideeffffect force-pushed the feat/mobile-thread-rename branch from 78a0ca2 to d21ac12 Compare August 7, 2026 22:34
@sideeffffect sideeffffect changed the title feat(mobile): rename and regenerate title from the thread row menu feat(mobile): rename a thread from the row menu Aug 7, 2026

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d21ac12. Configure here.

Comment thread apps/mobile/src/components/RenameThreadDialogHost.tsx Outdated
The rename dialog is a centered edge-to-edge Modal with an autofocused
field; on Android the soft keyboard could overlay the card, hiding the
input and actions. Wrap the content in KeyboardAvoidingView (from
react-native-keyboard-controller, the same helper the composer sheets use)
so the card lifts above the keyboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@t3dotgg

t3dotgg commented Aug 8, 2026

Copy link
Copy Markdown
Member

This was added already sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants