clockworklabs / clockworklabs/SpacetimeDB

Add parameter to disconnect reducer or ReducerContext to indicate type of connection

Open
#579 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

possibly-stale
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Right now there isn't an easy way to tell if disconnect reducer gets called because a WebSocket client disconnects (which may require some sign-out logic), or if it's caused by an HTTP request (which, obviously, doesn't need to go through the same logic). Having a way to differentiate between the two would allow us to handle those cases differently. ReducerContext seems like a good place for it and would also allow similar treatment inside "regular" reducers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the disconnect reducer and ReducerContext entry points to determine where the connection source is available. Define how the WebSocket-versus-HTTP distinction should be exposed to disconnect and regular reducers, then verify that both paths receive the correct connection type.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.