Commit Graph
203 Commits
Author SHA1 Message Date
MoepchiandClaude Sonnet 5 83afe6c2cd Fix path-traversal-adjacent bypass in static file containment check
The WEB_STATIC file server checked containment with a plain string
prefix (filePath.startsWith(WEB_DIST)), which a sibling directory
sharing that prefix passes without actually being inside WEB_DIST -
e.g. WEB_DIST "/app/web/dist" also accepts "/app/web/dist-backup/...".
Now requires an exact match or a path-separator boundary.

WEB_STATIC defaults to on, so this affects any self-hoster serving the
UI from the gateway with the stock config, not just this deployment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-17 17:35:54 +00:00
MoepchiandClaude Sonnet 5 667012d710 Fix WS message handler crash and stdin command injection in gateway
socket.on("message") parsed JSON and ran the whole handler switch with no
try/catch. Since the callback is async, any throw - malformed JSON from
any connected browser tab, or a handler throwing on unexpected input -
became an unhandled rejection and crashed the entire gateway process,
dropping every other connected user's live session. Now wrapped so one bad
message only errors back to that socket.

connection.ts wrote several fields (permission scope/ids, whisper targets)
straight into the connector's line-based stdin protocol without stripping
embedded CR/LF, unlike the sanitization already applied to every other
free-text field in the file - a newline in one of them could smuggle in a
second, attacker-chosen connector command. All stdin writes now go through
one writeLine() helper that strips embedded CR/LF, closing this for every
call site at once instead of patching each one individually.

Bumps the tsclientlib submodule for the matching SSRF/panic fixes there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-17 11:06:16 +00:00
MoepchiandClaude Sonnet 5 3ffd7e5ce5 Fix unstyled "In new tab" button in Nova connect dialog
The Nova connect dialog styles its buttons per-class rather than via
the shared wrapper selector Standard/Pulse use. The Cancel and Connect
buttons had their Nova classes, but "In new tab" had none, so it fell
back to unstyled browser-default chrome instead of matching Cancel's
outline style.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-17 07:22:05 +00:00
MoepchiandClaude Sonnet 5 ae8f1f764b Fix dialog backdrop rendering below floating donate/feedback buttons
.ts-dialog-backdrop was z-index:15 while the donate/feedback FABs are
z-index:500, so any modal (connect dialog, settings, etc.) opened while
those buttons are visible left them floating undimmed in front of the
backdrop instead of behind it. Bumped the backdrop above the FABs but
below the update-available toast (600).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-17 06:58:37 +00:00
MoepchiandClaude Sonnet 5 42ac4e9aaa Fix Nova design: floating FABs overlapping chat composer, textarea stuck collapsed
Nova relocates the self/voice toolbar below the chat panel, adding ~6.7rem
of footprint the fixed-position donate/feedback buttons didn't account for,
so they landed on top of the composer's send button. Also the chat
textarea's auto-resize effect only ran on chatInput/theme change, so on
first mount (while the chat panel was hidden pre-connect, scrollHeight 0)
it locked in a near-zero height that never got recalculated after
connecting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-17 06:40:34 +00:00
MoepchiandClaude Sonnet 5 961084e9a0 README: expand auto-connect blurb into a full tutorial section
Own top-level section with a share-link table and the build-time
default walkthrough, instead of a two-line paragraph buried in the
Docker install steps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-16 13:52:44 +00:00
MoepchiandClaude Sonnet 5 faeb269fdd Add URL-based and build-time auto-connect (closes #10)
Landing pages can now send visitors straight into a TeamSpeak server:
a ?connect=host&nickname=&channel=&token= share link auto-connects on
any deployment, or a self-hoster can bake in a default server at build
time (VITE_DEFAULT_SERVER/VITE_DEFAULT_CHANNEL, mirroring the existing
DONATE_URL Docker ARG pattern) so every visitor auto-joins with zero
params. A share link always overrides the build-time default. Waits
for the mandatory first-visit ToS gate where applicable, falls back to
a prefilled reopened connect dialog on failure, and generates a
Guest-XXXX nickname when none is available.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.5-beta.1
2026-09-16 12:34:14 +00:00
MoepchiandClaude Sonnet 5 f44327aabc ROADMAP: add concrete accessibility milestone for the web client
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-15 18:03:32 +00:00
MoepchiandClaude Sonnet 5 7357dfa85d Bump tsclientlib: fix live stream start/stop not seen by connected clients
An already-connected client only learned about another client's TS6
stream via the initial snapshot; a live start/stop toggle mid-session
went out via notifyclientupdated, whose attribute list didn't include
client_is_streaming, so tsclientlib silently dropped it. Fixed upstream
in tsdeclarations/Messages.toml; only a reconnect used to pick it up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.4-beta.1
2026-09-15 17:37:00 +00:00
MoepchiandClaude Sonnet 5 ceeba24f86 ROADMAP: fix stale note about streaming UI flag being off
client.webspeak3.de's gateway has answered setupStream/joinStream/
sendStreamSignal since v0.11.0-beta.1 (2026-09-11); STREAM_UI_ENABLED
was flipped back on then but this doc never caught up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-15 17:16:13 +00:00
MoepchiandClaude Sonnet 5 817aa0f5f6 Gracefully disconnect live sessions on SIGTERM before exiting
Previously the container was killed with connector child processes still
mid-session, so the target TS3/TeaSpeak server only noticed the drop via
its own timeout. A client's automatic reconnect (see App.tsx's
scheduleReconnect) landing before that timeout got rejected as a
duplicate identity (e.g. ClientTooManyClonesConnected).

