Skip to content

fix(lazurio): Buddy's window opens in the avatar's frame, with days on a phone - #238

Merged
immakermatty merged 5 commits into
mainfrom
lazurio/buddy-window-frame
Nov 19, 2026
Merged

immakermatty merged 5 commits into
mainfrom
lazurio/buddy-window-frame

Conversation

@immakermatty

@immakermatty immakermatty commented Nov 19, 2026 •

Copy link
Copy Markdown

Status: Draft, ready for review once CI is green. Fixes the findings from the acceptance of Buddy GEN4's window on the example Environment (T3 Code 0.1.10-lazurio.2). Three commits, one per finding.

1. The window by Buddy's avatar stayed empty (blocking)

Problem. Since upstream v0.1.10 (pingdotgg#36395) every HTML answer refuses any frame: Content-Security-Policy: frame-ancestors 'none' and X-Frame-Options: DENY. On Buddy's origin the Environment's gateway adds its own frame-ancestors naming the Environment's pages (Launchpad, Chat, MausBot). The browser applies both policies, so the frame by the avatar got ERR_BLOCKED_BY_RESPONSE. The same refusal reaches Buddy GEN3's own server (T3CODE_LAZURIO_BUDDY=1) wherever it runs 0.1.10, so a lane that moves GEN3's T3 pin to 0.1.10 would break GEN3's bubble too.

Fix. lazurio/buddyFraming.ts decides per request: every page of Buddy's own server (GEN3, reachable only through Buddy's origin) and, on the shared server, the pages whose host is that of T3CODE_LAZURIO_BUDDY_ORIGIN leave framing to the gateway. Every other origin, Chat's too, keeps upstream's refusal. The gateway passes the request's Host unchanged (reverse_proxy without header_up Host), so the host comparison sees Buddy's hostname. The seam is the static handler's frame headers in http.ts; http.ts and http.test.ts join the CI allowlist, and the release contract holds the seam.

Test. http.test.ts "leaves framing Buddy's pages to the gateway, and Chat's refused": on the shared server, HTML for Buddy's host has neither header, while Chat's host and loopback keep both (/ and an SPA route); on Buddy's own server, Buddy's host has neither. It fails on main and passes here. The request goes through Node's client because fetch drops a custom Host.

2. Buddy's thread showed as Settled (#234)

Problem. Buddy's thread is one endless conversation, but upstream's inactivity sweep settled it.

Fix. The first time the overlay finds Buddy's thread under auto-settlement (GEN3's own thread, or GEN4's made or adopted on the shared server), it sends thread.auto-settle.set {enabled:false} and, if the sweep already settled the thread, thread.unsettle. Both commands have fixed ids per thread, so they run once: a Settle by hand later stays.

Test. buddySurfaceThread.test.ts: made threads (GEN3 and GEN4) have autoSettleDisabledAt; an adopted pilot thread that was settled comes back active with auto-settlement off, and a later manual Settle stays. Three cases fail on main.

Closes #234.

3. No days on a phone, and T3's controls over Buddy's header

Problem. Below the sm width (a phone, and the bubble) the day pane is left out and nothing opens it. When I checked that in a browser, I also found that T3's thread controls (WorkspaceTitlebarControls, fixed at the window's top right) sit over Buddy's header. In the bubble they cover Full screen and Close; acceptance could not see this because the frame never loaded.

