next: Create opens its form where you are, and a form opens once
MergedThis updates vendor/hud to HUD 756fb4c. The frame's Create action now makes its call in the background and draws only the form over the current screen. No level or history entry is pushed. compose is stripped from stacks, history entries and remembered trees, so reloading, going back or forward, or choosing a tab again can't reopen a form.
I read the shell changes in full: Shell.svelte (act, formSent, plainPlace), Stack.svelte (newLevel, load, keep, sync, swap), routes.ts and its test, Nav.svelte, frame.ts and COMMIT. The logic holds up:
plainis applied wherever a call becomes stack, history or URL state:enter,sync,swap,newLevel.- The
openingcall is sent once, inload. keepandunopenedEntryunmark stored trees.recordAtbinds every path token before it accepts a route.
I did not read the renderer files (Compose.svelte, opened.ts, Tree.svelte, Gallery, Picture, Slides, preload.ts) or the HUDKit Swift files and tests. They are vendored from HUD, and AGENTS.md says vendored code isn't edited here. Your described HUD-side tests and the next check cover them.
Nothing here needs to change. One non-blocking note: act() leaves the previous composing tree in place until the new call answers, so a quick double-press while the form is open is only guarded by acting. That is fine in practice.
Thanks. On the note: while the form is open it's a modal dialog, so the page under it, Create included, is inert and can't be pressed again. Before it opens, acting drops a second press while the call is on its way. Leaving it as is.
Added d5b99b6 (HUD 969d9b5): New gallery's Location results now open as a popover in the top layer, placed against the field. They drop below it, or flip above it where there's more room, so the form's scroll and its Cancel/Post bar no longer cut them off. I checked it in Chromium with a harness of the same form at 900×640 (flipped above) and 900×900 (dropped below, over the footer), and picking a place still works. svelte-check, the renderer and shell SSR tests, and next's check and build all pass.
Since my approval, the only change is a vendor/hud bump to 969d9b5. It touches PlaceField.svelte and COMMIT. The place suggestions now float in the top layer as a popover, placed against the search input, so the form's scroll area and buttons can't cut them off. This is renderer code vendored from HUD, so I read it only for whether it breaks what I approved. It doesn't touch the Create or compose logic.
The popover is shown once and positioned again on scroll and resize, and its listeners are removed when the list goes away. I found nothing that needs to change.
- next: Create opens its form where you are, and a form opens once
- main
What changes
Create opens its form where you are. Pressing Create in the sidebar or rail no longer pushes a For You screen with a back arrow over Home. The shell makes the action's call in the background (read ahead as the button is hovered or pressed) and draws only its New gallery form over the screen you're on. That's the same modal the feed's + opens. No screen is pushed and no history entry is made. Once you post, the new gallery opens (
/profile/{actor}/gallery/{rkey}, the first record the form made that a route names). Cancel closes it and nothing moves.A form opens once.
composeis a one-time request. The shell no longer keeps it in a stack level's call, a history entry, a URL or its memory of screens. Trees it remembers have theiropenmark taken off, and it stripscomposefrom entries an older shell saved, too. Read-ahead is still keyed by the exact call, so an answer read withcomposeis only taken by the load that opens the form. So reloading, going back or forward, or choosing a tab again never reopens a form. That covers Create and Your story ("compose": true) alike.This is vendor/hud at HUD 756fb4c (app/shell). It also brings 9fcffeb, stories loading their next pictures ahead, which is already on app/shell.
Why
To reproduce: on next.grain.social, signed in, press Create, then Cancel, then reload. The form opens again on every reload. The frame's action is
getFeed(foryou) with"compose": "New gallery". The shell pushed that call as a screen and saved each level's call in the history entry (goto(..., { state: { here } })). On reload,afterNavigate→stacks[tab].sync(here)read the call again withcomposestill in it, and the restored screen opened its form again. The URL/feeds/for-youhas no compose. The shell's SSR test, run against the old shell, shows it: "Create pushed a screen: 2 levels", "Create made a history entry", "loaded again after Create: a form opened again", "a call was made with compose again".The fix is general and lives in HUD's shell and renderer, so any HUD app gets it. Grain's app file is unchanged. The action still names the same call, so hud-next needs no new keys.
How it was checked
npm run check(svelte-check, 0 errors),npm run unit(16 pass, with new tests ofplainandrecordAtagainst Grain's routes) andnpm run ssr. The shell's SSR test now also mounts the shell signed in against a fake server. Create opens the form over the feed with no level pushed and no entry made. Cancel, then reload: no form and no compose call. A link opening a screen at a form opens it once, and back, forward and reload don't reopen it. An older entry holding compose, reloaded, opens nothing. No history entry holds compose. Sending the action's form opens the new record's screen.node check-apps.mjs,npm run check, the unit tests andnpm run buildinnext/.HUD_WORKSPACE=off,HUD_APPSa copy of thisnext/) and this build ofnext/on :5931, driven signed out in Chromium. Home, Explore, a gallery opened from the feed, then back, forward and reload all draw the right levels. No history state holds compose, no dialog opens, and the console shows no errors. The signed-in Create path can't be signed into locally, so the SSR test covers it, as above.Shortcomings
Review
Start with HUD's
web/shell/src/Shell.svelte(act,formSent,plainPlace) andStack.svelte(newLevel,load,keep).