Now SIGTERM disconnects every live connection first (bounded to 5s) so
the target server frees the slot immediately. The connector's own
resulting "disconnected" event is suppressed from reaching the browser
during shutdown (shuttingDown flag) so the browser sees a raw socket
close, which it treats as an unexpected drop and retries, rather than an
explicit disconnect, which it treats as deliberate and gives up on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.3-beta.3
2026-09-15 06:56:19 +00:00
MoepchiandClaude Sonnet 5 bc6022b45f Add optional token-authenticated /api/broadcast endpoint
Lets the operator send a free-text maintenance notice to every connected
browser tab via POST /api/broadcast (Bearer BROADCAST_TOKEN). Reuses the
existing {type:"notice"} WebSocket message the frontend already renders
for the SIGTERM restart notice, so no frontend changes are needed. Off
(404) unless BROADCAST_TOKEN is set, same opt-in convention as
FEEDBACK_ENABLED/LOG_CONNECTIONS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.3-beta.2
2026-09-15 05:25:33 +00:00
MoepchiandClaude Sonnet 5 8d17514774 Add Weblate translation link to language settings and Help menu
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.3-beta.1
2026-09-14 20:01:58 +00:00
MoepchiandClaude Sonnet 5 d62e47ca63 Move translations to plain JSON files (de/en/zh-CN/fa)
Translation strings were split across inline TS objects in i18n.tsx
(de/en) and separate .ts modules (zh-CN, fa). Consolidated into one
JSON file per language under web/src/locales/ - translation tools
(e.g. Weblate) can read/write these directly, and i18n.tsx is now
just the loader/lookup logic. No string content changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-14 19:08:03 +00:00
MoepchiandClaude Sonnet 5 45af66f84b Tag Persian as beta in the language selector
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.2-beta.1
2026-09-14 19:02:57 +00:00
MoepchiandClaude Sonnet 5 be946c2a5e Add Persian (fa) translation, incl. RTL toggle
- New locales/fa.ts, 618 keys, full parity with de/en/zh-CN
- document.documentElement.dir flips to rtl/ltr with the active language
- Language selector + system-locale auto-detect (fa-*) updated

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.1-beta.1
2026-09-14 19:01:16 +00:00
MoepchiandClaude Sonnet 5 732a905f32 zh-CN: catch up 116 missing keys, drop 2 stale ones
Feedback dialog (incl. new report category), ToS modal, restart
notice, Hilfe menu, channel password dialog, custom design manager,
and the whole screen-share/publish feature were falling back to
English. Also removed connect.sendMyTeamSpeakId and
favorites.enableMyTeamSpeak, which no longer exist in de/en.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-14 18:53:19 +00:00
MoepchiandClaude Sonnet 5 77e147cc27 Add Hilfe dropdown menu (About, GitHub, Changelog, ToS)
Replaces the inert "Hilfe" label with a real dropdown, folding the
standalone ToS menubar item into it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.12.0-beta.1
2026-09-14 18:42:57 +00:00
MoepchiandClaude Sonnet 5 b0495367cb Link ToS modal to legal pages, add report feedback category
- ToS modal: Datenschutzerklärung/Impressum words are now real links
- Feedback form: new "report" category (abuse/violation), hidden
  GitHub-issue option since reports must stay private
