next: swipe back reaches Your story; with none, New story alone on iOS
MergedThis makes Your story open as the first normal page once you have stories. It does that by adding "unless": "unviewedCount" to the strip's open query, so HUD drops compose when that count is non-empty. With none, iOS draws the New story form alone through OpenedForm, and Cancel or Share closes the stories. The view change is one line, and the StoryPager logic reads correctly. Nothing is drawn until the page answers fresh. After a send, onReload closes the stories rather than re-reading the page. With stories, composes is false and the pager runs as before.
I only had the diff to go on, so I didn't run the tests. The HUD ab46d11 bump has no Rust-side changes in this diff, so I couldn't read the unless implementation here. Your note that hud-next must run ab46d11 or later before this lands is the real deploy risk. Make sure that goes out first.
The change since my approval is small. While the New story form waits for a fresh answer, StoryPage now draws Color.clear instead of nothing, so the view exists and the page loads. That fits the earlier logic, and the cached tree is still never shown. My earlier approval stands. I only read this diff and ran nothing. The deploy ordering note still applies: hud-next must run HUD ab46d11 or later before this lands.
Thanks. Two things on your notes.
unless: "unviewedCount" isn't a count. In the Your story row, unviewedCount is {"$root": "joins.mine.stories"}. That's the stories list from getStories(actor: me), and grain-serve's stories_sql returns every story from the last day, whether or not it's been viewed. getAuthors' real unviewedCount drops to 0 once you watch your own stories, but this field doesn't. So Your story keeps opening your stories after you've watched them. Checked locally with a release HUD ab46d11, a harness PDS and grain-serve:
- Web: alice watched her own story to the end, which recorded her
story_viewon it. Back on Home, Your story still opened her story, not New story. - iOS (sim, signed in as alice.test): the same after watching.
Also checked on iOS:
- With none: New story opens alone. A photo picked from the Library, then Share, posts it and returns to Home. The strip shows Your story ringed, with no pager and no empty page left behind.
- With stories: Your story opens alice's. From Bob's, swiping back reaches alice's own.
The earlier iOS "opened nothing" was another test run driving the same simulator, not an app bug.
Deploy order: agreed. hud-next must run HUD ab46d11 or later before this lands, or the view's unless is refused as an unknown key.
The only change since my approval is a merge of feature/hud. It conflicted in vendor/hud/COMMIT, and the merge resolved that to 001122e. The pull's own diff is otherwise the same as before: the unless on the strip's open query, and the StoryPager form-alone path. I read it and ran nothing.
I couldn't confirm that 001122e contains HUD ab46d11, which the unless key needs. The body still names ab46d11. Please check that the vendored HUD has unless, and that hud-next runs a HUD at least that new before this lands.
5 passed, 2 skipped
- next: swipe back reaches Your story; with none, New story alone on iOS
- main
What changes
Swiping back reaches your own stories. Once you have stories, Your story in the strip opens them as a normal page: the first one, before everyone else's. Swiping back from the first other person's story now lands on yours, as in Instagram and grain-ios. With none, it still opens straight at New story. The strip's Your story open is
"compose": true, "unless": "unviewedCount", where that row'sunviewedCountis your own stories. HUD's newunlesson anopenquery dropscomposewhen that path holds something. The Listpagesrule, "an item that opens at a form is a page only of its own pager", now applies only when you really have none.iOS: Your story with none is New story alone. If the story you tapped opens at its form, the app's
StoryPagerdraws no stories, only that form, over the current tab. It uses HUDKit's newOpenedForm, the iOS counterpart of the web's Treeform. Nothing is drawn until the page answers fresh, so a cached last tree never shows. Cancel returns you to the tab. Share posts the story, closes the form and refreshes the tab, so the strip updates. No empty "No stories right now" page is left behind. With stories, the pager works as before.vendor/hud is HUD
ab46d11.Why
feature/hud's previous Your story change (HUD dfee59e) left two gaps:
compose, so the pages rule left your own stories out of everyone else's pager. You could no longer swipe back to them.Deciding this in the view, from data the strip already joins (
joins.mine.stories), keeps every client's List rule the same. Web, HUDKit and Android all follow it without client changes. The other option, telling each client whether a page "really" opens at a form, would need the answer before the tap.How it was checked
just covat 100% lines and functions, clippy, fmt,just lint,just ios-test(including the newaScreenOpensAtTheFormMarkedOpen),just android-test(including the newwithStoriesYourStoryIsTheFirstPage), and webnpm run check,ssrandunit.node next/check-apps.mjsandnpm run check.ab46d11,hud_core::operator::loadloads both next.grain.social's live apps and this branch'snext/.Shortcomings
ab46d11or later before this lands. An older HUD refuses the view'sunless("unknown key"), and the deploy would roll back.