Fix. Where the pane does not fit, a Days button in the header opens the days in a sheet (full width on a phone by Lazurio's sheet rule), and picking a day closes it and jumps there. The surface sets --workspace-controls-right so T3's controls sit left of Buddy's own buttons, and hides them under the open sheet.

Checked in a browser (dev server on separate data, Buddy's origin http://localhost:…, one free Replay turn; headless Chromium):

Width What
390 Header: T3's three controls, then Days; the sheet opens with today's entry; a pick closes it
420 in a frame Header: T3's controls, then Days, Full screen, Close, none covered (framed mode forced for the capture, since a frame host must be an https://…lazurio.io page)
1440 Day pane on the left as before, no Days button

Before is main (c7fc30a), after is this branch, both on the same separate data:

Before After
390, window 390 before 390 after
390, Days open (no way to open the days) 390 days open
390, after a pick 390 after picking a day
420 in a frame framed before: T3's controls over Full screen and Close framed after: T3's controls left of Days, Full screen and Close
1440 (unchanged) 1440 after

The coordinator walks the window again on the example Environment after the release.

Verification

  • vp test run for http.test.ts (25) and buddySurfaceThread.test.ts (8): pass.
  • node --test scripts/lazurio-release-contract.test.mjs: 54 pass.
  • vp run check:changed: format, lint, knip, typecheck and react compiler pass. AgentContextBudget.test.ts fails locally with the same numbers without these changes (local Codex context); CI decides.

Release

T3 Code 0.1.10-lazurio.3. Then the example lane gets the new T3 pin. Machines stays unchanged: the gateway already sends the right frame-ancestors on Buddy's origin.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

🤖 Generated with Claude Code

immakermatty and others added 3 commits November 19, 2026 15:01
Since upstream v0.1.10 every HTML answer refuses any frame (CSP
frame-ancestors 'none' and X-Frame-Options DENY). On Buddy's origin the
gateway adds its own frame-ancestors of the Environment's pages, and the
browser takes the stricter policy, so the window by Buddy's avatar stayed
empty. Buddy's own server (GEN3) and the shared server's Buddy origin
(T3CODE_LAZURIO_BUDDY_ORIGIN) now leave framing to the gateway; every
other origin, Chat's too, keeps upstream's refusal.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Buddy's thread is one endless conversation, but upstream's sweep settled
it after days without activity, and the window then showed it as Settled
(#234). The first time the overlay finds Buddy's thread under
auto-settlement (GEN3's own thread, or GEN4's made or adopted on the
shared server), it turns auto-settlement off and reopens a thread the
sweep already settled. A Settle by hand afterwards stays.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…m beside them

On a phone, and in the bubble, Buddy's window had no day pane and nothing
to open it. Where the pane does not fit, a Days button in Buddy's header
opens the days in a sheet, and picking one closes it and jumps there.
T3's thread controls sit fixed at the window's top right, over Buddy's
header: they now move left of Buddy's own buttons (Days, and Full screen
and Close in the bubble), which they covered, and hide under the open
sheet.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@immakermatty
immakermatty force-pushed the lazurio/buddy-window-frame branch from 9030488 to 178a8da Compare November 19, 2026 15:01
@immakermatty
immakermatty marked this pull request as ready for review November 19, 2026 15:02
@immakermatty immakermatty self-assigned this Nov 19, 2026

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking:

  • Please attach the before-and-after UI captures to this PR, including the phone and framed header states. The repository requires UI changes to carry before/after images on GitHub; the description says the captures stay in the acceptance record but does not link or include them, so the claimed layout and unobstructed controls cannot be reviewed here.

Non-blocking: The focused server tests (33) and release contract tests (54) pass. check:changed passed format, lint, knip, GraphQL, typecheck and React compiler; its AgentContextBudget test failed in this environment, consistent with the local-context discrepancy described in the PR. GitHub CI is still running. My isolated browser reached pairing but I could not independently exercise the UI.

Order and migrations: Release T3 Code 0.1.10-lazurio.3 before updating the example lane's T3 pin.

— Pablo

@immakermatty

Copy link
Copy Markdown
Author

The before/after captures are now in the description, under "Checked in a browser": 390 (window, Days open, after a pick), 420 in a frame, and 1440. Before is main at c7fc30a, after is this branch, both on the same separate data with one free Replay turn, captured in headless Chromium.

The framed before shows T3's three controls over Full screen and Close. In the framed after they sit left of Days, Full screen and Close. Both framed captures force framed mode in the dev web, because a frame host must be an https://…lazurio.io page. That override is not in this branch.

The head is unchanged (178a8da). Only the description changed.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking:

Non-blocking: The added before/after captures resolve the previous review finding. I inspected the phone, day sheet and framed-header images; framed mode was forced for the captures, so the real gateway framing path remains for acceptance on the example Environment.

Order and migrations: Release T3 Code 0.1.10-lazurio.3 before updating the example lane's T3 pin.

— Pablo

…that keeps it unsettled

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@immakermatty

Copy link
Copy Markdown
Author

CI failed on 178a8da in agentCli.test.ts ("prints Buddy's thread, made once in Buddy's project"). The test expected thread.create as the only command, but Buddy's thread now also gets thread.auto-settle.set (fix 2). f5dfff0 updates only that test: the thread is made once, and every other command is the same fixed thread.auto-settle.set lazurio:buddy-thread:endless:buddy, which the server's receipts replay. Locally src/lazurio/ passes (656 tests). No code change, so the captures in the description stay as they are.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

…, so a second ask sends nothing

The fake orchestrator now applies thread.auto-settle.set to the thread's
shell, as the real one does, and the test checks the exact commands: the
thread made once with auto-settlement off, and nothing on the second ask.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@immakermatty

Copy link
Copy Markdown
Author

Done in 5b6fe90. The fixture's orchestrator (buddyThreadRoute in agentCli.test.ts) now applies thread.auto-settle.set to the thread's shell, as the real orchestrator does. The test checks the exact commands over two asks: thread.create with Buddy's fixed create command, then thread.auto-settle.set lazurio:buddy-thread:endless:buddy once. The second ask finds the thread with auto-settlement off and sends nothing. That is the repeat-call behavior keepBuddysThreadOpen intends (it returns once autoSettleDisabledAt is set). Locally agentCli.test.ts passes (24) and the server typechecks. CI runs on this head.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous blocking test failure is addressed: the fixture now applies auto-settlement changes and the CLI test verifies that a second request dispatches nothing. The focused test passes locally.

Non-blocking: check:changed passes format, lint, knip, GraphQL, typecheck and the React compiler; its context-budget test still fails locally with the same baseline discrepancy reported in the previous review. The GitHub server and web compatibility job is still running, so its result remains to be verified before merge.

Order and migrations: Release T3 Code 0.1.10-lazurio.3 before updating the example lane’s T3 pin.

— Pablo

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buddy's thread auto-settles after inactivity; exempt it as an endless thread

2 participants