What happens#
On desktop (v0.1.13, Linux), when I open a new thread, the draft hero first shows only the project prompt. A few seconds later the "or start without a project" link appears under it. Until then there is no way to start a no-project thread and no sign that one is coming. When the line shows up, the headline jumps, so the screen looks like it changed after it had already loaded.
Why#
In apps/web/src/components/chat/DraftHeroHeadline.tsx, the whole <p> holding the link is rendered only when scratchWorkspaceRoot !== null:
{scratchWorkspaceRoot === null ? null : (
<p className="mt-2 flex h-6 ...">{isScratchDraft ? projectSelector : orStartWithoutProject}</p>
)}
scratchWorkspaceRoot comes from availableScratchWorkspaceRoot() (packages/client-runtime/src/operations/projects.ts), which returns null unless the environment's connection phase is "connected" and its serverConfig has arrived with scratchWorkspaceRoot. While the environment is still connecting, the value is null, so the option and the row both disappear. NoProjectsHero has the same gating for its "Start without a project" button.
So "not connected yet" and "this environment can't offer a scratch folder" look the same to the user, and the UI switches from one to the other once the connection finishes.
Expected#
- Reserve the
h-6 row from the start so the headline doesn't shift.
- While the target environment is still connecting (and is expected to offer a scratch root), render "or start without a project" disabled or pending, with a tooltip such as "Connecting…", or let a click queue until the connection is ready.
- Hide it only when the environment is connected and reports no
scratchWorkspaceRoot.
Repro#
- Launch the desktop app, or let the local environment reconnect.
- Start a new thread right away (Ctrl/Cmd+N).
- The hero shows without the "or start without a project" line, which appears a few seconds later and pushes the layout around.