Skip to content

fix: drop dashboard page path from server URL (Froyo widget) - #45

Merged
rayvader merged 5 commits into
mainfrom
fix/widget-base-url-path
Nov 5, 2026
Merged

rayvader merged 5 commits into
mainfrom
fix/widget-base-url-path

Conversation

@rayvader

@rayvader rayvader commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

The "Froyo · Upcoming" widget stayed on "7 open · as of 05:48". The phone's saved server URL was a copied dashboard link, https://<tailnet-host>/chat/android-travel-planner-app. The app joins every API path onto that, so the widget called /chat/android-travel-planner-app/api/members/froyo-personal-butler/thread. The gateway answers that path with the dashboard page HTML (or 403 Token required), never JSON. Gateway security events show these calls every ~30 min since 21:03 UTC on 4 Nov. Froyo's data and its v4 page are fine; the widget never reached /api.

Changes

  • UrlTools.normalizeServerUrl cuts the path before the first dashboard page segment (chat, settings, members, api, ...). A real sub-path such as /base is kept.
  • UrlTools.serverBase + ProfileCodec.decode: a profile saved with a page path heals on read. Same profile id, so the widget's cached thread and the WebView login stay.

Tests

  • UrlToolsTest.normalize_dropsDashboardPagePath, UrlToolsTest.serverBase_healsSavedUrls
  • CodecsTest.profiles_savedPagePathHealsOnRead (checks the thread URL is https://host/api/...)
  • Existing /base round-trip test still passes.

Added on this branch (merged with current main, keeps #44)

  • Merged main (with fix: Froyo widget says why a read failed, reads open_items_live #44: failure reasons, open_items_live) into this branch; no conflicts.
  • Any text/html answer to a widget read is as of HH:mm · format, never sign-in, and does not retry the thread. That is what a server address with a page path gets.
  • UpcomingTest: HTML 200 and HTML 403 -> format; JSON 401 -> sign-in; JSON 403 -> server; a dashboard page with no data island holds no list.

Evidence from the gateway's audit log: since 00:48 UTC 4 Nov the phone calls /chat/<slug>/api/...: /api/members/froyo-personal-butler/thread and /api/auth/refresh get 403 Token required; /api/health and /api/notifications get the SPA page shell.

The header now shows the reason next to 'as of HH:mm' (sign-in, network,
timeout, server, format), and logs it under the FroyoWidget tag. Reads
prefer Froyo's open_items_live (kept current by its sync job) and fall
back to open_items. A 400/404/409 asks for Froyo's thread again once,
and the dashboard read waits up to 45 s.
A server saved from a copied dashboard link kept the page in its path
(https://host/chat/<slug>). Every API call was joined onto it, so the
Froyo widget asked /chat/<slug>/api/members/.../thread and got the page's
HTML catch-all or 403 instead of JSON. The widget stayed on "as of HH:mm".

normalizeServerUrl now cuts the path before the first dashboard page
segment (chat, settings, members, api, ...), keeping a real sub-path
like /base. Saved profiles heal on read through ProfileCodec.decode, so
no one has to re-enter the server.
fix: Froyo widget says why a read failed, reads open_items_live
A server address that kept a page path gets the dashboard page's HTML
(or its 403) instead of JSON. The widget now shows 'as of HH:mm · format'
for any text/html answer, and does not retry the thread for it.
@rayvader
rayvader enabled auto-merge November 5, 2026 10:00
@rayvader
rayvader merged commit 93694ae into main Nov 5, 2026
6 checks passed
@rayvader
rayvader deleted the fix/widget-base-url-path branch November 5, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant