Edge ran its echo canceller on the display-capture track (getSettings showed
echoCancellation: true on deviceId "loopback"), which subtracts exactly
what the speakers play - the whole signal. Voice processing is now off for
that track; noise suppression would mangle music anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Stopping it right away may end or silence the capture session the audio
track belongs to (suspected with Windows system audio in Edge). It runs at
1 fps and stops together with the audio.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Review S12: the banner loads from a host the server admin picks, which sees
the viewer's IP. It's now a switch under Options -> Application and is
requested without a referrer. Proxying it through the gateway would make the
gateway fetch arbitrary URLs, so that's left out.
Review S10: identities and favorite passwords stay in localStorage (the
native client keeps them in plain settings files too; favorite passwords
are already optional). The README now says so.
Also labels the dialogs' close buttons for screen readers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Dialogs move focus in on open, trap Tab, close on Escape, and return focus.
Toolbar icon buttons get aria-labels; away/whisper carets expose their menu
state. Channel and client rows are focusable: Enter joins/opens chat, Space
selects, arrows collapse/expand, the context-menu key opens the menu with
focus on its first item.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The new toolbar button asks the browser for a tab or window with audio and
mixes it into what the mic sends. It joins after AEC3, per 20 ms frame, so the
canceller only ever sees the mic, and while sharing the voice activation stays
open so music pauses don't cut out. Hidden where getDisplayMedia is missing
(mobile); a restarted mic picks the shared audio up again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Measured with relays that blackhole traffic:
- Gateway to TS server: tsclientlib reconnects on its own after a timeout or
server restart, but the connector ignored that, so the browser got no notice
and the new session stayed unsubscribed - everyone but us vanished from the
tree. The connector now emits "reconnecting"/"reconnected", resubscribes,
and pauses the server-variable poll meanwhile; the page logs both.
- Browser to gateway: a network that dies silently never closed the socket on
the page, which kept showing "connected" indefinitely. The gateway now sends
an app-level keepalive every 20 s (announced as "keepalive" in hello), and
a socket quiet for 50 s is handled as dropped and reconnected.
- Coming back online skips any remaining reconnect backoff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
TURN_URLS on the gateway is handed to the browser in "hello" and added to the
STUN defaults for both watching and publishing. With TURN_SECRET (coturn's
use-auth-secret) each socket gets its own credential valid for 24 h; static
TURN_USERNAME/TURN_CREDENTIAL work too but are public to every visitor.
Also moves GATEWAY_FEATURES above the runtime-config comment it had split.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
A search field above the channel tree filters it live: a channel whose name
matches keeps all of its clients, a client whose name matches keeps its
channel, and the parent chain of every match stays so it is shown in place.
Collapsed channels open while searching; Escape clears the field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The connector now reports client_flag_avatar (the avatar's MD5) per client.
The browser derives /avatar_<uid> from the UID and fetches it through the
existing channel-0 file cache used for group icons, again whenever the hash
changes. Only the own channel and the selected client are fetched, so a big
server does not push every avatar through the gateway; avatars are capped at
512 KiB like icons. They replace the initials tile in the tree (Nova/Pulse),
the speaking-now bar, and appear in the client info panel.
Also fixes the Nova connect dialog staying open over an auto-connect: its
"forced open while disconnected" effect ran after the auto-connect had closed
it, and nothing closed it again once connected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The gateway now greets every browser with {type:"hello", features:[...]} so
the hosted client, which updates on every push, can hide what an older
gateway cannot do instead of hanging on it. A gateway without "hello" is
treated as the v0.14 feature set, which replaces the hand-flipped
STREAM_UI_ENABLED switch.
First feature behind it: "clientVolume". The client context menu gets a
0-200% slider, stored per client UID in localStorage. The connector applies
it to tsclientlib's per-speaker AudioQueue.volume while mixing, and keeps the
value across talk pauses, when that queue is torn down and recreated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The connector is cross-compiled with tonistiigi/xx on the build platform
(pinned by digest); web-builder and gateway-builder also run natively there
since their output is platform-independent JS. Only the runtime stage runs
per target platform. README mentions the arm64 image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
DEFAULT_SERVER/DEFAULT_CHANNEL used to be build args only, so pointing a
self-hosted instance at its server meant cloning the repo and rebuilding
the image. The gateway now reads them from its own environment and puts
them into the index.html it serves as <meta> tags (HTML-escaped; an
inline script would be blocked by the page's CSP). The client prefers
those over the build-time VITE_ values, which keep working as before.
Closes#12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- A10: drop labels of unimplemented shortcuts, localize "Ctrl", never
fire shortcuts (Ctrl+D!) while typing in a field
- A11: in-memory localStorage stand-in when storage is blocked instead
of a blank page
- A12: invite link falls back to selecting the text without clipboard API
- A13: AEC3 script honors BASE_URL, failed loads are retried
- A14: shared downloadBlob helper, object URLs revoked with a delay
- A15: remaining hardcoded German/English strings moved to the locales
- A16: broken soundpack files show an error instead of failing silently
- A17: connect buttons no longer pass the click event as overrides
- A18: design base persisted from the resolved theme
- A19: no audio send() while the socket is still connecting
- S10: privilege keys are no longer persisted in localStorage
- S11: share links can carry the token in the fragment (#token=)
- oxlint: 0 warnings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Viewer, publisher and streamInfos are global, so after a tab switch a
running stream's signaling went to the new server's socket and stream
infos showed up in the other tab under clids that name other people.
Parking a tab now stops watching/publishing (still via the old socket)
and clears the stream infos.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Server and channel group ids overlap, and the editor kept both groupId
and the loaded entries across tab switches - so after switching from
server group 6 to the channel group tab, delete/add hit channel group 6
while the table still showed server group 6. The group selection now
resets between the group tabs, the new tab reloads, and entries are only
shown while they belong to the target on screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
wireSocket's handlers were created once per socket, so they kept the
state from connect time: "ignore contact" never applied, the file list
didn't refresh after uploads, the channel-password dialog lacked the
name, log texts stayed in the old language and reconnect restarted the
mic with old settings. The handlers are now rebuilt every render and
the socket calls the latest version through a ref.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
New submissions are "pending" until approved by the STORE_ADMIN_TOKEN
holder via the new /api/store/admin review page (CSS shown as text only).
Theme CSS is normalized (comments, escapes, case) before checking and may
no longer load anything: no @import/@font-face, no image-set()/src()/etc.,
url() only for inline data: images. Already-approved themes failing the
new check are hidden. Store file is written atomically.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- A1: resume a suspended AudioContext on any click/keypress, so playback
works even with the mic denied or absent
- A2: own mute state and message sounds follow ownClientId, not the
nickname, so they keep working after a rename
- A3: startMic/stopMic generation counter - a stop during getUserMedia no
longer gets overridden by the late mic; failed starts clean up
- A4: a failed reconnect of a previously connected session keeps its tab
and retries instead of removing it
- A7: new AudioPlayer instances get the current volume and output device
- A8: AEC3 is (re)created with its AudioContext instead of only on toggle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- /ws: optional ALLOWED_ORIGINS allowlist, connection limits per IP and
in total, 34 MiB maxPayload (uploads capped at 24 MiB client-side)
- connect: reject malformed host/nickname before spawning a connector;
args passed as --flag=value, secrets via env instead of argv
- connector: 25 MiB download cap, 512 KiB for auto-fetched icons, friendly
error for blocked private targets (tsclientlib: ALLOW_PRIVATE_TARGETS)
- feedback: contact e-mail never goes into the public GitHub issue;
mentions/links in the issue body are neutralized; form says so
- rate limits: TRUST_PROXY-aware client IP, expiring limiter maps
- security headers (nosniff, frame options, CSP on served HTML)
- web: icon downloads requested once per path instead of on every update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- Dockerfile: install ca-certificates in the runtime stage. Its absence
broke the Rust connector's native-tls HTTPS call to the TeamSpeak
nickname-lookup API for every nickname-based connection (GitHub
issue #11, "mgonline" report) - Node's own bundled certs masked this
everywhere else in the gateway, so only that one HTTPS call failed.
- tsclientlib bump: resolver.rs now surfaces the real per-step errors
instead of an empty list when every resolution method fails (see
that submodule's own commit for detail).
- gateway: new ALLOWED_SERVERS env var lets self-hosting admins lock
their instance down to specific server(s) (with *.example.com
wildcard support) instead of accepting connections to any address.
Documented in the README env var table.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Two more unhandled-EventEmitter crash/latency bugs in the same spot as the
last one:
spawn() itself can fail asynchronously (bad CONNECTOR_BIN path, no exec
permission, or EMFILE/ENFILE under load) and emits an unhandled 'error' on
the child process object - just as fatal to the whole gateway as the stdin
EPIPE case, and more likely to hit exactly when the most connections are
already open. Now caught and turned into a normal error event.
disconnect() attached its exit listener with child.once("exit", ...), which
never fires if the connector already exited before disconnect() was called -
'exit' fires exactly once, and by then it's already happened. That always
fell through to the 3s hard-kill timeout for a process that was already
gone, needlessly stalling explicit disconnects and same-socket reconnects
after the connector died on its own. A childGone flag, set by both the new
error handler and the existing exit handler, lets disconnect() skip that
wait entirely when there's nothing left to wait for.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
writeLine()'s killed check only reflects Node-side .kill() calls, so it
can't catch the connector exiting on its own (e.g. the TS3 server drops
it) and closing its stdin first. Writing to that closed pipe threw an
unhandled EPIPE 'error' event, which Node treats as fatal - crashing the
gateway and every other client's live session along with it. Listening
for the error on child.stdin turns it into an isolated write failure.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The Design Store defaults to the maintainer's shared catalog for
every build, but a self-hoster running their own gateway store
(STORE_ENABLED=1) had no way to actually point their Docker build at
it - VITE_STORE_URL existed in App.tsx but wasn't wired as a build
arg, and neither it nor the gateway-side STORE_* vars were documented
anywhere. Add the --build-arg STORE_URL passthrough (same unset-means-
no-override convention as DEFAULT_SERVER) and document both it and
the STORE_ENABLED/STORE_DATA_FILE/STORE_ALLOWED_ORIGIN/STORE_ADMIN_TOKEN
gateway env vars in the README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The store was previously derived per-instance from VITE_GATEWAY_URL,
so every self-hosted Docker image silently got its own empty,
isolated catalog instead of sharing the curated one. The store is a
single curated catalog (gateway/src/store.ts), unrelated to which
TS3/TeaSpeak gateway a build otherwise talks to, so all builds now
default to the same central endpoint. VITE_STORE_URL still lets a
self-hoster point at their own store instead. DEMO_MODE keeps the old
same-origin derivation, which 404s on the static demo host, so the
public demo can never write to the real production store.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Same pattern as the recent store.ts extraction: feedback-log writes and
connection-event logging move from inline file/console I/O in index.ts
into activity-log.ts, called via logFeedback()/logConnectionEvent(). The
public default behavior is unchanged (JSON-lines file with rotation,
console logging gated by LOG_CONNECTIONS).
This is the piece of the private SQLite overlay's persistence swap that's
a clean drop-in replacement - the private VPS gateway now imports the same
two function names from its own activity-log.ts (SQLite-backed) instead of
patching these call sites into a forked index.ts.
Note: the private overlay's live host-ban enforcement (blocked_hosts
table, heartbeat-driven disconnect) is NOT extracted here - it has no
public equivalent and touches the WS connection/heartbeat control flow
directly, not just a persistence call. Left as-is for now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Moved all store code (constants, cache, handlers) from index.ts into
store.ts verbatim, no behavior change. It has zero private-VPS
modifications (unlike feedback/connection persistence, which the private
overlay patches to use SQLite), so this file can be copied unmodified into
the private overlay - future store changes there no longer need a manual
diff/patch against a hand-patched index.ts.
A full separate microservice was considered but rejected: this repo builds
one Docker image (connector + web + gateway) and self-hosters run one
container via docker-compose.yml; splitting the store into its own service
would force a second mandatory container for what's an opt-in, currently
tiny feature. A module boundary gets the actual pain point (patch-merge
friction) without that cost.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
STORE_MAX_THEMES was 2000, meaning the in-memory store cache could
theoretically grow to ~900MB (2000 * up to 450KB CSS+screenshot each) with
no eviction. 300 bounds that to ~135MB, which is proportionate for what is
currently a niche community design store.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Explicit red instead of the theme's accent color, so it stays visually
distinct as a destructive action regardless of the active design. The
confirm() prompt before deletion was already there.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
.ts-design-theme-card has align-items:flex-start, so its flex children
shrink to content width unless given width:100% explicitly (like
.ts-design-theme-card-select already does). The actions row was
missing that, so flex:1 on its buttons had no extra width to grow
into - they stayed small and left-aligned no matter how the buttons
themselves were styled. That's why nothing helped until now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The 2x2 layout looked worse. flex:1 on a 4-in-a-row already makes the
four buttons together fill the card's full width - that was right the
first time, just needed the mismatched-glyph fix, not a layout change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The edit/duplicate/export/delete row mixed three text glyphs with a
color emoji (🗑), which render at different sizes and weights across
platforms - that was the actual cause of the row looking uneven, not
just sizing. Swapped all four for matching stroke-style SVG icons.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The store's install button had accidentally inherited the icon-row's
big-icon sizing (shared class) and rendered huge. Gave it and the
publish/new-design/import/store buttons proper themed gradient styling
instead of the browser default, and moved "back" to a top-left header
button instead of stacking it under publish.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Themes published before this schema existed have no screenshot/rating
fields at all, so `t.screenshot !== null` (undefined) and the rating
counters (undefined += n) were both wrong for them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Möpchi/Moepchi can only be used as an author name with a matching
STORE_ADMIN_TOKEN bearer token. Submissions can now include an optional
description and a manually uploaded screenshot (data URL, capped size),
shown on browse cards, plus a simple 1-5 star rating (one vote per IP
per theme).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
The edit/duplicate/export/delete row used 12px muted-color icons with no
horizontal padding - hard to hit and easy to lose against darker custom
themes. Bump size/padding and switch to the full-contrast text color.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Opt-in gateway endpoints (STORE_ENABLED=1, off by default like every other
optional feature here) to browse and publish community themes, reusing the
existing {name, baseTheme, css} export/import shape so no new packaging
format is needed. CSS is sanitized against @import and remote url() before
being accepted, since it's rendered on other users' pages. Client side adds
a "Store" button to the design picker with a browse/install and a publish
view built on the same DesignPanel patterns as import/export.
No website-side store yet - deliberately client-only for the MVP.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
setMonitoring() connected the raw pre-AEC3 mic source straight to playback,
so the self-test howled regardless of AEC3 - it was bypassing the whole
cancellation path entirely, not failing to cancel. Mirror the processed
signal into the ScriptProcessorNode's own output and monitor that instead.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU