Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Closing: niieani already has 3 or more open PRs here, which is the limit for contributors who are not vouched. Once one of them is merged or closed, open this again. See the open PR limit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f19d7a445
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (frame === page.mainFrame() && !tab.loading) void reportLoaded(tab); | ||
| if (!desktop) void recordFrameCopies(tab, frame); | ||
| }); | ||
| if (!desktop) watchAppLinks(cdp, (link) => forwardAppLink(tab, link)); |
There was a problem hiding this comment.
Forward desktop-backed server links to the controlling viewer
When a web/mobile client controls a desktop-backed server tab, setUpTab reuses desktop.page and attachViewer streams that same page, but this guard prevents its app links from reaching the viewer. The newly added Manager.willFrameNavigate → ElectronBrowserHost.openLinkFromPreview path instead handles t3-thread: on the host desktop and navigates its router, leaving the controlling viewer on the old thread. Native-backed server tabs need controller-directed delivery too, with host-local handling suppressed while a streamed viewer controls them.
AGENTS.md reference: AGENTS.md:L29-L29
Useful? React with 👍 / 👎.
| navigate({ | ||
| to: "/$environmentId/$threadId", | ||
| params: { environmentId: ref.environmentId, threadId: ref.threadId }, |
There was a problem hiding this comment.
Resolve peer thread links through the source environment
When a v2 thread link targets an environment reachable only through the source environment's peer link, this always selects the direct route despite the client having no connection to that destination. MarkdownThreadLink already uses resolveLinkedThreadOpen and openLinkedThreadRead for this case, and the mobile handler reuses useOpenThreadLink, but this web hook loses that access path, so the destination cannot load. Resolve the destination through the source environment before choosing the direct or linked-thread route.
AGENTS.md reference: AGENTS.md:L75-L75
Useful? React with 👍 / 👎.
| const controller = [...tab.viewers].find((viewer) => viewer.id === tab.control.controller); | ||
| controller?.push({ _tag: "appLink", url: link.url }); |
There was a problem hiding this comment.
Exclude in-flight agent clicks during control takeover
When a viewer takes control while an agent click is already running, SessionControl.take() sets controller immediately and only then waits for existing work to drain. An app-link event from that still-running agent click therefore matches this lookup and gets sent to the viewer; a t3-thread: link then changes their current thread without confirmation. This is reproducible with the existing control implementation while takeover remains pending. Gate delivery on completed human ownership or actual input origin rather than the reserved controller alone; tab.agentOperating already identifies in-flight agent work.
Useful? React with 👍 / 👎.
Problem
App links do nothing in a server-hosted Browser tab. The tab's Chromium runs headless on the server, where it aborts
obsidian:,t3-thread:and similar links. Nothing opens on the server or on the device of the person clicking. Atarget="_blank"app link also leaves an empty tab behind.Expected: the link opens where the person clicking is, the same as in the desktop preview. A thread link opens the thread, and any other app link asks, then opens on that device.
Change
ServerBrowserAppLinks.watchAppLinkslistens on the tab's CDP session forPage.frameRequestedNavigation(current tab) andPage.windowOpen. The tab sends a newappLinkviewer output to the viewer holding control. Agents act only while no person holds control, so a page an agent drives never opens apps on anyone's device. The empty window Chromium opens for a_blankapp link is closed instead of becoming a tab.createPreviewStreamClientexposesonAppLink.ServerBrowserSurfacepasses the link to the sameopenAppLinkas rendered HTML (fix(web): app links in rendered HTML and the desktop preview open #41169).Behavior to note
App links open on the device of the person controlling the tab, not on the server. A link the page opens with no one in control, or while an agent drives it, is dropped.
Scope
Bug fix: links on a page in the server Browser do nothing today. It shares the web handler from #41169, hence the stack.
Verification
ServerBrowser.test.tscase, red before the fix: app links reach the controlling viewer, web navigations do not, the empty_blankpopup is closed, and an unrelated empty popup is still adopted. 110/110.vp run check:changedandvp run i18n:checkpass.vp run scenarios:prove scripts/scenarios/server-preview-thread-link-opens-thread.e2e.ts --base fix/html-app-links: fails on base1689b74a3a, passes on head242a5b628b. Clicking at3-thread:link in the server Browser opens the target thread.1689b74a3a(stays on Source thread)obsidian:links with_self,_blankand_topeach reachedopenAppLinkonce; the tab kept its page and no empty tab was left. Thread links with all three targets opened the thread.Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.
🤖 Generated with Claude Code