next: a tab takes one click to its root, and back steps up where it should
MergedThis pull syncs vendor/hud to HUD 21ca387. A tab choice now goes to that tab's root and drops the screens over it. A link to your own profile chooses the Profile tab. A screen opened over itself isn't pushed again. The back arrow replaces the history entry. Signed out, forms get no tools. I read the whole diff and checked that the new calls match the surrounding code: same and tabPath are imported where the diff uses them, and ontab, rooted and choose fit together. I found nothing that needs changing.
Two small things, neither blocking:
screenAtin server.ts comparestabPathagainsturl.pathnameonly.tabAtin the shell compares againstpathname + search. This only differs for a tab whose path carries a query, so I'd expect no effect for the current tabs.- The signed-in paths are covered only by the SSR test with a fake server, as the body says.
Thanks. On the first point: in screenAt the URL can carry a query a link added (?utm_source=), so it compares paths, as its first tab check does for a tab with no query. In the browser, tabAt sees only URLs the app made itself, so the whole path is exact. No current tab has a query. Leaving both as they are.
- next: a tab takes one click to its root, and back steps up where it should
- main
What changes
A tab takes one click. Choosing Home, Explore, Notifications or Profile in the sidebar, rail or bar now shows that tab's root, as its link says, and lets go of the screens left over it. Before, the shell kept each tab's stack as it was left. So on your profile, clicking Home showed Home's stack, which still had a profile pushed over the feed, and only a second click reached the feed.
Your own profile is the Profile tab. A link to your own profile, or its URL (
/profile/<your handle>, loaded or visited), opens the Profile tab at its root. Before, it was a copy pushed over Home with a back arrow. On the server,screenAtchecks again once the answer names the signed-in account.Back and opening, tuned.
Signed out, no forms. The stack gives forms no tools signed out, so Comment shows as its count instead of opening a form that can't send.
This is vendor/hud at HUD 21ca387 (app/shell).
Why
Reported on next.grain.social: clicking around, you had to click twice. In the recording, on your profile, Home highlighted on the first click but still showed the profile with a back arrow. That was Home's own stack, holding a profile pushed when
/profile/<handle>was loaded, since that route opens under the first tab. The page changed only on the second click. Web navigation is expected to go where its link says, so tabs now go to their roots.How it was checked
npm run unit(16 pass), and the renderer and shell SSR tests. The shell SSR test adds three checks. Signed in, choosing Explore then Home from a pushed screen lands on Home's root in one click, at/. A link to your own profile chooses the Profile tab at its root (/profile/me.test).screenAtdraws/profile/<own handle>as the Profile tab's root, and another account's profile over Home.HUD_APPSa copy of thisnext/, andnext/on vite with the shell synced in. Driven signed out in Chromium at 1440 and 390 wide. I loaded/profile/manton.org, chose Explore and then Home (one click, at/), and opened a gallery, author, followers, follower, camera, all cameras, location and its map, and search results with their People tab. I used the back arrow, browser back and forward, reloads, and deep links (/profile/…/gallery/…,/camera/…), with no console errors. A search from Home now goes back to Explore's root, then to Home.node check-apps.mjs, svelte-check andnpm run buildinnext/.Shortcomings