Skip to content

fix(android): Back goes to the page first, and leaves the app only with nothing open (shell side) - #3763

Merged
devswha merged 1 commit into
mainfrom
fix/phone-back-shell
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/phone-back-shell

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Change

Shell side of the phone Back fix: it changes the Android app, so it reaches users only with a new Play build. The web side is #3761, which reaches phones as soon as the PC updates Ovis. Each is useful alone, and the app needs both to be right everywhere.

No issue: the maintainer reported it ("on a phone, Back does not close what is open, the whole app goes away").

What was wrong

In the Android app every Back left the app, whatever was open. Measured on the app as released in v0.5.3: on Android 17, 29 of 29 surfaces by the Back key, and the 7 tried by the back gesture and in three-button navigation; on Android 15, the 3 tried. The page keeps a history entry for each open sheet, dialog, menu, Settings step and pane, but MainActivity had no Back handling at all (no OnBackPressedCallback, no Capacitor App plugin), so the system's default finished the activity and the page was never asked.

What changes

  • MainActivity keeps an OnBackPressedCallback that is on only while the WebView's history has an entry of the same place behind the page shown: the PC's pages, or the app's own pages before a PC is chosen (PCStore.pageTakesBack, told again on every doUpdateVisitedHistory, which also sees the entries a page adds with pushState). Its Back is webView.goBack(): the page closes what is open or shows the pane before, and the app's demo goes back to the connect screen.
  • With no such entry the callback is off, and Back is the system's: the first page with nothing open, a sign-in in front of the PC, the error page, the cover shown while a PC opens. The app then leaves at once, with Android's own predictive-back animation, and no second press is asked for. A callback that is always on and decides inside would turn that animation off.
  • A page that stepped off its last entry a moment before a Back (the callback not yet told) falls through to the system's Back in the same press.
  • iOS is unchanged: the app has no Back. The edge swipe is the page's (it opens the workspace list), and WKWebView's back-forward swipe stays off.

Kept as it was: Back sends nothing to a pane, closes no pane and no tab, discards no draft and no unanswered prompt. The page decides all of that (see #3761); the shell only chooses between the page and the system.

Built on #3735, now in main: its error page and its cover while a PC opens are both places where Back leaves the app, as that PR wants for a server that is not Ovis.

Validation

Local only: CI has no Android job.

  • bun run check fast in the CI runner image (herdr-ci-runner:local) at 77832ca49 merged with main a72178b70: ok (workflow syntax, generated types and themes, typecheck, build, unit tests: 16415 pass, 0 fail, 57 skip in 915 files).

  • ./gradlew testDebugUnitTest in app/android: 45 tests in 4 suites, 0 failures; PCStoreTest 28, one new (backIsThePagesOnlyOverAnotherPageOfTheSamePlace).

  • ./gradlew assembleDebug: ok. The debug APK was installed on two emulators, with an own AVD each, the demo's fixtures served on loopback through adb reverse, and Back sent as the system gets it (adb shell input keyevent 4, or a swipe in from the left edge). Surfaces were opened by touch over the WebView's DevTools socket.

    Android 17 (API 37, WebView 145), with the web side (fix(phone): Back closes what is open, one surface at a time (web side) #3761)

    Back as Result
    the key, 29 surfaces opened cold 25 closed alone and the app stayed. 3 are states, not surfaces (the composer's / list, the expanded key row, the terminal lens): Back left from them as from the first screen. 1 the matrix could not open (a draft; see the sequence below)
    the swipe, gesture navigation, the same 29 24 closed alone. The agent list inside New workspace closed with the dialog under it: the press the swipe starts with closes the list (web side, a limit named in fix(phone): Back closes what is open, one surface at a time (web side) #3761). The same 3 and 1
    the key, three-button navigation, 7 surfaces 7 closed alone
    first screen, nothing open one Back leaves the app
    a draft typed, keyboard up Back lowers the keyboard, the next leaves, and the draft is there when the app opens again
    the connect screen Back leaves the app

    Predictive back, same device, read from a screenshot taken while the finger was still down in a 6 s swipe: on the first screen the system shrinks the app's window over the launcher, exactly as for the v0.5.3 app; with the drawer or the header's More sheet open the window stays whole, and lifting the finger closes the drawer or the sheet.

    Android 17 with main's web (the shell alone): 6 of 8 surfaces closed alone, those main already gives a history entry. The drawer and New workspace opened from it still leave the app: they have no entry before fix(phone): Back closes what is open, one surface at a time (web side) #3761.

    Android 15 (API 35), whose WebView cannot be driven over DevTools, so through the page's accessibility names: the drawer, the header's More sheet and Settings each closed on Back and the app stayed. The next Back left the app from the sheet's and Settings' screen; after the drawer, the first case after a fresh install, it did nothing once (below).

    The app's own pages, before a PC is chosen (Android 17): from the bundled demo Back went through the demo's own entries, then to the connect screen, and from the connect screen it left the app. The demo is bundled from this checkout, which is without fix(phone): Back closes what is open, one surface at a time (web side) #3761: its drawer has no entry yet and stayed open on the first Back.

    Before (the app as released in v0.5.3, same emulators): 29 of 29 left the app.

  • Not run: a physical phone; iOS (unchanged).

One thing the shell makes visible: right after a first connect, with no pane chosen before, the page adds an entry for the pane it picks (web side, as on main). The first Back on the first screen then goes to that entry and shows no change, and the second leaves. Seen on the Android 15 run, whose first case followed a fresh install. v0.5.3 left at once there, as everywhere.

…th nothing open

In the Android app every Back left the app, whatever was open: the activity
had no Back handling, so the system's default finished it, and the page,
which keeps a history entry for each open sheet, dialog, menu and pane, was
never asked.

MainActivity now keeps an OnBackPressedCallback that is on only while the
WebView's history has an entry of the same place behind the page shown (the
PC's pages, or the app's own before a PC is chosen: PCStore.pageTakesBack,
told again on every doUpdateVisitedHistory). Its Back is goBack(): the page
closes what is open or shows the pane before, and the demo returns to the
connect screen. With no such entry (the first page with nothing open, a
sign-in in front of the PC, the error page) the callback is off and Back is
the system's, so the app leaves at once with Android's own predictive-back
animation and no second press.

iOS is unchanged: the app has no Back, and WKWebView's back-forward swipe
stays off.

Co-authored-by: sisyphus-dev-ai <[email protected]>
@devswha devswha added the bug Something isn't working label Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes

    • Android Back now navigates to the previous in-app page when available, including closing overlays, returning to a previous pane, or returning from the demo to the connect screen.
    • When there’s no matching in-app page to return to, Back follows Android’s system behavior and exits the app.
  • Documentation

    • Updated the Android app guide and changelog to describe the Back-button behavior.

Android Back now navigates within WebView history when the current and preceding pages belong to the same place. Otherwise, system Back remains available. The change also adds tests and updates the Android app documentation and changelog.

Changes: Android Back Navigation

Layer / File(s) Summary
Back scope policy and tests
app/android/app/src/main/java/sh/ovis/app/PCStore.java, app/android/app/src/test/java/sh/ovis/app/PCStoreTest.java
pageTakesBack checks whether both pages belong to the specified place. Tests cover same-PC pages, relay scope, the local demo, and cases where Back is not accepted.
WebView Back handling and documentation
app/android/app/src/main/java/sh/ovis/app/MainActivity.java, changelog.d/android-back-goes-to-the-page.md, docs/native-app.md
MainActivity enables page-level Back when WebView history and pageTakesBack allow it. The documentation and changelog describe the Android Back behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#2924: Sign-in navigation can add WebView history entries across origins, which affects the page-scope check used to enable Back.
  • devswha/ovis#3761: Adds web-side phone Back behavior that uses WebView history entries to close surfaces.

Suggested reviewers: mdobro

Merge Risk: Minimal · up to 77832

Android Back now navigates within same-place WebView history and otherwise leaves the app through the system. No concrete defect was found in the change. Real-device behavior was not tested, which is normal validation uncertainty and not a merge blocker.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Android Back now goes to the page first and leaves the app only when nothing is open. It matches the MainActivity OnBackPressedCallback and PCStore.pageTakesBack chang…
Description check Passed The description follows the template. The Change section explains the problem (Back always left the app), the resulting behavior, and the linked web-side PR #3761. The author states that no issue exis…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Android Back now goes to the page first and leaves the app only when nothing is open. It matches the MainActivity OnBackPressedCallback and PCStore.pageTakesBack changes, and it notes the shell-side scope. It is long but specific.

Full details: Description check

Explanation

The description follows the template. The Change section explains the problem (Back always left the app), the resulting behavior, and the linked web-side PR #3761. The author states that no issue exists and gives the maintainer report instead. The Validation section lists the commands run, their results, the emulator runs, and what was not tested (physical phone, iOS). The description is thorough and mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d40cecb and 77832ca.

Files selected for processing: 5

  • app/android/app/src/main/java/sh/ovis/app/MainActivity.java
  • app/android/app/src/main/java/sh/ovis/app/PCStore.java
  • app/android/app/src/test/java/sh/ovis/app/PCStoreTest.java
  • changelog.d/android-back-goes-to-the-page.md
  • docs/native-app.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Review at 77832ca49 (a code-review agent through the lane's harness): no high or medium findings, three low. How each stands:

  1. syncBack reads only the entry right behind; WebView.goBack() might skip entries a page added with no tap (Chromium's history manipulation rule), and land further back. Measured: it does not. On WebView 145 (Android 17) and WebView 124 (Android 15), Back from an entry the page had pushed with no tap landed on the entry right behind it: the bundled demo's first page, under the entry its pane pick adds, and the PC's first page after a fresh install. Chrome's own Back button does skip such entries; that rule is the browser's button, and the web side (fix(phone): Back closes what is open, one surface at a time (web side) #3761) allows for it there. So the entry syncBack reads is the one goBack() reaches. No change.
  2. No automated test for the callback's on and off, the fallthrough and the new client. The project keeps no instrumentation tests (app/android/app/src holds main and test only), so the rule is a pure function with a JVM test (PCStore.pageTakesBack) and the rest was pressed on two emulators (Validation above). No change.
  3. Two BridgeWebViewClient subclasses each carry the history hook. Left as it is: the second is four lines, for the app's own pages.

CodeRabbit reviewed this head and had no comment.

@devswha
devswha merged commit 9df5f81 into main Nov 12, 2026
13 checks passed
@devswha
devswha deleted the fix/phone-back-shell branch November 12, 2026 14:21
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head 77832ca499b7 as 9df5f819f3d8 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
codex CLEAR

Two reviewers at this head: Claude (Opus) CLEAR, Codex Terra CLEAR. It touches app/ only, so it merges on GitHub's checks. No store build follows this merge: a new Play build is the maintainer's decision.

The Android app's Back left the app from anywhere. The shell now gives Back to the page while the WebView's history has an entry of the same place behind the page shown (PCStore.pageTakesBack), and to the system otherwise; a press that finds the handler stale falls through to the system in the same press. The web side is #3761; each is useful alone. The author ran it on an emulator (Android 17, WebView 145) with the web side; ./gradlew testDebugUnitTest passes 45 tests.

What the Opus reviewer tried and could not break, by reading: Back never returns to a sign-in page, another port on the PC's host, the hosted app's root outside a relay scope or error.html; no loop on a stale handler; every activity restart starts with empty history and the handler off. Back sends nothing to a pane and closes nothing.

Left, none HIGH, all traced and not run, sent to the author's lane:

  • MEDIUM (Codex): on a wide Android screen, Back can leave the app or change panes behind an open dialog (FilesDialog, ConfirmDialog through usePhoneSheetBack), and can step through an embedded page's own history instead of closing its preview. Both belong to the page side.
  • LOW (Claude): the new test covers only the pure predicate, not the wiring that turns the handler on and off; Back steps through every pane the user moved to before it leaves the app, as the PR text says.

Reports: ~/.cache/ovis-tmp/reports/pr-3763-77832ca4-*.report.md.

devswha added a commit that referenced this pull request Nov 13, 2026
…l peek keeps Back after Settings (#3786)

## Change

**Web side**, a follow-up to #3761 (merged at `a91d33ff6`). It reaches
phones when the PC updates Ovis. It takes up what the merge pass's
reviews of #3761 and #3763 left for this lane: each item, and how it
stands, is listed under "Review items" below.

No issue: the items come from the merge pass's review reports and its
comment on #3761.

### What was wrong

Seen in a phone-sized browser (390x844, by touch, Back as one step back
in the tab's history), in #3761's code:

- **A request to join with no history entry let Back through.** A sheet
that opens with no tap since the user's last Back has no entry until the
next tap: Chromium's Back would skip one made then. A device's request
to join shows by itself and answers nothing on Back. Up so, Back went to
the pane before behind the request, and closed a file, Settings or a web
page under it.
- **A terminal peek lost Back after Settings.** Settings opened over a
command's terminal peek takes the peek's entry. Back closed Settings and
left the peek with no entry, so the next Back went to the pane before
with the peek gone. With a page of Settings open, the Back off Settings'
list closed Settings and the peek together. A web page opened over the
peek left it without an entry the same way.
- **No Navigation API** (Chromium before 102; the build targets 87): the
module could tell neither which entry the history was on nor how to go
onto one. A Back that closed a menu over the drawer left the drawer with
no entry, and the next Back closed it and moved the pane. Reproduced on
the unit tests' Chromium-like history.
- **Settings showed again** when a sheet took the entry Back had left
for it: only the file and diff viewers asked whether an entry was being
taken. Seen on a desktop window with Files open as a dialog, Settings
opened over it by its shortcut and closed by Back, then narrowed to a
phone's width: Settings came back over Files, and one Back closed both.
- No test pressed Back on a touch screen of 980px and wider, where the
app is laid out as on a desktop.

### What changes

- **A Back or a Forward that a sheet with no entry refuses moves
nothing.** The sheets are asked from the top down, the one opened last
first, and one that refuses keeps the Back from those under it. The
history then goes again onto the entry the app is on (`traverseTo`). A
way back that another traversal overtakes is taken again when that one
lands.
- **Whoever keeps state by the history's entry stays still for those two
steps.** Settings, the file viewer, the diff viewer and the web panel
ask `sheetStep.holds(event)` and leave their state alone: no file closed
and opened again, no page framed anew. The sheets answer whichever
listener hears the event first.
- **A sheet that stays under a navigation keeps its place, and gets its
entry back.** While the history is on the entry the navigation took, or
above it, the sheet is left as it is. The user's Back below that entry
sends the sheet onto it again, and the sheet takes it back, as Files
takes the entry Back left for a file. Settings and the web panel now ask
`sheetStep.taking(event)`, as the file and diff viewers do, so the entry
is not shown again as theirs.
- **Where the browser has no Navigation API**, the module keeps what it
needs of one in each entry's state (`ovis:place`): a key of the entry's
own and its count in the tab's history. A push writes the place one
above the entry it is made from, a replace keeps the entry's, and going
onto an entry is `history.go` by the difference of two counts.
Everything above then works there as it does by the browser's own keys.
Nothing is written where the browser has the API, or where it keeps
every entry.
- **Tests that press Back there.**
`scripts/phone-back-demo-regression.ts` has a third screen, 1180x820 by
touch: a row's menu, a tab's close confirmation (the tab stays), Files
with a document and then a change opened over it, and a menu over a web
page docked beside the pane.
`scripts/terminal-autoswitch-demo-regression.ts` presses Back with
Settings over a peek. A last section of the first suite runs with the
browser's Navigation API taken away: a menu over the drawer, and Files
after Back closed a file opened from it.

Kept as it was: Back sends nothing to a pane, closes no pane and no tab,
and discards no draft. No entry is added with no tap behind it.

Design source (`src/AGENTS.md`): as in #3761. Android's own rule for a
sheet, a menu and the drawer, and what the Android apps of Paseo and T3
Code do with the system's Back: the surface opened last answers it, and
what is under it stays. The DESIGN.md entry says that what is under a
request to join stays where it is.

### Review items, and how each stands

From the review of #3761 at `b147d6908`:

1. Codex MEDIUM, a refusing sheet with no entry lets Back navigate the
pane behind it: **fixed**.
2. Codex MEDIUM, nested sheets lose Back without the Navigation API:
**fixed**, by the places kept in the entries' states, with a case of two
Backs in a row.
3. Opus LOW, the one-second wait after `sheetStep.goingBack`: **fixed in
#3761** (`1b1885870`). `backUnderCurrentEntry` tells the sheets when its
traversal is refused. A `history.go()` that lands nowhere says nothing,
so the bound stays for the two callers that use it.
4. Opus LOW, no test on touch screens of 980px and wider: **added** (the
third screen).

From the review of #3761 at `a91d33ff6`:

5. Codex MEDIUM, a terminal peek without an entry after Back closes
Settings: **fixed**.
6. Opus LOW, Files taking an entry Back left for Settings or a web page:
**fixed in its effect**, by the second of the two fixes the review
names. Settings and the web panel ask `sheetStep.taking`, so neither
shows again, and Files keeps Back: on the narrowed desktop window above,
Settings now stays closed, Files holds the entry and Back closes Files
alone. Files still takes whatever entry Back left, which costs what a
new entry would: the entries ahead. Going there only for a file's or a
diff's entry would leave Files with no entry until the next tap. The
rotation the review names closes Files beside the pane, in this build
and in #3761's: run on a 1180x820 touch screen turned to 820x1180,
Settings did not show again in either.
7. Opus LOW, the file viewer's X tapped in the ~2 ms its More menu's own
step back takes: **not changed**. The X does nothing then, and a second
tap closes the file. A fix has to count the X's step from where the
menu's step lands, which the Navigation API path and the `history.go`
fallback count differently, and then tell the two landings apart.

From the review of #3763:

8. Codex MEDIUM, Back leaving the app or changing panes behind Files or
a confirmation on a wide Android screen: **fixed by #3761**, which made
every surface take part on any screen worked by touch alone
(`BACK_QUERY`), and covered here by the third screen. Not run in the
Android app at that size.
9. Codex MEDIUM, Back stepping through an embedded page's own history
before it closes the preview: **not changed**; see Limits.
10. Opus LOW, `PCStoreTest` covering only `pageTakesBack`: **not in this
PR**. It is the shell side, for a follow-up there.

From the reviews of this PR at `9e1cf1355`, all about a Chromium with no
Navigation API:

11. CodeRabbit Major (the review thread), a request to join with no
entry letting Back through there: **fixed**, with that case in the unit
tests and run in Chrome with the API taken away.
12. Codex MEDIUM, Settings' Back still closing a terminal peek there:
**fixed**, the same way.
13. Opus LOW, the one step forward landing short after a jump back past
more than one entry: **fixed**. The step forward is gone; the way back
goes by the counts of both entries, as it does by the browser's own
keys.

### Behaviour a reviewer may not expect

- `sheetStep.holds(event)` makes the sheets hear the event at once when
their own listener has not run yet, so the answer is the same whichever
of Settings' and the sheets' listeners was added first. In the app the
sheets' listener is the first.
- A sheet that stays under a navigation is left as it is by every
traversal that lands on the navigation's entry or above it, a step
Settings takes between its own entries included.
- In a Chromium with no Navigation API, every entry's state carries
`ovis:place`, and a `replaceState(null)` there writes a state that holds
only that place. No other browser's entries change.
- The sheets are asked newest first. With several sheets up that hold no
entry, the order they close in on one Back is the reverse of before; all
of them still close unless one refuses.

### Limits, not fixed here

- Back from the first entry leaves the app with a request to join still
up: no popstate comes for the page to refuse. Holding it there needs the
app's shell to ask the page first, which is shell side and a store
build.
- Where the places are the app's own (no Navigation API): a way over
more than one entry counts the steps a framed page took, and can land
short where such a page is open; and an entry the browser makes by
itself (a #fragment) has no place until the next push from it. On such
an entry the app behaves as it did before this PR.
- Read from the code, not run: a browser that keeps every entry and has
no Navigation API (an older Safari or Firefox) is as before this PR.
There every sheet has an entry, so a request to join always refuses on
its own. But with a page of Settings open over a terminal peek, Back
from the page to Settings' list gives the peek an entry above the list,
since nothing tells the app where the peek's old entry lies: the next
Back ends the peek under Settings and seems to do nothing, and a third
closes Settings. The places are not kept there: no such browser was at
hand to run them in.
- A page framed in a preview adds history entries of its own when the
reader moves inside it, and Back steps through them before it reaches
the preview's entry, as in any browser and as on main. The page can
neither see nor drop those entries. The preview's own Close already
skips them (`historyNavigation.ts`). Closing the preview at once on the
system's Back needs the shell to ask the page, and is a choice to make:
in-app browsers step back through the page first.
- With a terminal peek under Files, after Back closes a file opened from
Files, the next Back closes Files and the peek together, as in #3761.
Files is in front again with no tap behind it, the peek has taken its
entry back, and Files has none of its own until the next tap, so both
are asked. Found while checking the peek; it needs the sheets that wait
for a tap to count as a stack, which is more than this PR should change.
- On a tablet-sized touch screen, a web page docked beside the pane
holds no history entry, as on a desktop and as before #3761. With only
that page open, Back goes to the pane before or leaves the app. A file
docked there holds one. Found while writing the third screen. Left for a
follow-up: it changes what the panel's history rows in
`file-viewer-regression` expect.
- The other limits named in #3761 stand: a scroll's end read as a tap
within five seconds of one, iOS Safari not run, the lists that close on
a press outside and the Back swipe, the two dead presses.

## Validation

On the VM pool (the merge gate's runner image, through `vm-check`):

- At `2442e0b08`, the branch as pushed: integration, 1432 pass and 0
fail; every browser script, 209 of 209 (one on its second run); and the
static steps of `bun run check fast` (release guards, workflow syntax,
generated types and themes, typecheck, build).
- Its unit tests did not get a result there. In two runs the first unit
shard came back with no output, on two different VMs, so the pool could
not count the files and marked the group failed. The other shards ran:
8875 pass, and the one failure is the pool's known kernel-only test in
`server/copilot.test.ts`.
- At the branch merged with main `3ade453cb` (a local merge, not
pushed), which is the tree GitHub's checks run: `bun run check fast`
passes with every unit shard, 16825 pass, and the two failures are the
pool's known kernel-only tests (`server/copilot.test.ts`,
`server/session-history.test.ts`; neither is touched here). The nine
suites nearest the change pass on their first run:
`phone-back-demo-regression`, `terminal-autoswitch-demo-regression`,
`file-viewer-regression`, `file-viewer-mobile-regression`,
`deep-link-demo-regression`, `palette-local-page-demo-regression`,
`settings-pages-demo-regression`,
`key-bar-customization-demo-regression`, `phone-inbox-demo-regression`.
- At `9e1cf1355`, before the last two commits, every browser suite had
passed in the lane's local queue (209 of 209, first run) with `bun run
check fast` (16699 pass, 0 fail).

Unit cases. Each new one fails with the change it covers taken out (run
once each way):

- `src/lib/sheetHistory.skips.test.ts` (26): a refused Back and Forward
with no entry, a listener that asks before the sheets' own, the refusal
keeping Back from the sheet under it, a second Back overtaking the way
back, and a staying sheet under one and under two entries of a
navigation. Seven more with no Navigation API, on the places kept in the
entries' states: a menu over the drawer, a refusing sheet, a jump back
past more than one entry, a request with no entry (Back and Forward), a
staying sheet under two entries of a navigation, a way that another
traversal overtakes, and an entry the browser made by itself.
- `src/lib/settingsHistory.test.ts` (40) and
`src/lib/useFilePanels.reopen.hook.test.ts` (13): Settings, a file, a
diff and a web page through the two held steps, and Settings and a web
page on an entry a sheet takes.

In a real browser (headless Chrome through Playwright, the demo build,
Back as one step back in the tab's history), #3761's code against this
branch. The scripts are scratch and not in the repository:

- **The request to join.** The app's real prompt, mounted in a scratch
build on a test event, shown with no tap since the user's Back: over a
pane at 390x844 and 1180x820, and over a file, Settings and a web page
at 390x844. In #3761's code Back moved to the pane before behind it, and
closed the file, Settings and the page under it. Here the pane stays for
Back and for Forward, and the file, Settings and the page stay as the
same DOM nodes. After a tap the request holds an entry and refuses on
it; after Deny, Back is the app's again. On the first screen Back leaves
the app in both.
- **A terminal peek.** Settings over it from its list and from a page of
Settings, and a web page over it: the results under "What was wrong" in
#3761's code, and one thing per Back here.
- **With the Navigation API taken away** (deleted from the window before
the app loads, which puts the app where a Chromium before 102 puts it):
the request to join and the peek, the same scenes, with the same results
as with the API.
- **Files on a narrowed desktop window**, after Back closed Settings:
the result under "What was wrong" in #3761's code. Here Settings stays
closed and Back closes Files alone.
- **The suites against builds without the change.**
`phone-back-demo-regression` fails at the first tablet case against a
scratch build that keeps touch screens of 980px and wider out of Back,
and at the Files case of its section with no Navigation API against
`9e1cf1355` with that section added (on the pool: twice, at the wait for
Files' entry). `terminal-autoswitch-demo-regression` fails at "Back
closes Settings and leaves the peek" against #3761's build.

GitHub's run at `9e1cf1355`: 12 checks passed; "Native macOS session
identity" was cancelled after 15 minutes with no runner assigned, and
never ran.

Not run: an Android device or emulator, a Chromium that really is older
than 102, a browser that keeps every entry and has no Navigation API,
iOS. The shell is unchanged. The way back is the `traverseTo` that
#3761's emulator runs exercised in Android Chrome for a menu over the
drawer.

---------

Co-authored-by: sisyphus-dev-ai <[email protected]>
devswha added a commit that referenced this pull request Nov 13, 2026
## Summary

Android 1.0 (7) went public in production on 2026-11-13. Two merged
fixes reach phones only with a new store build: #3735 (the connect
screen says why a connect fails within 20 s) and #3763 (Back goes to the
page first, and leaves the app only with nothing open). This raises the
build for that first update:

- `app/android/app/build.gradle`: `versionCode` 7 -> 8, `versionName`
1.0 -> 1.0.1 (`app/store/android.md`: raise `versionName` for each
public release).
- `app/store/android.md`: the version rows say 8 / 1.0.1 and name the
last upload.

iOS is untouched (1.0 build 8 is in App Review). Nothing here builds or
uploads.

## Validation

- `bun run check fast` on the VM pool (vm-check fast, commit d1dc72e
on main 0522c7f): release guards, workflow syntax, generated types and
themes, typecheck, build: ok; unit shard 1/2 ok; unit shard 2/2 failed
only on the known VM-only red `server/copilot.test.ts` "keeps a logged
binding when only the log's timestamps change" (VM kernel's coarse file
clock, listed in known-red).
- No test reads `versionCode` or `versionName` (`git grep` over test
files).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant