Repository navigation
fix(web): find in thread opens from the thread title menu, so phones can reach it - #22352
mkantautas wants to merge 3 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped web bug fix that makes the existing thread-search bar reachable from the thread title menu on touch devices. It preserves the existing feature gate, adds no new schema or deployment behavior, and keeps sidebar menus unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add Find in thread menu action apps/web/src/components/threadActionMenu.logic.ts, apps/web/src/hooks/useThreadActionMenu.ts, apps/web/src/contextMenuFallback.ts, apps/web/src/hooks/useThreadActionMenu.test.ts, apps/web/src/components/threadActionMenu.logic.test.ts |
The action-menu logic adds a “Find in thread” action that does not require operate permission. The hook exposes the action when an onFind callback is provided and invokes it when selected. The fallback icon and tests are updated. |
Enable find for eligible chat threads apps/web/src/components/ChatView.tsx, apps/web/src/components/chat/ChatHeader.tsx, apps/web/src/components/Sidebar.tsx |
ChatView passes a find callback to ChatHeader and uses a shared eligibility condition for ThreadFindCanvas. Sidebar thread menus set canFind to false. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant ChatView
participant ChatHeader
participant useThreadActionMenu
participant User
participant ThreadFindCanvas
ChatView->>ChatHeader: Pass onFindInThread when threadFindEnabled
ChatView->>ThreadFindCanvas: Use threadFindEnabled for availability
ChatHeader->>useThreadActionMenu: Pass onFind callback
User->>useThreadActionMenu: Select find action
useThreadActionMenu->>useThreadActionMenu: Invoke onFind callback
Possibly related PRs
- pingdotgg/t3code#24343: Adds another entry point to the same in-thread find behavior.
Suggested labels: bugfix
Suggested reviewers: juliusmarminge, maria-rcks
Merge Risk: 
Minimal · up to 477ac
-
The thread-find action is consistently gated and dispatched, with no actionable merge-blocking risk identified.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the main change: Find in thread opens from the thread title menu so phones can reach it. The changeset adds a "Find in thread" item to the chat header thread menu, which matches. The title uses the conventional commit form and fits the scope of the change.
Full details: Description check
-
Explanation
The description follows the template. The Problem section gives the cause (no touch entry point for Find in thread) and reproduction steps. The Change section explains the menu item, the read-only behavior, and the sidebar exclusion. The Scope and approval section explains why the fix qualifies as a very small, focused bug fix without a prior issue. The Verification section gives concrete simulator steps, before and after results, screenshots, a recording, and the checks run, and it notes what was not checked. The model/harness attribution is present at the end. No required section is missing.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
…can reach it Find in thread opened only from Cmd+F and the command palette. A phone has no Cmd+F, and the default sidebar has no tap target for the palette, so on a touch screen find could not be opened at all. The menu that opens from the thread title now starts with Find in thread when the server supports it.
ee43c9b to
c456223
Compare
Conflicts: apps/web/src/components/ChatView.tsx
…h-20261025 # Conflicts: # apps/web/src/components/chat/ChatHeader.tsx # apps/web/src/hooks/useThreadActionMenu.test.ts # apps/web/src/hooks/useThreadActionMenu.ts
Problem
On a phone, Find in thread cannot be opened. It opens from Cmd+F (
chat.find) and from the command palette's "Find in current thread". A phone has no Cmd+F, and the default sidebar has no tap target for the command palette: its Search field filters threads. The find bar, its search and its match navigation all work on touch once open; nothing on screen opens it.Reproduce: open the web client on an iPhone, open a thread, look for a way to search inside it.
Change
The menu that opens from the thread title in the chat header (
useThreadActionMenu) gets "Find in thread" as its first item when the open thread supports find (serverConfig.threadFind, the same condition the find bar uses). Choosing it calls the same open function aschat.find. The item is read-only, so connections without operate scope keep it. The sidebar's thread menu does not show it, since find works on the open thread only. The web context-menu fallback gets thetext-searchicon the command palette already uses for this action.Scope and approval
A very small, focused fix for an obvious bug: a shipped feature has no way to open it on touch devices. The fix adds one entry point to a menu every client already has and reuses the existing find bar. No find behavior, setting or default changes. Desktop users see the same item in that menu, next to their Cmd+F.
Verification
vp run devon this branch, using a thread whose words were replaced with filler text.main): tapping the thread title opens the menu without any find action.Before (
main):After: the menu, then the find bar opened from it.
Recording: after.mp4
mainby merges, without rebasing: 5ffe045 on 2026-10-22 and eabcfa2 on 2026-10-25. On the current head,useThreadActionMenu.test.tsandthreadActionMenu.logic.test.tspass (10 tests), and withmain's application code the find test fails.vp run check:changedpasses (format, lint, knip, web typecheck, 159 tests in 7 files). In the 2026-10-22 merge, upstream perf(web): streamed reply text no longer re-renders ChatView #23117 had removed the find bar'scontentoption, and upstream refactor(web): chat shortcuts live with the hooks that own their actions #23097 had removedopenThreadFindStable; the merge restores it for the header menu's callback. In the 2026-10-25 merge, upstream feat: share a thread with a guest who watches live and sends messages you approve #24104 had addedcanShareWithGuestnext to this PR'sonFindin the header menu's hook input; the merge keeps both. Apart from those two lines, the application changes are identical to the original head. Local checks used Node 26.12.1 and pnpm 12.14.0, the repo's pins. The simulator evidence above is from the original head and was not rerun for these syncs.Model: Claude Opus 5.5 (xhigh). Harness: Claude Code in T3 Code.
Rebase on 2026-10-21: GPT-6 Astra (xhigh), Codex harness in T3 Code.
Syncs with main on 2026-10-22 and 2026-10-25: Claude Opus 5.5 (xhigh), Claude Code in T3 Code. Review: GPT-6 Astra (xhigh), Codex harness in T3 Code.