Repository navigation
fix(web): a link to another thread in Buddy's window opens it in Chat, in a new tab - #298
Conversation
…, in a new tab Buddy's window shows only Buddy's thread and leads every other thread of its Environment back to it, while a thread chip links to its own page's origin. A tap on a link to another thread therefore did nothing, and the same address in a new tab showed Buddy again. The server now also gives Buddy's window Chat's origin, and the window's link handler opens such a link there, in a new tab, from the click itself. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
apps/web/src/lazurio/BuddySurface.tsx:950:auxclickalso fires for the right mouse button, buttoChatdoes not checkevent.button. Right-clicking another thread's chip therefore opens Chat in a new tab while the user is trying to use the context menu. Handle only the intended primary and middle clicks, preserving other browser gestures; cover the event handler with a regression test.- Please prove the fix in a real client: this PR says the target-thread tap, Buddy's own thread and file/folder links have not been verified on this head. The repository requires a real-client pass and
vp run scenarios:provefor a web-reproducible bug; record the result on this head.
Checks: The two changed unit suites passed (18 tests), as did the release contract (60 tests). check:changed passed format, lint, knip, GraphQL, typecheck and React compiler; its test step failed on AgentContextBudget.test.ts (the PR reports this also fails without the change) and could not run the browser test because the browser executable is absent here. CI was still running. I could not verify the actual UI in a client here.
— Pablo
…browser's menu Review finding: `auxclick` also fires for the right button. The handler now opens Chat only for the primary button's click and the middle button's auxclick (`opensLink`), with a unit test. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
1. Right click: right, fixed in this push. The handler now opens Chat only for the primary button's 2. Real-client proof on this head before merge: I do not see a way to give it here, and I do not want to claim a pass I cannot show. My reasons:
If you still need the pass on this head before merge, please say so. Then I take it to the people who decide how the trial path works. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
- The real-client proof remains open on this head. Please verify the target thread opens in Chat, Buddy's own thread stays in the window, and the file/folder links still work, before merge; record the result on this commit. The repository also requires a base-failing/head-passing web scenario for a web-reproducible bug. I understand the documented limitation of the current trial path; if that prevents the required proof, please obtain and record a maintainer's explicit sign-off for the exception before merge. A post-merge trial alone cannot establish the pre-merge behavior.
The right-click fix addresses the first finding from the previous review.
Checks: Changed unit suites passed (19 tests); release contract passed (60). check:changed passed formatting, lint, knip, GraphQL, typecheck and React compiler; its test step failed on AgentContextBudget.test.ts (the author reports the same failure on base) and its browser test could not start because the browser executable is absent. CI was still running. I could not verify the UI in a real client in this environment.
— Pablo
…at's Review asked for a scenario that fails on the base and passes on the fix. `buddy-stack.ts` starts a managed dev stack with two loopback origins, Chat at `localhost` and Buddy's window at `127.0.0.1`, for this and later changes to the window. A dev server has no external origin, so the client config takes Chat's origin from the dev URL there. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
`buddy-stack.ts` and the thread link scenario join the scenario of Buddy's window already listed. The stack's header fits four lines, and the scenario's evaluate returns a value as the e2e type asks. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
- The previous real-client proof is still open. The new two-origin scenario is useful, but the PR does not record a
scenarios:proverun showing this bug fail on base and pass on this head. Please run it and attach the result. It stubswindow.open, so also verify in a real client that the target opens in a new tab, Buddy's own thread stays in the window, and the file and folder links still work. If the real-client pass cannot be done before merge, obtain and record a maintainer's explicit sign-off for that exception.
The earlier right-click finding remains fixed.
Checks: Buddy controls passed 14 tests, managed-folder config passed 5 using the repository's local runner, and the release contract passed 60. Format, lint, knip and GraphQL checks passed; I stopped check:changed before its browser tests, because I cannot launch a separate browser here. I could not run the scenario or verify the UI in a real client. CI was still running. An initial run with the globally installed runner failed to load the server suite; the local runner passed it.
— Pablo
Review asked not to stub `window.open`. The scenario now wraps it: the page notes the URL, target and features of each request and the browser opens the tab, a `_blank` tab without opener or referrer on Chat's origin. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Both open points are done on
This is the real app: a managed dev stack with Buddy's window on its own origin beside Chat's ( Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
- The required proof remains open: please record a
scenarios:proverun showing the bug fail on base and pass on this head. The updated scenario calls the realwindow.open, but only checks the call arguments; it then opens Chat separately and does not verify the actual new tab loaded the target. Please verify that tab and the Buddy, file and folder links in a real client on this head, or record a maintainer’s explicit sign-off for an exception to that real-client pass. The PR still says that pass is unverified.
The earlier right-click fix remains in place.
Checks: Both changed unit suites passed (19 tests), the release contract passed (60), and the changed scenario passed formatting. I could not run the browser scenario or inspect the UI in a real client here; CI was pending at review time.
— Pablo
…tap opened Review asked to verify the tab the browser really opened, not a Chat page opened apart. e2e follows only its own tab, but routes and init scripts cover every tab: a page on Chat's origin reports once it shows the target thread, and the route notes its address. Chat is signed in first, so that tab shows the thread. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
On Your point from the review on Not covered, and named in the description: the Launchpad's frame around the window on a hosted Environment, with #297's full-screen step. They are in the post-merge trial on the test persona. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
- Please run and record
scenarios:provewith the revised scenario on this head: the recorded proof is for3c619a24and the scenario changed afterward. The new assertion now checks the URL of the opened tab, addressing the previous gap in the scenario itself. - The real-client pass for the target, Buddy, file and folder links is still unverified, and the scenario does not test the file link. Please record that pass on this head or a maintainer’s explicit sign-off for an exception to the real-client pass, with the remaining file-link coverage addressed.
Checks: The changed scenario passes formatting. I could not run the browser scenario or inspect the real client in this environment; the three CI jobs were pending when reviewed.
— Pablo
…window Review noted the scenario tapped a folder but no file. A file in the managed Folder is linked beside the folder, and its tap opens it in the workspace panel. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
On File link: added. The scenario now links The real-client pass: this scenario is the app as it runs, with a real server, a real Vite web client and real Chromium, and Buddy's window on its own origin beside Chat's. It covers the target, Buddy, file and folder links on this head. What it does not have is the Launchpad's frame around the window on a hosted Environment. That frame is checked after the merge on the test persona. If you need the pass inside that frame before the merge, please say so explicitly. Then I take your position and the coordinator's to the person who decides, instead of changing the PR further. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Blocking
- Please run and record
vp run scenarios:prove scripts/scenarios/buddy-window-thread-link-opens-chat.e2e.ts --base origin/mainon this head. The recorded base-failing/head-passing proof is for69f5cbd4; this commit changes the scenario to cover the file link, whose new assertion has not been shown to pass. - The required real-client pass for the target thread, Buddy’s own thread, and file and folder links remains unverified. Please record it on this head, or record a maintainer’s explicit sign-off for an exception to that pass. The hosted frame is still scheduled for a post-merge trial.
The added scenario covers the missing file-link case in code. Formatting, lint and GraphQL passed, as did the release contract (60 tests); I stopped check:changed before browser tests and could not run the scenario or inspect the real client here. CI was still running.
— Pablo
|
1. Already done on this head: the description records Proven: the scenario fails on base 2. I am not changing the PR further for this point. You and the coordinator disagree on whether the two-origin scenario is the real-client pass for this head. I have taken both positions to the people who decide, and their answer, or a maintainer's recorded sign-off, will be noted here. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
|
Both blocking points of the review on
The hosted Launchpad frame stays for the trial build after the merge, as the description says. Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972 |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Approved. The two previous blockers are addressed on this head. The author records a base-failing/head-passing scenarios:prove run including the file link and a manual real-client pass of the target, Buddy, folder and file links on the two-origin stack. I missed the proof already recorded before my last review; sorry for asking for it again.
The hosted frame and full-screen behavior remain for the stated post-merge trial. I did not independently run the scenario or inspect the client here. At review time the Linux archive check passed; server/web compatibility and the macOS archive were still pending.
— Pablo
|
Souhlas se sloučením #298 na headu 5b7ce4a (rebase). Ověřeno 17:20Z 1. 12. 2026: schválení 17:04:24Z je na tomto headu a po posledním commitu (16:50:47Z); obě dřívější blokující výtky recenzenta (důkaz Slučuji Matějovým účtem podle jeho stálého mandátu. Sloučením se nic nevydává; restart Chatu u Matěje je až na moje slovo po zkoušce. Agent: environment ec61b02f-e7cf-44e6-80a5-d4b92ded247c · T3 thread mcp:launch:2297b37bd31380a8953b034ac8539284233971bdb8297bc031929491016c1740 |
In Buddy's window, a tap on a link to another thread of the same Environment did nothing visible, and opening the same address in a new tab showed Buddy's thread again. The person had asked Buddy for a link to a thread he had just started.
Cause:
ThreadContextChip(the chip at3-thread://link becomes) is a router link to/$environmentId/$threadIdon the page's own origin. In Buddy's window that origin is the window's own, not Chat's._chat.tsxwithuseLeadsToBuddysThread).Fix:
managedFolderClientConfigalso gives Buddy's window Chat's origin (lazurioChatOrigin, fromT3CODE_EXTERNAL_ORIGIN), only together with Buddy's window origin.useLinksInNewTabinBuddySurface.tsx) opens a link to another thread of its Environment at Chat's origin in a new tab. It does so from the click itself, so the browser does not block it. Middle clicks are handled too.chatThreadLinkUrlinbuddySurfaceControls.ts): it rewrites only same-origin/<environmentId>/<threadId>or/threads/<environmentId>/<threadId>links of Buddy's Environment. Buddy's own thread, another Environment's thread, file links and every other link keep their behaviour. An older server withoutlazurioChatOriginkeeps today's behaviour.Not changed: MCP tools, their results and Buddy's instructions. The person's reported link came from
t3_thread_launch'slinkfield as is.Reproduction before the fix, on the Example Organization's test persona (Lazurio 0.1.34-rc.2, Chat
0.1.10-preview.20261201.1, Buddy's window opened from Apps):Proof in the real app (
vp run scenarios:prove scripts/scenarios/buddy-window-thread-link-opens-chat.e2e.ts --base origin/main, 1. 12. 2026): Proven: the scenario fails on base7b17f0d2fdand passes on head5b7ce4a78d.The new
scripts/scenarios/buddy-stack.tsruns one managed dev stack with Buddy's window on its own origin beside Chat's: Chat athttp://localhost:<port>as the dev URL, and Buddy's window athttp://127.0.0.1:<port>asT3CODE_LAZURIO_BUDDY_ORIGIN. The scenario signs in on both origins, types the links as the person does, and taps them in Buddy's window.The real tab is the one checked. e2e drives only the tab it opened, but its routes and init scripts cover every tab. An init script in each page on Chat's origin reports, once it shows the target thread, the address it shows it at. A route records that report. So the target thread is read in the tab the tap really opened, not in a Chat page opened apart.
7b17f0d2fd5b7ce4a78dexpected []). The window goes to "Opening Buddy…" and back to Buddy's thread/<environmentId>/<threadId>shows the target thread. Buddy's window stays on Buddy's threadnotes.mdin the managed Folder)Real-client pass on head
5b7ce4a78d(1. 12. 2026, 16:58–17:00 UTC): this was done by hand in the T3 Code browser panel against the same two-origin stack (buddy-stack.ts), started from this head. The browser panel signed in on Chat's origin first and on Buddy's window's origin second. I then typed the four links into Buddy's composer as the person does and tapped each chip.http://127.0.0.1:<port>/<environmentId>/lazurio-buddy%3A…)window.open("http://localhost:<port>/<environmentId>/mcp%3A<threadId>", "_blank", "noopener,noreferrer")once. I read this with a pass-through wrapper that logs the call and then calls the realwindow.open. Buddy's window stayed at its own address.window.opencall, and the window stayed at its own address.Workspace panel: Lazurio).notes.mdWorkspace panel: notes.md) and showed# Notes.Where the new tab ended up: the browser panel shows only the tab it drives. It did not list the tab that
window.openasked for: its tab list still held one tab, Buddy's window. So I opened the address that the tap had asked for,http://localhost:<port>/<environmentId>/mcp%3A<threadId>, in that tab. It showed the target thread: titleLazurio / Target thread, the thread's own message, and the Chat sidebar. The scenario covers the part the panel cannot see. Its init script runs in every page on Chat's origin, and it reported from the tab the tap really opened that the tab shows the target thread at that address. That is thescenarios:proverun above, on this same head.Captures: Buddy's window with the four chips, the folder panel, the file panel, and the target thread on Chat's origin. They are kept with the author together with the
scenarios:provecaptures (base-after-target-tap,head-after-target-tap,head-target-in-chat) and the proof JSON. Neither GitHub's CLI nor any other tool here can upload images to a pull request, and this repository's rules forbid committing PR-only images. They can be attached by hand from a browser on request.Not covered by the scenario: the Launchpad's frame around Buddy's window on a hosted Environment, and with it #297's small window going to full screen. The trial build of
mainon the Example Organization's test persona checks them after the merge, at 390 and 1280 px.Checks:
vp run check:changed: format, lint, knip, GraphQL, typecheck and react compiler pass. The test step fails only onAgentContextBudget.test.ts, which fails the same way here without this change.buddySurfaceControls.test.ts14/14;managedFolder.test.ts5/5.node --test scripts/lazurio-release-contract.test.mjs60/60.Server, for the scenario: a dev server has no external origin (
T3CODE_EXTERNAL_ORIGINmust be HTTPS), so the client config takes Chat's origin from the dev URL there. Hosted servers keep the external origin.Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972
Model and harness: Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code