Skip to content

Add subprotocol check to the client#333

Open
ilyatitovich wants to merge 6 commits intohplush:mainfrom
ilyatitovich:core/check-subprotocol
Open

Add subprotocol check to the client#333
ilyatitovich wants to merge 6 commits intohplush:mainfrom
ilyatitovich:core/check-subprotocol

Conversation

@ilyatitovich
Copy link
Contributor

Fixes #245

  • Added isClientUpdateRequired atom store to trigger Update Client page when the client uses an unsupported subprotocol (below server minSubprotocol);
  • Added handling of unsupported subprotocols for both HTTP requests and Logux WebSocket errors;
  • Added router logic to redirect users to /update-client when a client update is required;
  • Added a simple Update Client page with temp test data;
  • Added tests.

Motivation

This change introduces a unified mechanism for detecting unsupported client versions across HTTP and Logux, and redirects users to an update page.

@github-actions github-actions bot temporarily deployed to preview-333 January 28, 2026 15:07 Destroyed
@ai
Copy link
Contributor

ai commented Jan 28, 2026

Pretty solid PR (expect page design, to be honest). All changes are coming from things missed in the task. Good work 👍

@github-actions github-actions bot temporarily deployed to preview-333 January 29, 2026 08:46 Destroyed
@github-actions github-actions bot temporarily deployed to preview-333 January 29, 2026 11:07 Destroyed
@ilyatitovich
Copy link
Contributor Author

  • Removed custom headers. Now outdated client detection uses response body;
  • Redesign Update Client page.
Screenshot from 2026-01-29 12-24-25

I'm a bit confused about router. Now with:

if (outdatedClient) {
   nextRoute = redirect(open('updateClient'))
}

we redirect user to Update Client page. Should we keep this behavior or just use nextRoute = open('updateClient')?

In main.svelte we pass $currentPage into component, so I assume that udpateClient must be set in core router.

@ilyatitovich
Copy link
Contributor Author

  • Removed handleOutdatedClient helper;
  • Removed isOutdatedClient from the core router: the Update Client page is now handled by the web router.

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.

Add subprotocol check to the client

2 participants