Repository navigation
fix(web): keep no page history in the app on an iPhone's Home Screen - #493
Merged
Merged
Conversation
iOS's swipes from the screen's edges went back and forward in the app on the Home Screen and in Chrome even though fctl#492 cancelled the touches that start there: WebKit lets a page stop them only by leaving no page to go back or forward to. In the app on an iPhone's or iPad's Home Screen, which has no back button, each page now takes the place of the last in the browser's history, the router's and the loads after signing in or out alike, so the swipes have nowhere to go and the left edge drags the sidebar in. Browsers' tabs, and the app on Android, keep their history. The edge-touch handling of fctl#492, and its overscroll rule for Chrome, go.
This comment has been minimized.
This comment has been minimized.
Signing in or linking with Google, going to Linear and installing the GitHub App loaded their pages after the app's, leaving it in the history for iOS's edge swipe to go back to. On an iPhone's or iPad's Home Screen, links that load a page in the same window, and the app's own page loads, now replace the page they leave.
This comment has been minimized.
This comment has been minimized.
…state On an iPhone's or iPad's Home Screen, a link to a place on the same page (#enrollment-tokens) loaded the page in place of itself, losing the router's index and key. It now replaces the entry with its own state and scrolls to the place, as the browser's jump would, without adding to the history.
This comment has been minimized.
This comment has been minimized.
A link to #100% or #%E0%A4%A made decodeURIComponent throw after the URL had changed. The place is now looked up by its name as written, then as decoded where it decodes, as browsers do, and a malformed name scrolls nowhere.
kalaspuff
approved these changes
Nov 9, 2026
Contributor
Author
|
Merged, but not deployed yet: in main's CI run, every check passed and Deploy app.fctl.sh failed in 0 s without a runner or a log, before any step ran. That looks like a GitHub Actions hiccup, not this change. Re-running that run's failed job deploys it (the session's token isn't allowed to), and so does the next push to main. It's in no release yet (after v0.32.2). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After #492, swipes from the screen's edges still went back and forward on an iPhone, in the app on the Home Screen and in Chrome: cancelling the touches that start at the edges doesn't stop them. WebKit starts that swipe whenever there is a page to go back or forward to, whatever the page does with the touch. So in the app on an iPhone's or iPad's Home Screen, which has no back button, each page now takes the place of the last in the browser's history instead of adding to it: the router's navigations, the app's own page loads (signing in or out, going to Linear) and links that load a page in the same window (signing in with Google, installing the GitHub App) alike. The swipes then have nowhere to go, and a finger at the left edge drags the sidebar in. Safari's and Chrome's tabs, the app on Android and a Mac's app in the Dock keep their history. #492's edge-touch handling and its
overscroll-behavior-xrule go, since they didn't stop the swipe.Unit tests cover when the app keeps no history, the router's history replacing rather than pushing there, the page loads and the links. With the Home Screen app stood in, in Playwright's Chromium and WebKit, opening pages through the sidebar left
history.lengthas it was, with each page at its top, while in a tab each page added an entry; a plain link's full page load did the same in WebKit.cargo xtask check webpasses. The getting-started guide now says the app on an iPhone's Home Screen doesn't go back on a swipe.The design docs describe it in hyperstructure/design:
Worth confirming
ViewGestureController::canSwipeInDirection). Worth trying on your iPhone once it is deployed; close the app in the app switcher first, as the history it has now stays until it opens afresh.overscroll-behavior-x: nonegone, Chrome's own swipe from the edge on Android goes back again in tabs, as tabs keep their swipes.fctl session
Note
Low risk. It changes how links and page loads behave only in the app on an iPhone's or iPad's Home Screen, and leaves browsers and Android alone.
What it does. In the app on an iPhone's or iPad's Home Screen, each page now takes the place of the last in the browser's history, so iOS's edge swipes have nowhere to go and the sidebar drawer can be dragged in from the left edge. The router's
pushbecomesreplace, full page loads go throughgoTo(location.replace), and a document-level click handler inlinksInPlaceloads plain links in place, including links to a place on the same page, which keep the router's state. The touch-cancelling edge-swipe code from #492 is removed.Edge-swipe code removed.
edge-swipes.tsand its tests are deleted, since cancelling touches didn't stop iOS's swipe; the behavior now depends on iOS not starting a swipe when there is no history, which the description asks to confirm on a device.fctl review's first look at
79c48d8· 20 files, +302 −781 · Review agent settings