Skip to content

fix(web): a draft thread's panel says the Environment browser comes with its first message (#53) - #54

Merged
immakermatty merged 3 commits into
mainfrom
dev6646/draft-thread-note
Oct 12, 2026
Merged

immakermatty merged 3 commits into
mainfrom
dev6646/draft-thread-note

Conversation

@immakermatty

Copy link
Copy Markdown

Status: ready for review

Why

#53, found on the F47 canary and seen again by Matěj on 2026-10-12 in 0.0.45-preview.20261012.1. On a new thread before its first message, the right panel showed upstream's empty state, with Browser "Only available in the desktop app.", although the Environment has a browser.

A draft is no thread of the server yet. Its tab stream answered 404, which an EventSource never retries.

While fixing it, a second gap showed up. ChatView's promotion is data-driven: the draft keeps its thread ref when its first message makes it a server thread. So the failed stream was never reopened, and Nová karta did not appear on the new thread until a reload or a navigation away and back.

Matěj chose the smaller variant of #53 (2026-10-12): keep upstream's empty state on a draft, and say in one line why the browser is not there yet.

What changes

  • ChatView.tsx (the one hook call): it passes draft: !isServerThread to useLazurioThreadTabs.
  • Overlay (LazurioEnvironmentBrowser.tsx, threadTabs.ts, LazurioNewTab.tsx):
    • a draft opens no tab stream, so it gets no 404, and the store records the draft in view;
    • when the thread becomes the server's, the stream opens (the effect depends on the flag), and Nová karta follows the first snapshot as on any thread.
  • Empty state (RightPanelTabs.tsx):
    • where the shell defines <lazurio-new-tab> and a draft is in view, the empty state shows one line under the list: "Prohlížeč Environmentu bude k dispozici po první zprávě." (English: "The Environment browser comes with the first message.");
    • the same text replaces the Browser row's desktop-only reason.
    • Where the server already said of another thread that this Environment has no browser, upstream's line stays.
  • What does not change:
    • the desktop app, mobile and non-Lazurio pages;
    • the "+" menu when a draft has other surfaces open, which keeps upstream's Browser reason (documented).
  • Contract test: it pins the two seams.
  • Runbook: it records the behaviour, the seams and the pre-release browser check.

Verification

  • vp test run src/lazurio (web): 72 passed, including the new cases:
    • a draft opens no stream, and its promotion opens it;
    • the line shows on a draft with the shell's element;
    • the line is absent without the element, or where the server said the Environment has no browser.
  • node --test scripts/lazurio-release-contract.test.mjs: 22 passed.
  • vp fmt --check: clean. Web typecheck: clean.
  • In the browser (root 0178), on the canary after the preview release: a new thread shows the line before its first message, and Nová karta after it without a reload.

Release

Goes into the next T3 preview together with the Environment-name and panel tuning from Matěj's 2026-10-12 review, then stable 0.0.45-lazurio.8 after his check.

🤖 Generated with Claude Code

immakermatty and others added 3 commits October 12, 2026 12:20
…ith its first message

On a new thread, before its first message, the right panel showed upstream's
empty state with Browser "Only available in the desktop app." (#53). A draft
is no thread of the server yet, so its tab stream answered 404, which an
EventSource never retries.

The draft also keeps its ref when its first message promotes it, so the
failed stream stayed closed. Nová karta then did not appear on the new
thread until the page was reloaded or the person navigated away and back.

ChatView now tells the overlay whether the thread is a draft:
- a draft opens no stream, and its empty panel stays upstream's;
- under the list, and as the Browser row's reason, the panel says
  "Prohlížeč Environmentu bude k dispozici po první zprávě." (the variant
  Matěj chose on 2026-10-12);
- once the thread is the server's, the stream opens and Nová karta follows.

Where the server already said of another thread that this Environment has
no browser, upstream's line stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChatView's one hook call now carries the draft flag. RightPanelTabs passes
the overlay's line into the empty state, which uses it as the Browser row's
reason and as one line under the list (#53).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explains why a draft opens no tab stream, and what its empty panel says. The
stream opens after the first message. The seam list and the pre-release
browser check now include it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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.

@immakermatty APPROVED — exact head 06d3aed. Ověřil jsem přechod konceptu na serverové vlákno při stejném refu: draft neotevírá EventSource, změna příznaku znovu spouští efekt a po cleanupu otevírá stream. Věta v prázdném panelu je omezená na shell s Novou kartou a bez dřívějšího unavailable snapshotu; desktop a mobilní cesta zůstávají mimo overlay. Švy v ChatView/RightPanelTabs a kontrakt testu odpovídají diffu. Lokálně: 22/22 release-contract testů, git diff --check čistý; webové testy/typecheck/fmt jsou doložené zeleným CI na tomto headu, lokální web suite jsem bez závislostí nespouštěl. Vlákna 0, CI green, main c2dd835, mergeable. Schválení neznamená vydání stable: prohlížečový canary check a release gate zůstávají Matějovi.

@immakermatty
immakermatty merged commit 830f4a4 into main Oct 12, 2026
7 checks passed
@immakermatty

Copy link
Copy Markdown
Author

Merged (rebase) at 830f4a4. The local worktree DEV-6646-draft-thread-note was removed after verifying all three commits are on main and the remote branch holds the same head (06d3aed).

@immakermatty
immakermatty deleted the dev6646/draft-thread-note branch October 13, 2026 19:21
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.

2 participants