Skip to content

fix: Empty screen for signed user#154

Open
HornedHeck wants to merge 2 commits intostoatchat:mainfrom
HornedHeck:main
Open

fix: Empty screen for signed user#154
HornedHeck wants to merge 2 commits intostoatchat:mainfrom
HornedHeck:main

Conversation

@HornedHeck
Copy link
Copy Markdown

BUG
When I try to open stoat-for-web for self-hosted instance for already signed in user, I see empty screen.

REASON
Client.ts tries to connect to WebSocket by the url specified in the configuration. However it does not await for results of configuration sync in constructor. It leads to the fact that configuration.ws is empty and is not value WebSocket url.

STEPS:

  1. Sign in to stoat
  2. Close the tab
  3. Open stoat in new tab (not in private window)

EXPECTED
Signed-in experience is visible and accessible.

Ensure configuration fetch is finished before trying to use it.

Signed-off-by: HornedHeck <43969792+HornedHeck@users.noreply.github.com>
Comment thread src/Client.ts Outdated
Signed-off-by: HornedHeck <43969792+HornedHeck@users.noreply.github.com>
Comment thread src/Client.ts
* Connect to Revolt
*/
connect(): void {
void this.#connect().catch((error) => this.emit("error", error));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the void operator here looks optional too

Suggested change
void this.#connect().catch((error) => this.emit("error", error));
this.#connect().catch((error) => this.emit("error", error));

@Taureon
Copy link
Copy Markdown

Taureon commented Apr 30, 2026

ACK 👍

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.

2 participants