Skip to content

Commit 8541b38

Browse files
ImriKochWixclaude
andcommitted
chore(actors): trim over-explanatory comments in the actors module
No logic change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b501f2e commit 8541b38

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

src/modules/actors.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import type {
77

88
interface ActorsConfig {
99
appId: string;
10-
/** Current user access token, if authenticated. Rides the WS query (same
11-
* pattern as the entities socket) so the platform proxy can authenticate the
12-
* connection like a backend-function call; anonymous connects omit it. */
10+
/** Current user access token, if authenticated. Rides the WS query so the
11+
* platform proxy can authenticate the connection; anonymous connects omit it. */
1312
getAuthToken(): string | null | undefined;
1413
/** Same semantics as function calls: editors with a non-prod version get the
1514
* draft actor script; everyone else gets the published one. */
@@ -19,10 +18,8 @@ interface ActorsConfig {
1918
webSocketImpl?: unknown;
2019
}
2120

22-
// Heartbeat / half-open detection. PartySocket only reconnects on a browser
23-
// close/error event, so a silently-dead connection (TCP alive, no data — common
24-
// behind proxies/LBs) hangs until the OS idle timeout (~60s). Ping periodically
25-
// and force a reconnect if nothing comes back within DEAD_MS.
21+
// Heartbeat / half-open detection: PartySocket only reconnects on a close/error
22+
// event, so ping periodically and force a reconnect if nothing returns in DEAD_MS.
2623
const PING_MS = 1_000;
2724
const DEAD_MS = 3_000;
2825

@@ -58,9 +55,7 @@ class Room {
5855
room: this.instanceId,
5956
id: connId,
6057
...(this.config.webSocketImpl ? { WebSocket: this.config.webSocketImpl as any } : {}),
61-
// Re-read on every (re)connect so a login/logout between reconnects is
62-
// picked up. The platform proxy authenticates the connection itself —
63-
// no pre-connect token mint.
58+
// Re-read on every (re)connect so a login/logout is picked up.
6459
query: () => {
6560
const token = this.config.getAuthToken();
6661
return {

0 commit comments

Comments
 (0)