Commit Graph
29 Commits
Author SHA1 Message Date
Moepchi 9702c671e8 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.
2026-09-06 00:20:33 +02:00
Nico B. e9ee12c7b5 Add TeaSpeak/GTS support, multi-join & GTS theme
Adds TeaSpeak/GreenTeaSpeak protocol support and multi-join session tabs plus a GreenteaSpeak UI theme. Key changes: connector (Rust) supports --server-type, privilege key, server variables, license formatting, Query-client filtering and extra metrics; gateway accepts serverType/privilegeKey, optional static serving (WEB_STATIC), and per-tab /ws sessions; web frontend: multi-session parking (connectionSessions), channel spacer parsing, talk-lamp UI, extended server connection info, connect dialog serverType/privilegeKey, GreenteaSpeak CSS & chrome, i18n updates, and demo updates. Also adds docs/teaspeak.md and dependency num-traits.
2026-09-05 22:45:21 +02:00
Moepchi b7ef6f78e7 Add server group icon badges and a 'no talk power' status icon
Group icons were entirely missing from the data model - GroupEntry only
carried id/name. Added icon_id (from ServerGroup/ChannelGroup's Icon field)
through connector -> gateway -> frontend, matching the same channel-0
icon_<id> file convention already used for server icons (#77), reusing
that dialog's fetch/cache/render plumbing (serverIconImages, iconDataUrl).

Client rows now render a small badge per server group with a non-zero
icon, positioned after the name/status icons (i.e. on the right), instead
of not existing at all. Also added a 🔒 status icon for clients who aren't
muted but still can't talk due to insufficient talk power in a moderated
channel (previously no icon indicated this state at all).
2026-08-10 19:11:03 +02:00
Moepchi 6e343c4d4c Fix talking indicator: also respect missing talk power in moderated channels
The previous fix only accounted for the local mute toggle. In a moderated
channel (one with a talk power requirement) a client without sufficient
talk power still has selfActive/VAD firing locally and no local concept of
whether they're actually allowed to transmit, so the indicator stayed on
regardless.

The connector now computes has_talk_power per client from the book state
(talk_power_granted || talk_power >= channel.needed_talk_power), mirroring
tsclientlib's own internal intern_can_send_audio moderated-channel check,
and threads it through gateway and frontend. The talking indicator (both
the own-client injection into displayTalkers and the general per-client
render in ChannelTree) now requires hasTalkPower too.
2026-08-10 18:47:37 +02:00
Moepchi ea7b97b161 Add full permissions editor window (#71)
The "Rechte" top menu's four previously-disabled items now open a tabbed
editor matching the real TS3 client's window: Server Gruppen, Client
Rechte, Channel Rechte, Channel Gruppen, Channel Client Rechte. For each
tab you pick a group/channel/client (or combination), see its currently
assigned permissions in a filterable table, add new ones from a searchable
catalog, and remove existing ones.

Connector: new servergrouppermlist/channelgrouppermlist/channelpermlist/
clientpermlist/channelclientpermlist request handling (unified behind one
"permlist <scope> ..." stdin command and a single-target pending-list
mechanism, mirroring the existing permoverview pattern's name-resolution
cache) plus servergroupaddperm/-delperm, channelgroupaddperm/-delperm,
channeladdperm/-delperm, clientaddperm/-delperm, channelclientaddperm/
-delperm for mutating them, and a "permissionlist" command to expose the
full permission catalog (needed for the "add permission" picker).

Verified against the real server: permission list/catalog requests reach
the server correctly. The test guest account turns out to lack rights to
see permission names/IDs at all (server replies with only the hierarchy's
group-boundary markers, no populated permid/permname) - same class of
account-permission ceiling as banlist/file uploads/etc. earlier in this
project, not a bug in this feature. Add/remove wire commands support both
numeric permid and permsid addressing per the protocol, so this should
work fully for an account with actual view rights (e.g. the real server
admin), even though it couldn't be exercised end-to-end with this guest
account. Full interactive verification (list, add, remove) done in demo
mode instead.

"Rechteübersicht" (viewing another client's computed effective
permissions with grant provenance) stays disabled - a materially
different feature the connector doesn't support.
2026-08-06 00:16:30 +02:00
Moepchi 7901aafbb1 Add file transfer support (#83)
Channel-scoped file browser reachable via right-click on a channel:
navigate directories, create folders, rename/delete, and upload/download
files. Backed by tsclientlib's built-in download_file/upload_file (which
already handles the ftinitdownload/ftinitupload -> TCP data-port dance),
plus raw ftgetfilelist/ftcreatedir/ftdeletefile/ftrenamefile commands for
everything else. Downloads/uploads are buffered whole in memory and
base64-relayed over the existing stdin/WebSocket text protocol - fine for
a channel filebase's typical file sizes, not meant for huge transfers.

Verified against the real server: upload/list/download round-trip reaches
the server correctly (list succeeds, upload correctly surfaces the
guest account's missing permission via the new FiletransferFailed
handling instead of hanging or crashing).

Demo mode gets a small in-memory per-channel filesystem so the file
browser is fully interactive in the GitHub Pages demo too.
2026-08-05 22:39:35 +02:00
MoepchiandClaude Sonnet 5 41ac845fbc Add read-only permission overview ("Eigene Rechte anzeigen")
Partial progress on #71 (full permissions editor). A genuine full
editor - server/channel/group permission grids across 5 permission
scopes with add/remove/modify for hundreds of possible permissions -
is a much bigger undertaking than fits in one pass, so this lands a
real, useful slice of it first: a read-only view of the caller's own
effective permissions in their current channel.

- Connector: "permoverview" (raw command, no typed builder exists)
  requests the caller's effective permission set for cid+cldbid.
  Permission IDs are opaque numeric values server-side, so results are
  name-resolved via a "permissionlist" id->name/description lookup
  that's fetched once and cached for the connection's lifetime. The two
  requests are chained (list first, overview second) with buffering in
  case the overview reply somehow arrives first.
- Gateway: typed passthrough for the merged, name-resolved entries.
- Frontend: new dialog wired to "Eigene Rechte anzeigen" in the Rechte
  menu (previously disabled) - a filterable table of permission
  name/value/negated/skip.

Verified against the real server: initially got a clean
"ParameterNotFound" error revealing that permoverview needs an
explicit permid=0 ("all permissions") even though tsclientlib's
generated type treats it as optional; after adding that argument the
command reaches the server correctly and returns the expected
permission-denied response for the guest test account (same pattern
as every other admin-gated feature this session).

The remaining scope of #71 - editable server-group/channel-group/
channel/client permission grids - is unchanged and left for later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 21:35:09 +02:00
MoepchiandClaude Sonnet 5 0f8576ac6c Add ServerQuery Login dialog
Wires up the previously-disabled "ServerQuery Login" Extras menu item
with a username/password form. Sends the raw TS3 "login" command
(client_login_name/client_login_password) over the existing
connection - no typed builder exists for it upstream, same situation
as the other raw-command features this session. Credentials are
base64-encoded over the connector's stdin protocol (rather than naive
space-splitting) so passwords with spaces or special characters
survive the trip intact.

Fire-and-forget like kick/ban: the dialog closes on submit and relies
on the existing generic error/permission-error event path for
feedback. Verified against the real server end-to-end - bogus
credentials round-tripped through connector -> gateway -> frontend
and surfaced as a clean error event (this particular server responds
"NotImplemented" to post-connect query login, which is itself proof
the command reached the server and got a real protocol-level reply).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 21:02:16 +02:00
MoepchiandClaude Sonnet 5 db8b5ea958 Complete client context menu: channel/server group assignment
Fills out the last two disabled entries in the client right-click menu
(#72): "Channel-Gruppe zuweisen" and "Server-Gruppe zuweisen".

- Connector: exposes each client's database_id, channel_group, and
  server_groups (already present in tsclientlib's bookkeeping Client
  struct, just not threaded through before) on the "channels" snapshot.
  Adds raw commands for channelgrouplist/servergrouplist (list requests,
  same InMessage pattern as banlist/complainlist) and
  setclientchannelgroup/servergroupaddclient/servergroupdelclient
  (assignment, fire-and-forget like kick/ban).
- Gateway: typed passthrough for the new client fields and five new
  message types (getChannelGroupList, getServerGroupList,
  setChannelGroup, addServerGroup, removeServerGroup).
- Frontend: new GroupAssignDialog reused for both channel groups
  (single-select, closes after assigning) and server groups
  (multi-select, checkmarked entries toggle add/remove and the dialog
  stays open). Demo mode simulates real group membership changes,
  including live re-render after assignment.

Verified against the real server: the client's own database_id/
channel_group/server_groups now flow correctly end-to-end (confirmed
via a throwaway gateway test script). The list-request commands are
permission-gated for the guest test account and decline silently, same
as serverlog/serverconninfo before them - the dialog's existing 6s
"unavailable" timeout already covers this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 20:40:52 +02:00
MoepchiandClaude Sonnet 5 dbe9a3c2df Add offline messages (Offline Nachrichten) dialog
Wires up raw TS3 protocol commands for offline messages, since
tsclientlib's generated code has no typed builder for them (same
situation as banlist/complainlist in the previous feature):

- Connector: messagelist, messageget, messageadd, messagedel,
  messageupdateflag as raw OutCommand invocations. Replies parsed via
  the existing StreamItem::MessageEvent pending-flag pattern, reusing
  InMessage::OfflineMessageList (list, no body) and InMessage::OfflineMessage
  (single message with full body, response to messageget).
- Gateway: typed events/methods threading the new commands from
  WebSocket clients through to the connector's stdin protocol.
- Frontend: new "Offline Nachrichten" dialog in the Extras menu with a
  message list (subject/from/timestamp, unread dot), a detail view
  (full body + mark-as-read), delete, and a compose form to send a new
  message to a target client UID. Demo mode gets one scripted message.

Verified against the real test server (192.168.178.108): messagelist
returns a clean DatabaseEmptyResult error for an account with no
messages (falls back to the dialog's existing 6s "unavailable" timeout,
same as banlist/complainlist), and messageadd correctly surfaces a
permissionError for a guest account lacking send rights - both proving
the raw command round-trip works end to end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 19:57:05 +02:00
MoepchiandClaude Sonnet 5 bd0122812d Add Bannliste and Beschwerdeliste management dialogs
Implements #91 (ban list) and #92 (complaint list), reusing the
StreamItem::MessageEvent handling infrastructure added for #94.

Connector:
- New raw commands: banlist, bandel, bandelall, complainlist,
  complaindel, complaindelall (no typed builders exist for these).
- New pending_ban_list/pending_complain_list flags + MessageEvent
  match arms parsing InMessage::BanList/ComplainList replies into
  BanListEntry/ComplainListEntry structs, emitted as banList/
  complainList events.
- Unlike serverlog/serverconninfo, the test server actually replies
  with an error return code for these (surfaced as a "permission
  error" Server-tab log line) rather than staying silent - the
  connector already handles that path via the existing pending
  message result matching.

Gateway: getBanList/deleteBan/deleteAllBans/getComplainList/
deleteComplaint/deleteAllComplaintsFor methods and message cases,
plus camelCase remapping for the two new event types.

Frontend: BanListDialog and ComplainListDialog components (table
view, per-row delete + delete-all for bans, optimistic local removal
on delete), wired into the Extras menu (previously disabled
placeholders), with the same 6s timeout-to-"unavailable" fallback
pattern used by the other async-reply dialogs. Demo mode gets fake
ban/complaint entries.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 13:08:01 +02:00
MoepchiandClaude Sonnet 5 4318ce359f Add Server Protokoll dialog
Adds the first StreamItem::MessageEvent handler in the connector's
event loop (previously dropped by a catch-all) - needed because log
lines aren't part of the bookkeeping data model, unlike client/server
connection info, so they only ever arrive as a raw notifyserverlog
reply rather than a book-state update. This unblocks the same pattern
for Bannliste/Beschwerdeliste next.

Sends "logview" via tsclientlib's typed Server::log_view() builder,
requesting the last 200 lines. Verified end-to-end against the real
server (though a permission-gated account got no reply at all there -
the frontend dialog now falls back to a "no response" message after a
timeout instead of loading forever, matching the connection-info
dialogs' existing behavior).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 12:45:59 +02:00
MoepchiandClaude Sonnet 5 181b0fc43b Add "Virtuellen Server editieren" dialog
Wires up tsclientlib's typed Server::edit() builder (name, welcome
message, password, host message/banner/button settings, nickname,
phonetic name, codec encryption mode) through a new "serveredit"
stdin command. Frontend dialog has Host and Verschiedenes tabs fully
implemented, with Übertragung/Anti-Flood/Sicherheit/Protokoll shown as
not-yet-implemented placeholders (their fields have no typed setter in
tsclientlib's generated bindings, would need hand-built raw commands).

Entry point is a new link in the server info panel, next to the
connection-info one added earlier. Every field is optional in the
payload - blank means "leave unchanged" - except the password field,
which has an explicit "remove password" checkbox for the clear case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 12:08:43 +02:00
MoepchiandClaude Sonnet 5 330ecccadb Add kick and ban to the client context menu
Wires up "Aus dem Channel kicken", "Vom Server kicken", and "Bannen"
(previously disabled placeholders). Kick uses tsclientlib's typed
Client::kick() builder; ban has no typed wrapper so it's built as a
raw "banclient" command (same OutCommand::write_arg approach used for
the connection-info requests). Both use send_with_result() so a
missing-permission rejection surfaces as a visible error.

"Channel-Gruppe zuweisen"/"Server-Gruppe zuweisen" remain disabled -
they need the server's group list threaded through first, left for a
follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 11:21:52 +02:00
MoepchiandClaude Sonnet 5 74f688aba8 Add client and server connection-info windows
Sends raw getconnectioninfo/serverrequestconnectioninfo commands and
reads the reply out of tsclientlib's bookkeeping state (it already
tracks ping, packet loss, bytes/packets sent+received internally -
just needed to be requested and surfaced). Wired into the client
context menu (any client), the Selbst menu (self), and a new link in
the server info panel.

Uses send_with_result() so a permission-denied rejection surfaces as
a visible error instead of silently doing nothing; the dialogs also
fall back to a "no response" message after 6s in case the server
declines without any reply at all (observed against a real server
where a guest lacked b_virtualserver_connectioninfo_view).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-04 22:42:23 +02:00
Moepchi 7bcced06fd Add Kontakte (contacts) feature
Threads the client's persistent unique identifier through the
connector/gateway/frontend pipeline (previously only the ephemeral
session client id was exposed) so contacts can be keyed by the same
person across reconnects, not by name. The Kontakte dialog supports
adding currently-online clients, per-contact category/phonetic name,
ignoring (filters their chat messages), and quick-whisper/show actions
that reuse existing whisper and channel-selection logic.
2026-08-04 18:37:49 +02:00
Moepchi f5cb4dd160 Add Whisper Verlauf dialog and complete the Selbst menu
Whisper Verlauf logs outgoing whisper-target changes with timestamps
(incoming-whisper detection isn't observable yet, so it's outgoing-only
for now). The Selbst menu now wires Abwesend/Mikrofon/Lautsprecher to
the existing toolbar actions and adds a real nickname-change flow,
backed by a new "nickname" connector command using tsclientlib's
existing client_update().set_name().
2026-08-04 18:14:04 +02:00
Moepchi 5858631e6d Add whisper (targeted voice to channels/clients)
Connector: a new "whisper <channelIds>;<clientIds>" stdin command sets
persistent whisper targets; outgoing audio then goes out as
AudioData::C2SWhisper instead of the normal C2S broadcast until
"unwhisper" clears it. Gateway relays a setWhisperTargets message the
same way.

Frontend: a toolbar toggle lists channels as checkboxes, and the
client context menu gets an "add/remove as whisper target" entry;
selecting any target switches all subsequent outgoing voice to
whisper mode.

Verified against the real test server: setting a channel target and
sending a frame produced no connector error, and clearing targets
resumed normal voice cleanly.
2026-08-02 14:41:54 +02:00
Moepchi 7217bc146a Persist client identity across sessions
Previously every connect generated a fresh tsclientlib identity, so
the server saw a new client UID each session. The connector now
accepts a saved identity via --identity and always reports the one
actually used (freshly generated or reused) back in the "connected"
event; the frontend round-trips it through localStorage so
reconnecting keeps the same UID.

Verified end-to-end against the real test server: two separate
connects with the identity carried over produced byte-identical
identity blobs.
2026-08-02 14:29:00 +02:00
Moepchi 3644ae7c41 Show country flags next to client nicknames
Threads TeamSpeak's per-client country_code field through the
connector snapshot and gateway relay, then renders it as a flag
emoji (regional indicator symbols, no image assets needed) next to
the nickname. Renders nothing when the server has no geo-IP data for
a client (most common on non-official/self-hosted servers).
2026-08-02 14:15:39 +02:00
MoepchiandClaude Sonnet 5 42f82d49aa Add Server Log tab notifications for client/channel/permission events
Surfaces join/leave/channel-switch/group-assignment/channel- and
server-edit events inline in the Server tab, matching the native TS3
client's behavior. Own missing-permission errors are shown; other
clients' permission failures are not. Sourced from tsclientlib's
book-event diffs rather than admin-only ServerQuery logs, so it works
for any connected user regardless of log-view permissions. Also
upgrades the channel-switch command to report permission errors
instead of failing silently, and adds a scripted demo-mode preview of
the feature for the GitHub Pages demo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-01 10:54:18 +02:00
MoepchiandClaude Sonnet 5 8fb6d72957 Implement Nachrichten options panel: named away-message presets + disconnect message
Wires up the previously placeholder-only "Nachrichten" options section: users can now save/delete named away-message templates and set a default leave message that's sent to the server (via DisconnectOptions) when disconnecting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 23:22:08 +02:00
Moepchi c48534dbc4 Add Docker deployment and fix crash in insecure (non-HTTPS) contexts
Adds a multi-stage Dockerfile (Rust connector + gateway + web build) and
docker-compose.yml for running the whole stack as a single container behind
a reverse proxy; the gateway now serves the built web app and the WebSocket
endpoint (/ws) from one port, and the frontend derives its gateway URL from
window.location in production instead of a hardcoded localhost address.

Also guards all navigator.mediaDevices usage against being undefined, which
happens when the page is loaded over plain HTTP on a non-localhost address
(not a secure context) - previously this crashed the whole React app on
mount instead of just disabling the affected voice features.
2026-07-29 18:45:23 +02:00
Moepchi 3715a52de6 Add Favoriten menu, Away/AFK status, and mic/output mute toggles
Implements the real TS3 client's Favoriten menu (add/manage/list, with a
FavoritesDialog), the toolbar Away/AFK dropdown with saved presets and an
AwayDialog, plus input/output mute toggle buttons on the toolbar. Reorders
the toolbar to AFK -> Mic -> Speaker -> Theme and removes the standalone
Connect button in favor of the Verbindungen menu.
2026-07-29 17:24:56 +02:00
Moepchi 53e2887e14 Add Verbindungen menu, TS3-style Connect dialog, and layout restructure
- Replace inline toolbar connect fields with a modal Connect dialog matching
  the real TS3 client's layout, including a functional Standard Channel field
  wired through a new connector --default-channel flag
- Add a Verbindungen dropdown menu (Verbinden/Aktuelle Verbindung trennen/
  Alle Verbindungen trennen) with click-outside/Escape close and Ctrl+S/Ctrl+D
  shortcuts
- Restructure layout: chat area (messages/tabs/input) now spans the full
  width at the bottom; right side shows a separate, non-scrollable server
  banner (object-fit scaled, shown only when set) above the client/server
  info panel; tree width and upper-area height are now drag-resizable
- Surface server version, license, and banner URL from tsclientlib through
  the connector and gateway
2026-07-29 16:38:40 +02:00
MoepchiandClaude Sonnet 5 95a3761235 Rework layout to match the real TS3 client's structure
Adds a menu bar, an icon-based toolbar, and splits the right side into
a channel/server info panel (topic, codec, password, client count) on
top of the chat log - previously a single click switched channels, now
that only selects/shows info while a double-click actually joins, like
the native client. Required exposing a few more real protocol fields
from tsclientlib (channel codec/topic/max clients/password, server
name/max clients) that weren't surfaced before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 21:31:45 +02:00
MoepchiandClaude Sonnet 5 ec034d2d6b Add client poking (send and receive)
Uses tsclientlib's existing MessageTarget::Poke support end to end: a
poke button on each client row opens a small compose overlay (an
optional message, like TeamSpeak's own poke), and incoming pokes show
as a dismissible, auto-expiring banner.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 20:51:50 +02:00
MoepchiandClaude Sonnet 5 76cb90360c Add server/channel passwords, connection autofill, and client status icons
Server/channel passwords are now optional connect fields (hidden behind a
lock toggle so the normal flow stays uncluttered). The last successfully
used server/nickname is remembered via localStorage and autofilled on
load. The channel tree now shows per-client status badges (channel
commander, away, mic muted, deafened) sourced directly from tsclientlib's
existing client data.

Also credits Claude Code in the README, since it wrote the vast majority
of this project's code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 20:41:29 +02:00
Moepchi b3e55a60b5 Initial commit: browser-based TeamSpeak client
React frontend + Node gateway + Rust connector (tsclientlib) providing
connect, channel tree/switching, channel/server/private text chat, and
voice with voice activation and output device selection.
2026-07-28 19:25:46 +02:00