Rebuild the landing page fresh every time Home is pressed
Browse filesLANDING_URL was computed once at app startup, and Home just kept
reloading that same startup-time snapshot — so the "Recent Sessions"
list never showed anything recorded during the current run until the
whole app was restarted. go_home() now calls _write_landing_page()
again right before navigating; it writes to the same fixed path and
returns the same URL each time; so this is a pure data-freshness fix,
nothing else needed to change.
- browser_session.py +8 -1
browser_session.py
CHANGED
|
@@ -1868,7 +1868,14 @@ class Api:
|
|
| 1868 |
# mechanism the report page's own navigation already relies on.
|
| 1869 |
print("[browser_session] go_home() called from JS")
|
| 1870 |
try:
|
| 1871 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1872 |
except Exception as e:
|
| 1873 |
print(f"[browser_session] go_home failed: {e}")
|
| 1874 |
return True
|
|
|
|
| 1868 |
# mechanism the report page's own navigation already relies on.
|
| 1869 |
print("[browser_session] go_home() called from JS")
|
| 1870 |
try:
|
| 1871 |
+
# _write_landing_page() writes to the same fixed path every
|
| 1872 |
+
# time and returns the same URL — but LANDING_URL itself was
|
| 1873 |
+
# only ever computed once, at app startup, so the "Recent
|
| 1874 |
+
# Sessions" list it baked in went stale after the first session
|
| 1875 |
+
# of the run. Rebuild it fresh right before navigating so Home
|
| 1876 |
+
# always reflects whatever sessions exist right now.
|
| 1877 |
+
fresh_url = _write_landing_page()
|
| 1878 |
+
self.window.load_url(fresh_url)
|
| 1879 |
except Exception as e:
|
| 1880 |
print(f"[browser_session] go_home failed: {e}")
|
| 1881 |
return True
|