Repository navigation
fix: drop dashboard page path from server URL (Froyo widget) - #45
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.normalizeServerUrlcuts the path before the first dashboard page segment (chat,settings,members,api, ...). A real sub-path such as/baseis 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_healsSavedUrlsCodecsTest.profiles_savedPagePathHealsOnRead(checks the thread URL ishttps://host/api/...)/baseround-trip test still passes.Added on this branch (merged with current main, keeps #44)
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.text/htmlanswer to a widget read isas of HH:mm · format, neversign-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/threadand/api/auth/refreshget 403Token required;/api/healthand/api/notificationsget the SPA page shell.