Restore directory navigation on Android back

This commit is contained in:
iris committed 2026-09-11 00:28:55 -04:00
1 parent 59965d314f
commit 22f263ccce
2 files changed
+45 -25

No files matched your search

+7 -6
View File
@@ -208,17 +208,18 @@ absence the signal. Back with unsaved changes asks, and says the edits will
be lost. The explorer draws over the session, which deliberately has no
`imePadding`, so the explorer's own box adds it.
### 10. The explorer draws over the session, and back closes it first
### 10. The explorer draws over the session, and the two back controls differ
`Screen.Session` in `AppRoot` gains a `files: FilesTarget?`. When set, the
`FilesScreen` is composed **on top of** the session in the same `Box`, and
the session stays composed under it: its event stream keeps flowing, its
scroll position and draft stay where they were, and returning from a file
costs nothing. Back — the button and the platform gesture — returns from an
open file to its containing directory, then clears `files` and returns to the
session. Directory navigation stays in the listing: `..` is an explicit row
rather than a hidden second meaning for Back. An editor with unsaved changes
asks before returning to the directory. "Back returns; it does not exit."
costs nothing. The header's back button clears `files` and returns directly to
the session. Android back returns from an open file to its containing directory,
then walks to the parent directory until the root; at the root it returns to the
session. The `..` row remains as the visible, tappable form of the same directory
movement. An editor with unsaved changes asks before either route discards them.
"Back returns; it does not exit."
Rejected: a `Screen.Files` beside `Screen.Session`. Every route back from a
leaf screen goes to Main today, and a session disposed and re-created on each