- Gateways: accept "report" in FEEDBACK_CATEGORIES

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-14 18:33:27 +00:00
MoepchiandClaude Sonnet 5 73303e1229 Add SIGTERM restart-warning broadcast and first-visit ToS modal
- Gateway: on SIGTERM, broadcast a "notice" event to every connected
  socket before shutting down, so an active call/stream doesn't just
  silently drop during a redeploy.
- Web client: new "notice" event handling shows a non-dismissable
  restart-warning dialog; new ToS modal shown on first visit to the
  own-hosted instance (client.webspeak3.de only), versioned via
  localStorage, reopenable from the menu.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-14 18:15:15 +00:00
MoepchiandClaude Opus 4.8 741528220e Bump tsclientlib: SRV on exact host only, no apex fallback (#9)
Pulls in the resolver fix so a subdomain with its own A record (e.g.
ts6.rush-zone.com) is no longer hijacked onto a different server's apex
SRV. Fixes #9.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-14 15:02:42 +00:00
MoepchiandClaude Opus 5 0b34e7ecfb web: put the donation pill below the feedback button
The two floating buttons swap places: the Ko-fi pill now sits in the
corner at bottom: 5.5rem and the feedback button stacks above it at
8.5rem, which keeps the same 12px gap the previous arrangement had.

The offset still follows the instance rather than the dialog, it just
moved to the other element: the feedback button only shifts up where the
donation pill is actually rendered, and takes the corner spot where the
build dropped it via VITE_DONATE_URL=.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 16:28:18 +00:00
MoepchiandClaude Opus 5 6ebc3e22e0 web: add a Ko-fi donation button
A small pill in the bottom right corner, in Ko-fi's own red rather than
the theme colors so it reads as what it is. It sits above the feedback
button where that one exists and takes its place where it does not; the
offset follows the instance rather than the dialog, so opening feedback
does not make it jump.

Unlike the feedback button this is not limited to the maintainer's own
instance - it ships in every build, the Docker image included. Since
that means self-hosters carry someone else's donation link, there is a
way out: VITE_DONATE_URL= (empty) drops the button, any other value
retargets it, and the Dockerfile passes it through as --build-arg
DONATE_URL. The "keep" sentinel there is not decoration - an unset and
an empty build arg are indistinguishable inside RUN, so without it
"not passed" would silently mean "remove".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 16:12:58 +00:00
MoepchiandClaude Opus 5 fa4daf7831 gateway: serve nothing to browsers when WEB_STATIC=0
The notice page at "/" was the last thing a browser could get from a
host that only exists to answer /ws and /api/feedback. It is gone; every
path now 404s, so the gateway hostname has no web presence at all.

That broke the container healthcheck, which probed "/" and required a
200 - a correctly configured gateway would have reported itself
unhealthy. The probe now has its own route, /healthz, served before the
WEB_STATIC branch so it answers in either mode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 15:34:16 +00:00
MoepchiandClaude Opus 5 f48c1cc91a Say what WEB_STATIC=0 actually does in the startup log
The line pointed at the Vite dev server, which is only ever right on a
developer's machine - on a deployed gateway it reads like a bug report
waiting to happen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 12:45:02 +00:00
MoepchiandClaude Opus 5 cc715e24b2 Fix the feedback URL and stop serving a UI when WEB_STATIC=0
VITE_GATEWAY_URL names a WebSocket origin, and FEEDBACK_URL was derived
from it verbatim - so with VITE_GATEWAY_URL=wss://gateway.example the
form posted to wss://gateway.example/api/feedback, which fetch() refuses
outright ("TypeError: unknown scheme"). Every submission from a
separately hosted frontend failed before it left the browser. Map the
scheme back to http(s); an already-http VITE_GATEWAY_URL is untouched.

While there: WEB_STATIC=0 answered every path with the dev hint page,
which talks about localhost:5173 and npm run dev. That page is wrong for
a gateway that is reachable publicly, and an SPA-shaped answer on every
path makes the host look like a second, stale copy of the app. Serve a
short deployment-neutral notice at "/" and 404 everywhere else; the dev
hint stays for the case it is actually about, a missing web/dist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 12:39:50 +00:00
MoepchiandClaude Opus 5 2ee6d1f0b5 Stop the service worker from stranding clients
Between 48f5e35 (07.09., registerType: 'autoUpdate') and 5b5f4ca (10.09.,
switched to 'prompt') every client that cached the app froze: the new
worker sits in `waiting` and the only code that could release it - the
update toast - lives in the build behind that worker. Their next update
never arrives, and Pages deletes the hashed assets they still run from,
so the bundle they serve does not exist on the server any more. That is
how the feedback form went missing on client.webspeak3.de.

- Back to 'autoUpdate', with skipWaiting/clientsClaim spelled out: the
  plugin only sets them when it also injects registerSW.js, so with
  injectRegister: false the generated worker was byte-identical to the
  'prompt' one. Verified in dist/sw.js.
- onNeedReload instead of onNeedRefresh: the worker takes over on its
  own, the toast only decides *when* to reload, so nobody is thrown out
  of a running connection.
- version.json plus a __BUILD_ID__ baked into the bundle, checked every
  30 min and on tab focus, deliberately routed around the worker (not in
  globPatterns, so never precached). If the server is on another build
  and no new worker turns up, the worker is wedged and the button clears
  registrations and caches instead of reloading into the same cache.
- Dismissing the toast snoozes for 30 min rather than for good.

Verified in headless Chromium against simulated deploys: a client stuck
on the old worker lands on the new bundle at the first plain F5.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 12:20:53 +00:00
MoepchiandClaude Opus 5 06f38b4582 Switch the streaming UI back on
The gateway on the VPS was rebuilt on the v0.11.0-beta.1 image and now
answers setupStream/joinStream/sendStreamSignal, so the condition the kill
switch was waiting for is met. Verified against the live gateway rather
than assumed: a WebSocket connect through gateway.webspeak3.de reached a
real TS6 server, and all five stream commands are present in the running
dist.

The switch itself stays - it is the lever for the next time the frontend
ships a stream feature before the gateway has it. The durable fix is still
a capability handshake; see ROADMAP.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 11:23:54 +00:00
MoepchiandClaude Opus 5 5024bf9856 Switch the streaming UI off until the gateway catches up
client.webspeak3.de is rebuilt by Cloudflare Pages on every push to main, but
the gateway and connector are a Docker image that has to be pulled onto the
host by hand. v0.11.0-beta.1 therefore put a browser that knows setupStream in
front of a gateway that does not - and an unsupported setupStream is not an
error, it is silence: the publish panel waits at "starting" forever, after the
browser has already asked the user to share a screen. That reads as a broken
feature, which is worse than an absent one.

Both entry points are gated on one flag: the toolbar button and the "watch
stream" context-menu item. The publisher is tree-shaken out of the bundle as a
result, so nothing can reach the gateway by accident. Flip it back once the
deployed gateway is on v0.11.0-beta.1 or newer.

The durable fix is a capability handshake so the client can tell what its
gateway supports instead of assuming; noted in the roadmap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 06:39:13 +00:00
MoepchiandClaude Opus 5 478e5c0384 Merge: TS6 screen streaming (alpha)
Adds screen streaming to and from TeamSpeak 6, marked alpha and unstable in
the UI and the docs because it speaks a protocol TeamSpeak does not publish.
Also repoints both submodules at Moepchi forks, so a fresh clone resolves
every pinned commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
v0.11.0-beta.1
2026-09-11 06:27:35 +00:00
MoepchiandClaude Opus 5 550a8896a5 Point the tsclientlib submodule at Moepchi/tsclientlib
Streaming needs a commit in tsclientlib, and the branch was hosted in an
organization this project cannot publish to, so a fresh clone would pin a
commit that never appears. Moepchi/tsclientlib is the older fork in the same
network - GreenTeaSpeak/tsclientlib was itself forked from it - and both share
ReSpeak/tsclientlib as upstream, so no history is rewritten or lost; the
branch keeps every GreenTeaSpeak commit it already had.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 06:09:15 +00:00
MoepchiandClaude Opus 5 e7d5b3be0a Don't offer streaming in demo mode
DemoSocket answers a fixed set of gateway messages and silently drops the
rest, setupstream among them. Clicking the button on the public demo would
therefore prompt the visitor to pick a screen, start the capture, and then
leave the panel at "starting" forever with no error - which reads as a broken
feature rather than an absent one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:37:19 +00:00
MoepchiandClaude Opus 5 9652a3efe5 Mark TS6 streaming as alpha in the UI and the docs
Streaming interoperates with TeamSpeak 6 over a protocol TeamSpeak does not
document; the wire format here was derived from observed behavior. It can fail
to connect, deliver a poor picture, mishandle viewer admission, or break with
any TS6 update - which is a different stability expectation than the rest of
WebSpeak3, and users should not have to infer that from a release note they
read once.

So the badge sits everywhere the feature is reachable: the stream settings
dialog (with a sentence explaining what "alpha" means here), both stream
panels, and the toolbar button's tooltip. README and ROADMAP say the same,
including the two gaps that are most likely to be mistaken for bugs - no SFU
("Server" mode), no camera source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:35:04 +00:00
MoepchiandClaude Opus 5 4d549887d5 Bump tsclientlib for TS6 stream signaling
The connector reads TS6's stream commands off StreamItem::UnknownCommand,
which tsclientlib only started emitting in this commit; before it, every
notifystream* packet was logged as an unknown command and dropped, so the
signaling never reached the gateway. Also carries the client_is_streaming
client property.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:34:54 +00:00
MoepchiandClaude Opus 5 686458807a publish: stop the encoder from shrinking the picture
Every resolution above 360p was effectively a lie. The capture ran at the
requested size, the bitrate cap was applied, and the encoder then scaled
the picture down by 3x anyway and never recovered.

The cause is degradationPreference, which we never set. Its default for a
track hinted "motion" - which is every preset except Presentation - is to
protect the frame rate and sacrifice resolution. For a screen share that
is backwards: the user picked 1080p, so 1080p is what to keep.

Measured on a 1440x1080 capture with a 6000 kbps cap, 12 s each:

    default             480x270  @20  limit=bandwidth  ~214 kbps
    maintain-framerate  480x270  @20  limit=bandwidth  ~212 kbps
    balanced            480x270  @15  limit=bandwidth  ~169 kbps
    maintain-resolution 1440x810 @19  limit=none       ~717 kbps

Note the bitrate column: the shrunken variants were not short of budget,
they had 6000 kbps and used 214. Setting contentHint "detail" fixes it
too, which is why Presentation was the one preset that looked right.

Audio senders are left alone; degradationPreference is video-only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 b505d68f56 publish: drop a queued request when the client leaves
notifystreamclientleft only removed connected viewers, so a request that
was still waiting for a decision outlived the person who made it - the
row stayed in the panel and approving it would have opened a connection
to a client that is gone. Leaving while pending is not exotic: it is what
closing TS6, or giving up on "waiting for access", looks like from here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 13d3f56c89 publish: mirror TS6's pending-join model instead of refusing
Live testing against a real TS6 client settled how both settings actually
behave, and neither is what the previous commit assumed.

The server enforces nothing. It stores accessibility and viewer_limit,
echoes them back in notifystreamstarted, and then forwards every join
request anyway - a PRIVATE stream at viewer_limit=1 still had both
viewers announced to us. Enforcement is entirely the publisher's job.

And a refusal is the wrong tool for it. TS6's own rule, from main.js:

    !autoAccept || full ? pendingJoinRequests.push(...)
                        : joinStreamResponse(...)

A request it will not take automatically is left *pending*, not denied.
That matters because a denial does not stick - TS6 pairs its own deny
with a ban (blockAndDenyJoinRequest) precisely because of this - so a
refused client just asks again. Measured: 7 retries in 40 s, with nothing
shown to the person waiting. Left pending, the same client asks once and
displays "waiting for access" until answered, then connects normally.

So: PUBLIC with room to spare admits; anything else queues for the user,
including a full stream. Deny is now an explicit choice, and block is the
sticky variant. CONTACTS_ONLY behaves as PRIVATE because the contact list
is a TS6 account feature we cannot read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 4d0954054c publish: actually enforce the viewer limit
viewer_limit went out with setupstream and was then never looked at
again - admit() handed a peer connection to every join request that
arrived. Nothing establishes that the server turns anyone away, so the
setting was advisory at best.

The publisher is the only side that can enforce it: it is the one
handing out peer connections, and in P2P mode each one is another
encode. respondJoinStream(accept: false) was already plumbed end to end
down to decision=0 in the connector; it just had no caller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 115cd7150e web: TS6's stream-start options in the publish dialog
TS6 shows a settings dialog before going live; this builds the same set
into webspeak3, split into Basic (preset, capture audio, privacy) and an
Advanced section (resolution, FPS, bitrate, audio bitrate, viewer limit,
connection mode).

The three numeric setupstream fields are enums lifted out of TS6's own
main.js rather than guessed (findings §10): source NONE/CAMERA/SCREEN/
WINDOW/EXISTING_SESSION, accessibility NONE/PUBLIC/CONTACTS_ONLY/PRIVATE,
mode NONE/P2P/SFU. We had been sending type=3 (WINDOW) unconditionally;
detectSourceType() now picks SCREEN for displaySurface === "monitor".

Resolution, FPS and the two bitrates are not protocol fields. They are
applied locally: capture constraints, track.contentHint, and
sender.setParameters() with encoding.maxBitrate. bitrate= on the wire is
advisory - the server echoes back its own number either way.

Connection mode "Server" (SFU) is rendered disabled with a tooltip. That
path is a separate transport (requeststreamsfuaccessinfo -> mediasoup)
that we have not built, and announcing mode=2 without it would publish a
stream nobody could watch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 7083e8e29f gateway: serve HTTPS when TLS_CERT and TLS_KEY are set
Not a nicety. getDisplayMedia, getUserMedia and crypto.randomUUID are
secure-context-only, so a LAN instance reached over plain http could
neither share a screen nor use the microphone. Chrome additionally hides
host ICE candidates behind mDNS names until a media permission is
granted, which keeps a peer-to-peer stream from connecting at all - so
the publishing direction was effectively unreachable from anywhere but
localhost.

The frontend already derives ws:// or wss:// from the page's own scheme,
so nothing else needs configuring. Verified from the LAN address with a
self-signed cert: isSecureContext true, both media APIs present.

gateway/certs/ is gitignored - a private key never belongs in the repo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 15e215d892 stream: publish a stream TS6 can watch
The other direction, live-verified against TS6 6.0.0-beta12.1: a real
client rendered our video. Connector gains setupstream, stopstream and
respondjoinstreamrequest; the browser gains publish.ts and a toolbar
button.

The publisher offers. TS6 puts the first SDP in respondjoinstreamrequest,
so the side that owns the stream is the side that makes the offer - the
mirror of how it answered us when we were watching. Its reply confirmed
the key rule found in 7a8a1ea from the other side: TS6 sends us
args.answer, exactly as it expects args.answer from us. The key is always
named after the cmd.

The notify filter had to be fixed first. It matched
starts_with("notifyrespondjoinstream"), which drops the inbound
notifyjoinstreamrequest - so every viewer asking to watch *us* was
silently discarded, and the whole publishing direction was mute. Match
ends_with("joinstreamrequest") instead.

P2P mode is a mesh with no SFU in the path, so each viewer gets its own
peer connection and its own encode. Watching and broadcasting can run at
once, so the two panels stack in a shared container rather than both
anchoring to the same corner.

Note for later: we send bitrate=1500000 and the server reports 58208
back. It does not take our value - a real TS6 client showed 50880. Looks
server-side, and it does not stop the connection.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 b57d32bc18 stream: the answer args key is "answer", and it plays
Live-verified against TS6 6.0.0-beta12.1: the working payload is
{"cmd":"answer","args":{"answer":"<sdp>"}}. Audio and video RTP now
arrive from a real TS6 publisher into the browser.

53f6856 sent the bare SDP string instead, inferred statically from an
`answer` branch in the inbound dispatcher that references no key
literal. The inference was wrong - that branch delegates the object
read to a shared JSON helper, and the key lives there. A branch with no
key literal in it means the read is elsewhere, not that there is no key.

The wrong shape is completely silent: the server accepts and routes the
command, and the client discards it. Only getStats() shows it, as TS6
answering our connectivity checks while never sending one of its own
(requestsReceived=0) - it replies from the credentials in its own offer
without ever having applied a remote description. So drop the 5 s
retry-in-the-other-shape fallback, and keep send_with_result on
streamsignaling so a refused command at least surfaces as an error.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 c2e4760e37 Don't crash on a plain-http origin
crypto.randomUUID() exists only in a secure context, so opening a self-hosted
instance over http on a LAN IP threw at module load - before React rendered
anything - and left a blank page with no visible cause.

Falls back to a v4 id built from crypto.getRandomValues(). These ids are local
identifiers (identities, sessions, whisper lists), not secrets.

navigator.mediaDevices was already guarded, so the mic just reports "requires
HTTPS (or localhost)" as intended.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 087b8a90c5 stream: answer args are the bare SDP, not {sdp}
TeamSpeak.dll's inbound signaling dispatcher LEAs a key literal in every
branch that reads an object out of `args` (decision/offer for joinResponse,
sdp/mid/mLine for iceCandidate) and none in the answer and offer branches,
whose handler ends in StreamP2P::SetAnswerString(const std::string&).

That is static evidence only - TS6 has never had an answer from us to react
to, and it drops an unreadable payload silently - so the viewer re-sends the
object form after 5s if nothing connected. The first live test settles it.

Inbound offer/reconnectOffer now accept both shapes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 6107501445 Browser: watch a TS6 stream
Adds web/src/stream.ts, the receive-only RTCPeerConnection that takes TS6's
SDP offer out of notifyrespondjoinstreamrequest, trickles ICE both ways over
notifystreamsignaling and hands the remote MediaStream back.

App.tsx only wires it up: a client with client_is_streaming gets a requeststreaminfo
(that property is the *only* way a late joiner learns a stream is running), a
badge in the tree, a context-menu entry and a floating video panel.

Also adds the missing requestStreamInfo path in the gateway - the connector
already had `streaminfo <clid>` on stdin, nothing could reach it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 11a413d2b6 Add requeststreaminfo so late joiners can find a running stream
Verified end to end against a live TS6 client: the passthrough delivers
notifyrespondjoinstreamrequest with the full SDP offer plus 18 iceCandidate
notifies, all correctly unescaped.

Getting there turned up a gap. A client entering a channel where a stream is
already running receives no stream command at all - 35 s in the channel
produced zero undeclared commands. Discovery runs over the ordinary
client_is_streaming property instead, and the stream id has to be pulled per
client with requeststreaminfo. Without that, only a viewer who happened to be
present when the stream started could ever join.

The unknown-command names now go to stderr, which is what made the difference
between "the server sent nothing" and "we filtered it out" visible at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Opus 5 9f1a63c9d3 Pass TS6 stream signaling through connector and gateway
tsclientlib dropped every command missing from the message declarations,
which silently swallowed TS6's whole Stream/Call signaling exchange: none of
the stream commands are declared, so notifystreamsignaling never reached a
consumer. That is why the protocol could only be captured with a standalone
raw-tsproto tool.

handle_command now splits the parse failure - ParseError::UnknownCommand hands
the raw line up as StreamItem::UnknownCommand instead of warning and returning,
everything else keeps the old behaviour.

The connector unescapes the TS wire format and forwards the stream commands as
a streamEvent, filtered to notifystream*/notifyrespondjoinstream* so unrelated
undeclared commands stay dropped. The JSON payload stays opaque the whole way -
SDP and ICE belong to the browser's RTCPeerConnection, not to the connector.
Outbound, streamjoin/streamleave/streamsignal join the existing raw OutCommand
handlers; parameter names and order are as recovered from TeamSpeak.dll and
confirmed against a live TS6 client.

The gateway serializes the payload itself so no literal newline can reach the
line-based stdin protocol.

Nothing renders video yet - the browser side is still missing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-09-11 05:26:33 +00:00
MoepchiandClaude Sonnet 5 7776a71e84 Harden and polish the feedback endpoint
- Honeypot field ("website", hidden via CSS + tabIndex -1): any
  non-empty value silently short-circuits to a fake success response
  without logging or filing anything, at near-zero cost to real users.
- Tag created GitHub issues with the feedback category (bug/idea/
  other) alongside the existing "feedback" label, for easier triage -
  GitHub auto-creates labels that don't exist yet.
- Rotate feedback.log once it crosses 5MB (move to feedback.log.1) so
  a busy instance doesn't grow the file unbounded.
- Push the nudge bubble's cooldown out from the moment someone
  actually submits feedback, so it doesn't ask again shortly after
  they just did.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 09:15:05 +02:00
MoepchiandClaude Sonnet 5 5b5f4caf79 Add PWA update prompt instead of silent stale caching
Previously the service worker used registerType: 'autoUpdate' with
the default injected register script - a new deploy would install
and activate a new SW in the background, but an already-open tab
kept running the old JS/CSS from memory with no indication a newer
version existed, short of a manual hard reload (or clearing SW/
caches by hand, which we had to do repeatedly while verifying
deploys this session).

Switch to registerType: 'prompt' and register the SW ourselves via
virtual:pwa-register/react (useRegisterSW), showing a small "new
version available" toast with a reload button when an update is
waiting. Also poll registration.update() hourly so long-lived tabs
notice updates without needing a fresh navigation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 09:13:15 +02:00
MoepchiandClaude Sonnet 5 dc35526727 Fix mobile dropdown menus overflowing off-screen
Each menubar dropdown (Extras, Rechte, ...) opened flush with the
left edge of the specific menu item that triggered it. On a narrow
screen, any item not near the left edge (e.g. Extras) opened a
260px-wide panel that ran off the right side of the viewport.

On mobile, anchor the dropdown to the whole menubar instead of the
individual item, and let it span (almost) the full width with a
max-height + scroll for long lists (Extras has a lot of entries).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 08:44:16 +02:00