You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A reload on a file preview opened over Settings reopens Settings #828
A link that names both a file and Settings (?pane=…&file=…&settings=about) can leave Settings open after a reload, where a reload is meant to close it.
The link opens Settings, which pushes its history entry (depth 1 on a desktop).
The pending file then opens: openFile (src/lib/useFileViewer.ts) pushes the preview's entry by spreading the current state, so that entry carries a copy of the Settings marker.
Reload on the preview's entry: lib/settingsHistory.ts steps back by the marker's depth (go(-1)) and lands on the Settings entry under it, not under Settings.
That landing is not the module's own (it does not match the destination it asked for), so App opens Settings from it. The preview can also go: the popstate handler clears it after the pending file was dropped.
Found in review of #825 (by a code read, not yet reproduced in a browser). #825 fixed a different cause of the same symptom: the address read at load, before or after the step back lands.
Expected
A reload with Settings open closes Settings, whatever else the history holds above it, and a file the address names stays open.
Notes
Either the preview's entry should not copy the Settings marker, or the step back should count the entries actually above the app rather than trust the marker's depth. A regression case belongs in scripts/settings-pages-demo-regression.ts or scripts/file-viewer-regression.ts: a file-plus-Settings link, then a reload.
Activity
fix(settings): step over buried Settings history entries; keep a prev…