Skip to content

fix sse#3313

Merged
ca333 merged 2 commits intodevfrom
fix_sse
Oct 30, 2025
Merged

fix sse#3313
ca333 merged 2 commits intodevfrom
fix_sse

Conversation

@ca333
Copy link
Copy Markdown
Contributor

@ca333 ca333 commented Oct 30, 2025

  • tie SSE into authentication state / lifecycle

@ca333 ca333 merged commit 88bbb11 into dev Oct 30, 2025
1 of 11 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 30, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_sse

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

https://github.com/KomodoPlatform/komodo-wallet/blob/9fe2e6672ede060ba09688d992d8158a7342ea6d/lib/bloc/auth_bloc/auth_bloc.dart#L144-L151
P1 Badge Treat SSE connect failures as login errors

After a successful _kdfSdk.auth.signIn() the new code calls _kdfSdk.streaming.connectIfNeeded() inside the same try block. If the SSE connection attempt throws (e.g. streaming endpoint down) the catch block will emit an auth error and cancel subscriptions even though the user is already authenticated. This leaves the SDK signed in while the UI believes login failed, forcing a relaunch or manual cleanup. Consider wrapping the streaming connect in its own try/catch (or ignoring failures) so that transient SSE issues don’t invalidate a completed sign‑in.


https://github.com/KomodoPlatform/komodo-wallet/blob/9fe2e6672ede060ba09688d992d8158a7342ea6d/lib/bloc/auth_bloc/auth_bloc.dart#L100-L106
P1 Badge Unhandled SSE disconnect can block logout completion

The logout handler now calls _kdfSdk.streaming.disconnect() in the finally block without guarding against exceptions. If disconnect throws synchronously (for example when the stream is already closed or the SDK tears down unexpectedly), the subsequent await _authChangesSubscription?.cancel() and emit(AuthBlocState.initial()) will never run, leaving the bloc stuck in the loading state despite the earlier effort to swallow sign‑out errors. Wrap the disconnect call in its own try/catch (and optionally await it) so that failure to close SSE does not prevent clearing the auth state.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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