mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 17:32:50 +08:00
Fix 8 correctness bugs found in code review of PR #4
- Connection log only ever rendered the single latest entry
(log.slice(-1) -> log.slice(-50)), and appendLog grew log[] unbounded
- Mic stayed off after switching back to a parked multi-join tab
(added ParkedSessionState.micWasOn, restore mic on switch-back)
- Packet-loss heuristic guessed fraction-vs-percent by magnitude, which
can't disambiguate; now branches on actual server type (GTS vs TS3)
- serverGroups/channelGroups/permissionCatalog/banList/fileBrowser were
page-global caches never invalidated on multi-join tab switch, so a
newly active tab could show another server's stale data
- ServerQuery clients were filtered from the client list but still
counted in the online-total fallback; total now matches the list
- gateway disconnect() resolved before the connector child process
actually exited, allowing two connector processes to run briefly on
a fast reconnect; now waits for exit (with a hard-kill fallback)
- switching a parked multi-join tab back in replayed a spurious
whisper-target log entry and resent setWhisperTargets even when
nothing changed, because the diff was against the wrong tab's ref
- double-click-to-join channel detection used module-level state,
so a click in one multi-join tab could pair with a click in another
tab's tree as a false double-click; now keyed per session
Note: could not verify with a full cargo build - the PR's own
'Update tsclientlib' commit (cd6928b) points at a tsclientlib submodule
commit that isn't pushed to any reachable branch (not even the PR
author's own fork), so nobody can currently build this PR end-to-end.
That is unrelated to these fixes.
This commit is contained in:
1 parent
cd6928b407
commit
9702c671e8
4 files changed
+93
-20
No files matched your search
@@ -90,6 +90,8 @@ export type ParkedSessionState = {
|
||||
log: LogEntry[];
|
||||
hasConnected: boolean;
|
||||
previousClients: ClientInfo[] | null;
|
||||
/** Whether the mic was on for this tab when it was parked, so switching back restores it. */
|
||||
micWasOn: boolean;
|
||||
};
|
||||
|
||||
export type SessionTabInfo = {
|
||||
@@ -140,6 +142,7 @@ export function emptyParkedState(partial?: Partial<ParkedSessionState>): ParkedS
|
||||
log: [],
|
||||
hasConnected: false,
|
||||
previousClients: null,
|
||||
micWasOn: false,
|
||||
...partial,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user