Skip to content

ios: keep web dashboards updating after the page reloads - #290

Open
ehoeve786 wants to merge 1 commit into
softwiredtech:mainfrom
ehoeve786:fix/ios-webdash-stream-reload
Open

ehoeve786 wants to merge 1 commit into
softwiredtech:mainfrom
ehoeve786:fix/ios-webdash-stream-reload

Conversation

@ehoeve786

Copy link
Copy Markdown
Collaborator

WebDashView's coordinator cancelled its receive task and iterated the same AsyncStream again on every didFinish. AsyncStream has a single consumer and cancelling the iterating task terminates it, so after any reload (WKWebView content-process recovery, a dash app calling location.reload()) the new loop ended at once and the dashboard stopped getting car state. Start the receive task once and keep it across navigations; it always targets the current page. Not compiled here (no Xcode on this machine).

Testing

  • Not built or run on iOS yet.

🤖 Generated with Claude Code

WebDashView's coordinator cancelled its receive task and iterated the same
AsyncStream again on every didFinish. AsyncStream has a single consumer and
cancelling the iterating task terminates it, so after any reload (WKWebView
content-process recovery, a dash app calling location.reload()) the new loop
ended at once and the dashboard stopped getting car state. Start the
receive task once and keep it across navigations; it always targets the
current page. Not compiled here (no Xcode on this machine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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