Pad/internal/browser
Greg Pomerantz efba13d4df Restore the browser directory in the background; drop the startup probe
The relaunch restore checked the saved browser directory with
os.ReadDir on the UI thread before the first frame (bounded to 2 s in
the previous commit). The check was unnecessary: Run dispatches a
background index load of Browser.CurrentPath immediately, and that load
IS the readability probe. So:

- main.go no longer does any pre-first-frame directory read;
  BeginBrowserRestore is called unconditionally for browser sessions.
- BrowserManager gains a one-shot initial-load fallback
  (SetLoadFallback): when the startup load fails (dir deleted by a sync,
  or unreadable by the app — /storage/emulated is 0750 media_rw), the
  manager reverts to the armed fallback (the startup directory) and
  loads it, instead of resetting to a blank browser. Any successful
  index disarms it, so later failures keep the History-recovery path.
- Logic stores its start path and arms the fallback from
  BeginBrowserRestore.

Verified on device with seeded sessions pointing at a deleted dir and
at unreadable /storage/emulated: both fall back to the startup dir in
~20 ms, first frame renders, list populated. New manager test
TestHandleResult_InitialLoadFailureFallsBack.
2026-10-08 22:59:51 -04:00
..
browser_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
browser.go Browser: keep the file list live (re-read on change, re-sort, no idle frames) 2026-09-02 18:23:16 -04:00
handlers.go chore: remove per-event debug logging from the normal path 2026-08-16 20:58:49 -04:00
index_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
index.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
layout_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
layout.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
lazy_loading_test.go Browser: keep the file list live (re-read on change, re-sort, no idle frames) 2026-09-02 18:23:16 -04:00
manager_test.go Restore the browser directory in the background; drop the startup probe 2026-10-08 22:59:51 -04:00
manager.go Restore the browser directory in the background; drop the startup probe 2026-10-08 22:59:51 -04:00
navigation_test.go Integrate real filesystem with interface abstraction 2026-06-04 16:19:38 -04:00
pixel_scroll_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
scroll_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
search_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
search.go Fix bugs in e2e tests and remove list item selection highlight 2026-06-02 13:30:09 -04:00
sort_test.go Add e2e test harness for testing editor logic without Gio display 2026-05-31 08:56:30 -04:00
sort.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
types_test.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00
types.go gofmt: format all remaining files with the go1.27 toolchain 2026-08-23 10:03:27 -04:00