diff --git a/.impeccable/design.json b/.impeccable/design.json new file mode 100644 index 0000000..5cc9de1 --- /dev/null +++ b/.impeccable/design.json @@ -0,0 +1,98 @@ +{ + "schemaVersion": 2, + "generatedAt": "2026-11-01", + "title": "Design System: TeamsPeach", + "extensions": { + "shadows": [ + { "name": "context-menu", "value": "1px 1px 2px 0 rgba(0, 0, 0, 0.2)", "purpose": "Official .ts-context-menu shadow; menus, device menus and composer submenus." }, + { "name": "notification", "value": "#000 4px 8px 5px 0 at opacity .25", "purpose": "Official .ts-notification ::after plate shadow for toasts." } + ], + "motion": [ + { "name": "tree-pill", "value": "150ms ease-out (32ms while hovered)", "purpose": "Channel pill growth from 7/10 to 4/7 insets." }, + { "name": "action-magnify", "value": "100ms ease-out scale(1.15)", "purpose": "Toolbar and status-bar icon hover." }, + { "name": "stream-controls", "value": "opacity 120ms, transform 80ms", "purpose": "Stream tile control bar reveal." }, + { "name": "toast-entrance", "value": "180ms cubic-bezier(0.16, 1, 0.3, 1)", "purpose": "Single toast entrance; disabled with reduced motion." } + ], + "breakpoints": [ + { "name": "pane-compressed", "value": "440px", "purpose": "Official tsv-view-size-category-h-compressed: 10px side padding." }, + { "name": "settings-in-sidebar", "value": "900px", "purpose": "The same settings categories node moves into sidebar resources below this width." }, + { "name": "sidebar-collapse", "value": "200px", "purpose": "Sidebar slot snaps to the 62px rail below this width." } + ], + "slots": { + "sidebar": "270px default, 420 max, 52/62/72px rail for Small/Medium/Large", + "server": "500px default, 220 min", + "detail": "flexible, 295 min" + }, + "source": "TeamSpeak 6.0.0.5163 installed client: main.css sha256 bc700401d04954d0…, main.js sha256 9d6bea2ee5333086…; extracted values in docs/evidence/official-parity/." + }, + "components": [ + { + "name": "Filled action", + "kind": "button", + "refersTo": "button-filled", + "description": "Official .tsv-button-filled: blue gradient pill for the primary action.", + "html": "", + "css": ".ds-filled{font:450 15px/22px 'Noto Sans',sans-serif;padding:4px 20px;min-height:26px;border:0;border-radius:100px;background:linear-gradient(60deg,#0058FF,#1365BB);color:#fff;cursor:pointer}.ds-filled:hover{background:#1c82cc}.ds-filled:focus-visible{outline:2px solid #1588FA;outline-offset:2px}.ds-filled:disabled{opacity:.4;cursor:default}" + }, + { + "name": "Toolbar pill", + "kind": "toolbar", + "description": "Official central toolbar: 26px pill on --tsv-bg, icon buttons split by 1px strong-bg lines.", + "html": "
", + "css": ".ds-pill{display:inline-flex;height:26px;padding:0 20px 0 10px;border-radius:100px;background:#2b3346}.ds-pill button{position:relative;padding:0 10px 0 0;border:0;background:none;color:#fff;cursor:pointer}.ds-pill button:not(:last-child)::after{content:'';position:absolute;right:4px;top:2px;bottom:2px;width:1px;background:#0B1124}.ds-pill button[aria-pressed=true]{color:#CC3838}" + }, + { + "name": "Labelled field", + "kind": "input", + "description": "Official ts-text-input: 26px, tsv-bg fill, 1.5px transparent border turning tint on focus.", + "html": "", + "css": ".ds-field{display:grid;gap:4px;font:450 14px/18px 'Noto Sans',sans-serif;color:#fff}.ds-field input{font:inherit;min-height:26px;padding:2px 10px;border:1.5px solid transparent;border-radius:4px;background:#2b3346;color:#fff}.ds-field input::placeholder{color:#697A97}.ds-field input:focus-visible{outline:none;border-color:#1588FA}" + }, + { + "name": "Settings category list", + "kind": "nav", + "description": "44px rows; selection fill #282F40 with a 4px tint bar and tinted icon.", + "html": "", + "css": ".ds-nav{display:grid;padding:8px 10px 8px 20px;background:#2b3346}.ds-nav button{position:relative;font:450 14px 'Noto Sans',sans-serif;min-height:44px;text-align:left;padding:0 20px;border:0;border-radius:4px;background:transparent;color:#fff;cursor:pointer}.ds-nav button:hover{background:#222A3C}.ds-nav button[aria-current]{background:#282F40}.ds-nav button[aria-current]::after{content:'';position:absolute;left:0;top:6px;bottom:6px;width:4px;border-radius:100px;background:#1588FA}" + }, + { + "name": "Group tag", + "kind": "chip", + "description": "Server-group name beside a nickname in the tree: header-bg chip, 13px subtitle text.", + "html": "Admin", + "css": ".ds-group{display:inline-block;max-width:14ch;padding:0 5px;border-radius:6px;background:#1C2539;color:#697A97;font:450 13px/17px 'Noto Sans',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}" + }, + { + "name": "Settings section", + "kind": "card", + "refersTo": "settings-section", + "description": "Official .ts-widget-wrapper: header-bg, radius 15, 8px 20px padding, 15px semibold title.", + "html": "

Microphone

Capture device

", + "css": ".ds-card{display:grid;gap:16px;padding:8px 20px 20px;border-radius:15px;background:#1C2539;color:#fff;font:450 14px/18px 'Noto Sans',sans-serif}.ds-card h2{margin:8px 0 0;font-size:15px;line-height:19px;font-weight:600}.ds-card p{margin:0;color:#697A97;font-size:13px}" + } + ], + "narrative": { + "northStar": "The official TeamSpeak 6 client, value for value", + "overview": "TeamsPeach targets the installed TeamSpeak 6 interface using extracted theme tokens, source component geometry and the three-slot window. The independent name/icon, local offline onboarding and omission of account-bound surfaces are deliberate exceptions. Source matching does not itself prove rendered or functional identity.", + "keyCharacteristics": [ + "Navy dark theme (#2b3346 / #222A3C / #121A2C) with #1588FA tint; matching official light theme.", + "Three slots: 270px sidebar (62px rail), 500px server tree, flexible detail pane.", + "Noto Sans at 15/19 weight 450; official row heights 44/40/30/23.", + "Depth from the official background ladder, not shadows." + ], + "rules": [ + { "name": "The Source Rule", "body": "Take target values from the installed official client with offsets in docs/evidence/official-parity/; verify actual composition with isolated screenshots and document differences.", "section": "overview" }, + { "name": "The Account-Free Rule", "body": "Omit cloud-only controls (bell, contacts, presence, Setup Chat) rather than showing controls that do nothing.", "section": "components" } + ], + "dos": [ + "Do keep native caption overlay colours equal to the window-bar token.", + "Do keep stock --tsv-* tokens at (0,1,0) specificity for local theme files.", + "Do document every deviation from the official client in DESIGN.md." + ], + "donts": [ + "Don't reinterpret or restyle the official look.", + "Don't ship TeamSpeak logos, label artwork or bundle files.", + "Don't claim feature parity from visual parity." + ] + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 657e059..7645e67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,144 @@ # Changelog +## Unreleased + +- Reworked the interface against the actual installed TeamSpeak frontend rather than the earlier + hand-reconstructed component sheet: original non-brand SVG artwork, Noto Sans 2.013, channel and + client chat layouts, membership event rows, sidebar actions, in-pane administration, settings + dropdowns/sliders and the two-stage broadcast dialog. Independent branding and account-free + behavior remain. Artwork provenance does not grant redistribution rights. +- Corrected sidebar group geometry and moved New Connection into its own account-free action slot; + bookmark add/search/disclosure retain their real persistence/navigation behavior. Language and sidebar + icon-mode selectors use original local artwork, content-based widths and restored keyboard focus. + Audio device captions use the observed system-default alias, not an inferred physical device. +- Matched device-field, VAD selector, slider, record-test and display-preview geometry to source values. + Fixed the chat spacer to use the composer's content-box height, removing a two-pixel full-history offset. +- Preserve a bottom-pinned chat on window reflow without forcing readers of older history to the end. + The regression reproduced a 119px gap after narrowing; the packaged fix retains a zero gap and + separately preserves the history reader's position. The paired harness retains this behavioral check. +- Match chat scrollbar safe-area width and system-event wrapping to the actual original renderer; + restore the localized empty-chat prompt with real draft/send-state visibility. Narrow composer tools + now overflow into working ordered menus rather than clipping. Settings categories occupy the original + narrow-sidebar position below Servers/New Connection, with source-sized previews and server columns. +- Run both sides of visual QA with Electron's normal acceleration policy. Earlier reference captures + forced software rendering while the product did not; those comparisons remain historical evidence, + not directly comparable pixel baselines for the corrected capture policy. +- Actual whole-screen comparison still does not meet the 1:1 acceptance criterion. The refreshed 168-pair + run has no blocked captures but no fully passing screen pairs. Viewport-only timestamp comparison and + nested native-caption exclusions now avoid earlier harness false positives; thresholds are unchanged. + See `docs/evidence/official-parity/qa-parity-harness.md` for build-specific results and remaining differences. +- Initialize custom controls explicitly at renderer startup, not when audio/notification modules + import the slider helper. The Node suite and focused packaged chat/control smoke checks pass; + this does not establish complete visual or native platform parity. +- Added local TS6 theme extensions (Settings → Appearance → User Theme): the official `package.json` + schema, `//` selection, stock fallback and a five-minute list cache with Reload. + Files load only through the restricted `tsext:` scheme (selected variant CSS, fonts, images, previews); + `@import`, remote URLs, links and path traversal are rejected and reads are bounded. Account-free; no + store or Remote Apps. Compatibility covers the package format and `--tsv-*` tokens, not official DOM + class hooks. +- Added account-free local identity management: additive import, selected-identity export, per-identity + names/nicknames, default and bookmark selection, guarded deletion, and resumable/cancellable bounded + security-level improvement. Active connections retain their chosen identity. +- Added simultaneous connection records with one isolated native core per server, explicit viewed/input + connection routing, connection-local chat, streams, recording and administrative operations. +- Added channel/server administration, local whisper lists and held targets, general legacy file browsing + and transfers, server snapshots, recording, notifications, and OS-specific local settings. Available + functionality and unverified native protocol branches are listed separately in the compatibility matrix. +- Migrated audio preferences to per-device capture/playback profiles and the official piecewise dB fader; + existing voice choices are converted on load. Automatic/hybrid/level activation, PTT release delay, + notification routing and independent processing are implemented without claiming native-DSP identity. +- Added connection/identity-scoped disk chat history, independent drafts/unread state, local rich text, + emoji/math/diagrams and server-file links. Remote images require explicit consent; account-only Matrix + editing, reactions and read receipts are not included. Local vendor assets carry redistribution notices. +- Recording finalization preserves dropped-tail timing and counts actual published bytes. Notification + event overrides and the event log are independent. Theme loading rejects directory escapes and remote + content; Small/Medium/Large and compact/detailed appearance settings use source-backed values. +- File Transfer settings apply app-wide directional concurrency and pacing limits across server tabs, + including snapshot transfers. The remembered destination is main-approved; no renderer-provided host + path is accepted and an unavailable folder never silently changes the destination. +- Unversioned legacy sidebar widths migrate lazily to the server-pane width for the three-pane layout. + Reading preferences does not rewrite the file; the next successful save records layout version 2, + while existing new-layout choices remain unchanged. +- Added a bounded ten-second in-memory microphone record/listen test using the selected output device. + It never sends test audio to a server; Finish, device/privacy changes and closing settings clear the clip. +- Bounded microphone MessagePort backlog to 200 ms using capture-context sample timestamps; renderer + stalls no longer replay older queued speech. Capture DSP preferences and channel bitrate mapping are + unchanged. Hidden 190-second speech/silence captures and a real Opus encode/decode matrix were measured; + natural-microphone and official-client subjective quality remain unproven. +- Saved servers now use an always-visible inline heading/chevron disclosure, with persisted collapsed + state; toggling the heading never connects or navigates. Removed the old detached bookmark toggle. +- Connection information now uses vertical labelled groups instead of one column per protocol field, + with locale-aware duration, byte, rate and loss units, long-value wrapping and expandable raw records. + Member menus use measured pointer/keyboard anchors, side flipping and viewport bounds, reposition on + resize and dismiss on background scrolling rather than retaining a stale sidebar offset. +- The flat application caption follows the official 44 px palette. Windows/Linux window-controls overlay + and macOS traffic lights remain OS-owned; offscreen fixtures do not claim native Snap, fullscreen, + picture-in-picture or focus behavior. +- Application chrome no longer selects text during clicks and drags; chat, inputs and useful content remain + selectable. Removed the redundant audio-muted banner and transmission-mode/key header hint without + changing mute/deafen or push-to-talk safety. The host banner now sits behind the server header card. +- Added separate channel-member collapse chevrons with compact avatar summaries and per-server persistence, + plus a bounded sidebar divider supporting pointer and keyboard resize/reset. +- Watched screen shares now have independent tiles, controls and native picture-in-picture windows. Full + screen and PiP preserve their media sessions; stopping one view leaves its siblings running. The upper + stream stage can be resized or collapsed independently of chat, with saved layout preferences. +- Stream players now put the picture first: large resizable video above chat, a small name overlay, and + controls over the picture on hover or keyboard focus instead of a permanent footer. Live statistics move + into an accessible EN/RU details disclosure. New profiles start with a larger stage; existing saved sizes, + independent streams and the broadcaster's separate local-preview controls are preserved. +- Added target-bound member context menus with server-derived capability hints, explicit unknown/denied + states, guarded confirmations for moderation and permission/group changes, native bounded avatar + selection, and visible backend errors. Menus reject stale identities and connection generations. +- Per-participant voice volume uses -200..+10 dB and an independent Mute control. Reset restores 0 dB and + unmutes. Explicit committed modifiers persist by UID; session mute remains connection-local. +- Added explicit source selection, private preview and Start/Stop P2P publishing, with a muted local tile, + quality targets, per-viewer admission and a transmission-scoped UID allowlist. Capture remains opt-in; + native OS/portal support and live official-client interoperability require separate platform evidence. +- Added selected-application audio adapters for Windows WASAPI process trees and Linux PulseAudio / + pipewire-pulse streams, with bounded IPC and outgoing per-app/master gain. macOS application-audio capture + remains unavailable. The native combined capture-to-WebRTC path is not claimed proven by UI fixtures. +- Disposable UI checks now run hidden and offscreen by default, with separate profiles, denied physical + capture/permission prompts and native dialogs disabled unless a test supplies a fixture answer. The + shared launcher asserts invisible/unfocused/nonfocusable offscreen state and mutes webContents. + Packaged tests verify bundled main-process bytes match the current offscreen-safe source before launch. +- Channel clicks now browse the channel without moving voice; double-click or the explicit Join channel + action moves voice. The header explains when the channel chat still belongs to the current voice channel. +- Available screen shares appear above chat with explicit Watch actions, including multiple announced + streams; the old member-row Watch buttons are replaced by stream indicators. Browsing never subscribes. + Unavailable discovery and denied joins remain visible errors rather than fabricated streams. +- Allowed HTML fullscreen requests from the app origin while retaining the existing camera/screen-capture + restrictions. The player uses native full screen, an exit control and native Escape, keeps the same media + session, and exits on stop/end/disconnect. Request/exit failures are reported, and teardown only exits + fullscreen owned by the stream player. +- Added an isolated Electron stream-UI/media smoke with EN/RU and light/dark captures. Synthetic directory + events and local real WebRTC media are explicitly distinguished from TS6 server interoperability. +- Fixed memory growth during microphone restart/test cycles: capture processors acknowledge shutdown, + release their ports and track listeners, and close their own capture context without interrupting the + persistent playback context. Partial audio initialization is rolled back and can be retried. +- The active chat DOM now follows the existing 500-message history limit, preserving message headers and + the visible scroll anchor. Reconnect history retains server labels instead of entire server snapshots. +- Server image caching releases obsolete avatars, banners and icons when the snapshot no longer refers + to them, including downloads that finish after removal; current resources are not arbitrarily evicted. +- Core startup failures now release child/log/readiness resources on process close, including failures + without an exit event. Core stderr applies lossless log-stream backpressure. +- Screenshare lifecycle: duplicate/unknown per-stream stop notifications no longer remove sibling shares; + cancellation stops queued ICE/offer work, releases closed peer connections, and avoids retaining stopped + sessions through empty translated-label callbacks. Added isolated generated-media pipeline/lifecycle + evidence; no codec, bitrate or throttling policy change, and no claimed FPS-cap fix. +- Added reproducible disposable-profile Electron memory workloads with generated/fake audio, native heap + and process memory evidence, and regression coverage for capture cancellation, chat and image ownership. +- Second lifecycle audit: obsolete pending image downloads no longer expose revoked URLs when a cache + key returns (A→B→A); reused client rows reload avatars when UID changes. Stream discovery ignores old + responses after newer announcements, client/channel changes or stream restarts while preserving current + failures and completing fresh discovery. Delayed output/fullscreen failures cannot report errors for + ended or replaced viewing sessions. Added disposable real-renderer interleaving and generated-WebRTC + callback regressions; the live 20 fps report remains unexplained, with no performance-policy change. +- Audio/core failure ownership: capture-processor errors stop the microphone; failed context closure + retains ownership until an explicit recovery succeeds. Explicit playback recovery settles failed + diagnostics and preserves applied volume/output selection. Core log-destination failures report an + error without crashing main or stalling stderr; exited cores reject new commands while final replies + and events drain before close. + ## 0.1.4 — 2026-10-24 Version 0.1.3 was tagged but never released: a race in the transmit-mode handshake was found before diff --git a/DESIGN.md b/DESIGN.md index 505c110..8cfe71c 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -1,69 +1,243 @@ -# Design +--- +name: TeamsPeach +description: The installed TeamSpeak 6 client's own visual system, reproduced from its source values. +colors: + tsv-bg-dark: "#2b3346" + tsv-bg-light: "#f5f5f5" + tsv-shaded-bg-dark: "#222A3C" + tsv-shaded-bg-light: "rgb(235, 235, 235)" + tsv-header-bg-dark: "#1C2539" + ts-new-header-bg-dark: "#121A2C" + tsv-contrast-bg-dark: "#0C1326" + tsv-contrast-bg-light: "#C9D9E5" + tsv-deviant-bg-dark: "#1E2538" + tsv-deviant-bg-light: "#d3d5de" + tsv-side-bar-bg-gradient-bottom-dark: "#1D2537" + presence-separator-presence-dark: "#171C2A" + strong-bg-dark: "#0B1124" + tsv-tint-dark: "#1588FA" + tsv-tint-light: "#5DA1CB" + tsv-tint2-light: "#22658f" + tsv-font-color-dark: "#FFFFFF" + tsv-font-color-light: "#1a1a1a" + tsv-font-subtitle-color-dark: "#697A97" + tsv-font-subtitle-color-light: "#445d77" + ts-third-font-color-dark: "#bbd6f3" + tsv-error-color-dark: "#CC3838" + tsv-error-light-color-dark: "rgb(255, 130, 130)" + tsv-away-color-dark: "#FF8B04" + presence-online-dark: "#17f78d" + tsv-online-color-dark: "#13F78D" + settings-highlight-bg-dark: "#282F40" + ts-tree-channel-bg-start-dark: "#192031" + ts-tree-channel-bg-end-dark: "#1D263A" + ts-tree-badges-bg-dark: "#222A3B" + tsv-chat-remote-bg-dark: "#697a97" + tsv-chat-self-bg-dark: "#0C1326" + ts-chat-system-message-bg-dark: "#131824" + ts-chat-system-message-text-color-dark: "#acacac" + tsv-chat-link-color: "#081cbd" + tsv-preview-bg-light: "#bccbeb" + ts-menu-action-color: "#8ac5fc" + tsv-separation-border-color-dark: "#1D1F20" + tsv-scrollbar-bg-dark: "#0B111D" + tsv-slider-track-bg-dark: "#131824" + ts-checkbox-bg-color-dark: "#0c0d0f" + tsv-commander-color: "#daa520" +typography: + body: + fontFamily: '"Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Fixed", "Segoe UI", Roboto, Helvetica, Arial, sans-serif' + fontSize: "15px" + lineHeight: "19px" + fontWeight: 450 + content: + fontSize: "14px" + lineHeight: "18px" + small: + fontSize: "13px" + lineHeight: "15px" + large: + fontSize: "16px" + lineHeight: "19px" + title-small: + fontSize: "24px" + lineHeight: "28px" + fontWeight: 700 +rounded: + small: "2px" + base: "4px" + large: "8px" + xlarge: "10px" + xxlarge: "15px" + xxxlarge: "20px" + pill: "100px" +spacing: + v-minimal: "2px" + v-small: "4px" + h-minimal: "5px" + v: "8px" + h-small: "10px" + v-large: "16px" + h: "20px" + h-large: "40px" +components: + button-filled: + backgroundColor: "linear-gradient(60deg, #0058FF, #1365BB)" + textColor: "#FFFFFF" + rounded: "{rounded.pill}" + padding: "4px 20px" + settings-section: + backgroundColor: "{colors.tsv-header-bg-dark}" + textColor: "{colors.tsv-font-color-dark}" + rounded: "{rounded.xxlarge}" + padding: "8px 20px" +--- -Documented from the shipped interface (`app/renderer/styles/app.css`, `index.html`) — this records what is -built, it is not an aspiration. Mode: **Operate**. Direction: the category standard of voice-chat clients, -an engineering choice for a familiar working tool, executed with a restrained peach accent. The only -owner-pinned visual reference is the TeamSpeak 6 settings screenshot that the settings layout follows. +# Design System: TeamsPeach + +## Overview + +**North Star: "The official TeamSpeak 6 client, value for value."** + +The owner asked for the installed TeamSpeak 6 client's design, without reinterpretation. Two earlier +TeamsPeach worlds (flat warm-neutral, then the Liquid Glass approximation) are retired. The target values +come from installed client 6.0.0.5163 (`main.css` sha256 `bc700401…`, `main.js` sha256 `9d6bea2e…`): theme +tokens from its webpack theme modules (`main.js` @92422 dark, @201685 light), scale tokens and component +geometry from `main.css`, layout constants from `main.js` (window slots @1273206). The extracted values +and source offsets are in `docs/evidence/official-parity/ts6spec-{shell,tree,chat,controls,settings}.md`. +The stylesheet keeps the official `--tsv-*` token names so values can be compared one to one. Source +matching, screenshot similarity and functional parity are separate evidence claims; this document is +the implementation contract, not proof that every rendered pixel or feature matches. + +The product name and application icon stay TeamsPeach's own. Non-brand interface pictograms now use +the installed client's SVG artwork; provenance and redistribution limitations are recorded in +`LICENSES/teamspeak-client-icons-PROVENANCE.md`. The official JavaScript application is reference-only, +not the product's implementation. + +## Colors + +Dark is the default for new profiles; light follows the official light module. Both are declared as +plain `:root` (dark) and `@media (prefers-color-scheme: light) :root` blocks at (0,1,0) specificity, so a +locally installed theme file can override them by order, as with the official stock theme. + +Blue `--tsv-tint` (#1588FA dark, #5DA1CB light; `--tsv-tint2` #22658f light) marks own nickname, +selection outlines, active toggles and primary actions; green (`--presence-online`) marks talking/online +and enabled toggles; red (`--tsv-error-color`) mutes and destructive actions; orange +(`--tsv-away-color`) away and warnings. Secondary text is `--tsv-font-subtitle-color`; client names +in the tree use `--ts-third-font-color` (#bbd6f3). + +## Typography + +Noto Sans variable files version 2.013 from the installed client are bundled under +`app/renderer/assets/fonts/`, with SIL OFL 1.1 in `LICENSES/NotoSans-OFL.txt`. Normal, italic and +oblique declarations follow the original font-face semantics. Body 15/19, content 14/18, small 13, +header titles 24/28 bold. Channel labels use 14px normal weight; client names use 14px semibold. +Chat names use the source hash/contrast colour calculation, with 16/19 message text and 13/15 events. ## Layout -- Two columns: sidebar `clamp(280px, 27vw, 390px)` (server header, host banner, channel tree, own-status - footer) and a workspace (connect form, or channel header + optional stream viewer + chat, or settings). -- Tree rows: channels with `#`/lock glyph, server channel icon at the right, server banner as a row - background fading from the sidebar colour; members indented under channels with avatar/status dot, - nickname (never truncated before group labels), server-configured group labels, mute/away/recording - flags, group icons and country code, and a pill-shaped Watch button for streamers. -- Settings follow the owner's pinned reference: the sidebar's room area is replaced by category navigation - (Back to server, User / Application / Information groups, active item with an accent bar and tint), - the workspace shows the selected category as titled cards (`.card`, 12 px radius) with an expandable - Details area for advanced video information. The connection, voice footer and any stream keep running. -- Saved servers sit above the tree as a compact list (name, address, action: Connect / Switch / - Connected); a bookmark button in the server header shows or hides it. -- Stream viewer: black stage with the video contained, dark control bar (title, codec · resolution · fps, - mute, volume 0–100 %, fullscreen, stop). Overlay text explains every non-live state. +The window is the official three-slot frame (`.tsv-window`): -## Colour +1. **Sidebar** `#app-sidebar`, 270px default, max 420; dragging below 200 collapses it to the 62px rail. + Header gradient #121A2C → #1D2537, activity rows 44px with an always-visible 8px-radius pill inset + 10px (4px gap), group captions 13px subtitle, footer 55px with a 3px separator inset 20px. +2. **Server pane** `#server-panel`, 500px default, min 220: 44px window bar (#121A2C) carrying the toolbar + pill (26px, `--tsv-bg`, 1px `--strong-bg` separators) with microphone and speaker; separate Away action; a 10px + inverse fillet; the server tree on the 25° gradient (#252F44 → #2E374C); the 92px server header card; + channel rows 44px with a 30px pill (inset 7/10, radius 9, 1.5px outline, channel background gradient + on by default); client rows 40px with 33px avatars and 23px status plates; the 55px status bar with + 40px side padding. +3. **Detail pane** `.workspace`, min 295, body `--tsv-shaded-bg`: 44px window bar with the native caption + overlay, 71px content header (38px icon, 24/28 bold title, segmented mode switch), 4px separator, the + stream stage, chat log and composer. -Restrained strategy: warm neutrals plus one accent; state colours only where they mean something. +Settings occupy the main and detail slots as the official settings activity does at ≥900px: category +column `clamp(30ch, 20vw, 50ch)` with 44px rows, `--settings-highlight-bg` selection and a 4px tint bar; +pages max 640px wide with section cards (`--tsv-header-bg`, radius 15, padding 8px 20px, 12px apart). +Below 900px the same settings category node moves into sidebar resources and returns on leaving settings +or widening the window. Small/Large use the official token modules (53225/68865), not browser zoom; +collapsed rail widths are 52/62/72px. The native caption bar remains 44px to match its OS overlay. -| Token | Light | Dark | Use | -|---|---|---|---| -| `--bg` | `#f6f3f0` | `#1b2029` | window ground, settings background | -| `--surface` | `#fffdfb` | `#242b37` | workspace, inputs, settings cards | -| `--sidebar` | `#eee9e4` | `#1e242e` | sidebar, settings navigation | -| `--sunken` | `#e6e0da` | `#171b23` | footer, UID, group labels | -| `--text` / `--text-2` / `--text-3` | `#221c18` / `#5e544d` / `#776c64` | `#e7ebf2` / `#aab3c2` / `#8e98aa` | text hierarchy | -| `--accent` | `#b24f26` | `#f09a6c` | primary buttons, selected tab, own name, focus | -| `--accent-soft` | `#fbe2d4` | `#3a3033` | current channel, active settings category | -| `--peach` | `#f3a37c` | `#f3a37c` | brand mark | -| `--talk` | `#1f8a5a` | `#4fcf8e` | talking indicator, PTT held | -| `--danger` | `#b3261e` | `#f08b82` | mute/deafen active, errors | +Resize handles are invisible 9px strips centred on each pane edge, tinted at 50% while focused or +dragged. The native caption overlay is 44px high in the window-bar colour (`app/main/titlebar.js`). -Theme follows the choice in Settings → Appearance (dark by default for new profiles, independent of the OS; -Light and System are selectable; implemented through Electron -`nativeTheme.themeSource`, applied before the window is created, so `prefers-color-scheme` stays the single switch). The dark palette uses the -blue-gray surfaces of the owner's reference (`--bg #1b2029`, `--surface #242b37`, `--sidebar #1e242e`). -Selection, caret, scrollbars and focus rings use the palette. +## Elevation & Depth -## Type +Depth comes from the official background ladder (contrast < header < shaded < bg), not shadows. +Context menus paint `linear-gradient(#0B1124, #222C41)` at 0.8 behind a 4px blur, radius 8, shadow +`1px 1px 2px rgba(0,0,0,.2)`. Dialogs use the modal container (contrast-bg, 1px tint2 border, radius 8) +over a 25% contrast-bg wash with 2px blur. Notifications use the 15px-radius gradient plate. +Stream tiles have a 2px `--tsv-bg` border and radius 8; their 26px control bar slides in on hover. -System UI stack (`system-ui, -apple-system, "Segoe UI", "Noto Sans", Ubuntu, Cantarell, …`), 14 px base, -line-height 1.45; headings 600–650 weight at 17–24 px; monospace only for the UID and codec lists (data). -Tabular numerals for counts, times and statistics. +## Shapes + +Radii follow the official scale: 2 (toolbar buttons), 4 (fields, chips), 8 (menus, tiles, composer, +dialogs), 9 (tree pills), 10 (server card, event rows, selects), 15 (settings sections, theme tiles, +notifications), pill (toolbar, filled buttons, segmented controls). ## Components -Buttons (primary, default, ghost), 34 px icon buttons with `aria-pressed` states, fields with labels above, -radio/checkbox choices with accent colour, range sliders, chat tabs with unread counters, toasts in a polite -live region (errors 10 s, others 5 s). Icons are an inline SVG sprite drawn in one 1.8 stroke style. +- **Buttons:** filled pill gradient (#0058FF → #1365BB) for primary; gray pill on `--tsv-preview-bg`; + plain tint text for secondary; 42px subtle icon buttons whose glyph tints on hover. +- **Inputs:** 26px, `--tsv-bg`, 1.5px transparent border turning tint on focus; selects in the + multiselect look (radius 10); 20px dark checkboxes with a green check; 40×20 toggles; 10px slider + tracks; segmented 26px pills. +- **Chat:** detailed and compact styles. Remote bubbles #697a97 with a 12×14 tail on the first message, + own bubbles #0C1326; compact rows use the source 65px timestamp column and 13px bold sender. Event rows + have a #131824 → transparent gradient and radius 10; composer formatting sits above the 14/18 input + and working emoji, conditional attachment and send actions. +- **Menus:** 30px rows, 22px icons, 13px subtitle section captions, disabled #9c9c9c, destructive + rgb(255,130,130), min width 170, max 260. Client group/volume subpages replace the same popup contents; + Back or Left/Escape restores the original items and focus, not a second flyout. +- **Dynamic settings:** Audio follows Microphone, Output and Processing sections; device controls move + without being recreated. Identity selection/editing, creation and security controls are separate + sections. Whisper receive/list/editor and key binding controls use actual labelled rows, not an + unstyled vertical list. Toggle labels remain left with 40×20 switches right; numeric controls stay + compact and faders include their real live output. All fields, including inputs with implicit text + type, receive the shared source control styling. These changes address the first packaged capture + batch; confirmation screenshots are QA evidence, not assumed passes. +- **Selected values:** language flags and sidebar icon-mode pictograms come from the original local + artwork. The underlying select owns the value; decorative selected artwork is aria-hidden. Default + audio-device captions come only from Chromium's explicit `default` alias and remain available to + assistive technology. Missing alias metadata leaves the caption blank, not guessed. -The application icon is an original peach silhouette with a small stem and leaf on a transparent -background, without a plate, font or emoji dependency. `build/icon.svg` is the source for the 512 px -build PNG, 256 px runtime PNG and Windows ICO sizes 16, 24, 32, 48, 64, 128 and 256 px. Raster export uses -an alpha-enabled canvas in Electron, not a window screenshot. Asset-level alpha and small-size visual -checks do not establish that a particular packaged release contains or displays these assets. +Motion is limited to the official short state transitions (pill growth 150ms, toolbar 100ms, controls +120ms, toast 180ms); reduced motion removes them. Reduced transparency/increased contrast make menus and +notifications opaque; forced colours use system tokens. -## Motion +## Documented deviations from the official client -Only colour transitions (120 ms) and the toast entrance (180 ms, exponential ease-out); everything is -disabled under `prefers-reduced-motion`. +- No TeamSpeak logo in the sidebar header: the header shows the TeamsPeach name/icon. Search filters + local server connections/bookmarks only. Connecting and identity selection use a detail-pane form. + The account-bound community action slot instead exposes the real New Connection action. Bookmark + search/add/disclosure remain working; no decorative, nonfunctional folder action is introduced. +- No notification bell, contacts, myTeamSpeak presence or "Setup Chat" footer state: TeamsPeach is + strictly account-free. Offline onboarding includes a real persisted System/Dark/Light choice before + local identity creation/restoration, adapting the official `first_launch.theme` stage (render@2995390) + without its account stages. Existing profiles keep their theme and do not repeat onboarding. The footer + shows the local nickname and UID instead of cloud presence: the approved account-free exception. +- A push-to-talk hold button remains in the server footer in push-to-talk mode for pointer access; + the central toolbar preserves the source Away + microphone/speaker geometry. +- Information/Chat/Files modes are in the detail header. Open private conversations and explicitly + opened server chat are sidebar activities; no extra tab row occupies the channel chat canvas. +- Stream placement moves the same stage/media nodes between chat and the 175px tree overlay. Tile layout + and stream controls depend on the native/media capabilities described in FEATURE_COMPATIBILITY.md. +- Original non-brand SVGs and the exact 2.013 font replace the earlier approximate glyphs and font. + This is not evidence that every component's placement or state matches the original. +- A "System" theme tile exists beside the official Dark and Light tiles. +- New server administration, identity, snapshot, whisper, recording and file surfaces use the source + control tokens around real APIs. Token conformity alone does not establish identical screen composition. +- The refreshed actual-frontend matrix remains a strict visual failure: 168 evaluated pairs, none + blocked and none fully passing. A later focused 32-pair confirmation also failed; it measures a + newer build and is not substituted for the full matrix. Native/account/branding exceptions remain + explicit; source transfer and functional checks do not establish completed 1:1 reproduction. + Build-specific results and remaining differences are in `qa-parity-harness.md`. + +## Do's and Don'ts + +- **Do** take every new value from the installed client and cite its offset in the evidence specs. +- **Do** keep the native caption overlay colours equal to `--ts-new-header-bg` and `--tsv-font-color`. +- **Do** keep the stock `--tsv-*` token declarations at (0,1,0) specificity. +- **Don't** reinterpret, restyle or "improve" the official look; deviations above are product constraints. +- **Don't** add account-bound controls (bell, contacts, presence) that would do nothing. +- **Don't** claim full feature parity from visual parity; see `FEATURE_COMPATIBILITY.md`. diff --git a/FEATURE_COMPATIBILITY.md b/FEATURE_COMPATIBILITY.md index 5254436..fc2ccfb 100644 --- a/FEATURE_COMPATIBILITY.md +++ b/FEATURE_COMPATIBILITY.md @@ -1,8 +1,11 @@ # TeamsPeach ↔ TeamSpeak 6 server features -Status: **proven** = exercised against the real server 10.10.10.160 (TS6 6.0.0-beta13.1) with the real -UI, evidence path given; **implemented** = code + unit/loopback tests, no live proof yet; -**blocked** = not available, reason given. Windows x64 only unless stated. +## Historical interoperability baseline + +The table below records earlier exercised builds, not automatic proof of the current cutover. **Proven** +means the cited earlier run exercised that feature; **implemented** means its recorded implementation +scope, not a new live-server pass. Current account-free acceptance follows the table. Windows x64 only +unless stated. No new live-server mutation or physical media capture is part of the final parity run. | Feature | Status | Evidence / reason | |---|---|---| @@ -11,10 +14,12 @@ UI, evidence path given; **implemented** = code + unit/loopback tests, no live p | Saved servers (name + address, no passwords): save, edit, delete, restart persistence, one-click connect, clean switch | proven | `docs/evidence/runtime/2026-10-24-servers-settings/` (connect with same UID, mic muted) + `test/prefs.test.js` | | Sectioned settings (Identity, Servers, Appearance, Audio, Video, Keys, Information) without dropping the connection | proven | servers-settings run: all 7 panels visited while connected, keyboard Home/arrows, Escape returns | | Theme: system / dark / light | implemented | dark captured in servers-settings screenshots | +| User themes / extensions | Current implementation; format- and `--tsv-*` token-compatible, not official DOM-class compatible | `docs/themes.md`; current consumer unit suite and guarded runtime acceptance below | | Server password on connect | implemented, not exercised | the test server has no password | | Channel tree, join channel, password channels (inline prompt) | proven (join), implemented (password) | probe joined `cs`; no password test performed | | Voice TX/RX (Opus via core), talking indicators, mute, deafen RX+TX block/restore, PTT, open mic | proven between two TeamsPeach clients with synthetic capture | `docs/evidence/runtime/2026-10-24-voice-chat/`; the path after capture is real. Live microphone voice with the official TS6 client and Asahi hardware operation are not proven | | Voice activation (local voice detector in the core, sensitivity High/Normal/Low, 100 ms preroll, 400 ms hangover) | proven between two TeamsPeach clients with a real speech recording as file-fed capture; detector unit tests on real speech and synthetic noise | `docs/evidence/runtime/2026-10-24-vad-dev/`, `docs/evidence/vad-0.1.4.md`: speech opens and silence closes the gate, mute/deafen/push-to-talk-not-held/disconnected send nothing, setting persists. A live microphone, an official TS6 receiver and native ARM64 hardware are not proven (ARM64 unit tests run under qemu) | +| Long-session capture freshness and offline Opus fidelity | measured with real Chromium fake-file capture and native encoder/receiver, not natural microphone or server interoperability | `docs/evidence/voice-timed-20261029.json`: before/after 190 s, 9500 frames each, stable 48 kHz mono EC/NS/AGC; 600 ms renderer stall previously replayed 30 frames in 10 ms, now discards 20 older-than-200-ms frames. Both codecs at quality 0/6/10 measured. Synthetic session did not reproduce progressive barrel coloration; subjective live report remains unresolved. Official UI estimator vs unknown native DSP/encoder distinction: `docs/evidence/voice-official-source-20261029.json`. | | Private chat | proven | voice-chat run `15/16-*.png` | | Channel chat | proven error path | server denies guests: TS 2568, permission 224, shown in UI | | Server chat | implemented | not exercised live | @@ -22,16 +27,17 @@ UI, evidence path given; **implemented** = code + unit/loopback tests, no live p | TS6 screenshare viewing (P2P): discovery, join, answer, ICE buffering, stop | proven | `2026-10-24-ts6-stream-view/`: AV1 2560×1440 ~59 fps, 2298 frames, D3D11 decoder | | Realign / reconnect offer renegotiation | implemented | unit tests + loopback (2 offers/2 answers); no realign seen live | | Stream audio | implemented | live stream advertised `audio=0`; loopback 139 inbound audio packets | -| SFU streams | blocked | P2P only; `notifysfuaccessinfo` is reported as unsupported | -| Sending own screenshare | blocked | not implemented | +| Independent simultaneous P2P viewers, native fullscreen/Escape and picture in picture | real local WebRTC and historical native Windows fixture proof, not new live-server proof | `C:/Users/Admin/tmp/teamspeach-ui9-20261024/dev-streams/result.json`: native PiP HWND/topmost and cleanup before the desktop-test prohibition. Redesigned player: `C:/Users/Admin/tmp/teamspeach-player-refine-20261024/final-stage/result.json`, 120 offscreen assertions covering two generated receivers, identity/continuity, controls, keyboard, resize/collapse, and actual contained-image proportions. No new native PiP/fullscreen evidence; see `docs/evidence/player-refine-20261024.md` | +| SFU streams | blocked | Exact request fields are partly recovered, but token/URL/auth values and Chromium negotiation interoperability remain unproven; see current limits below | +| Sending own screenshare | generated production sender-to-viewer media verified; native/live interoperability not established | `C:/Users/Admin/tmp/teamspeach-publisher-decoded-pass/result.json`: decoded 640×360 H.264 and audio RMS 0.1063, admission/stop/cleanup. `offscreen-broadcast-final/result.json` under the UI9 evidence root covers 14 UI cases and eight locale/theme/size captures with injected capture only | | Server/channel group labels (`name_mode`), custom group icons, country | proven | `2026-10-24-tree-metadata/`: two server-supplied group labels retained verbatim in the raw capture, 6 custom icons, RU country code | | Built-in group icons (ids 100, 200, 300, 500, 600) | partial | server has no file (core: `not_found`, `builtin:true`); neutral badge named after the group | | Channel icons and channel banners | proven | tree-metadata run: 11/11 channel icons and 11/11 banners from the server's file transfer | -| Host banner | proven | tree-metadata run: server GIF rendered above the tree | +| Host banner | historical server download proven; new behind-card presentation fixture verified | `C:/Users/Admin/tmp/teamspeach-ui9-20261024/offscreen-shell-confirmed/result.json`: compact artwork, theme/locale/window sizes, selectable content, absent-banner cleanup; not a new server-media download test | | Avatars (server file) | implemented | no client on this server has `client_flag_avatar` | | Avatars (myTeamSpeak URL) | proven | tree-metadata run: 1 avatar (public https PNG, bytes sniffed; URL allowlisted from server data) | | Nickname colours | matches official semantics | official UI colours own client and myTS contacts locally (`docs/evidence/ts6-official-client.md`); TeamsPeach highlights own nickname, has no contacts | -| Poke | not implemented | core supports target `poke` | +| Poke, target menus, moderation confirmations, avatar selection | historical real-shell/preload/validator fixture | `C:/Users/Admin/tmp/teamspeach-ui9-20261024/offscreen-menu/result.json`; no live moderation/avatar transactions. Current whisper/menu additions are tested separately below | | Identity export | proven | packaged Windows run `2026-10-24-windows-package/result.json`: real core CLI export through the app (only the native save dialog answered by the harness), file starts with `[Identity]`, status shows the UID | | Identity import / restore from backup | implemented, not exercised | uses the same core CLI; import of a file produced by the official TeamSpeak client not verified | | Hardware video decode on/off | proven (policy) | packaged run: saved off → restart → launched with `disable-accelerated-video-decode`, engine reports `disabled_software`. Separately, the live TS6 stream decoded AV1 with `D3D11VideoDecoder` while allowed; no claim for other codecs | @@ -39,6 +45,83 @@ UI, evidence path given; **implemented** = code + unit/loopback tests, no live p | Linux x64 / arm64 packages | released (pre-release v0.1.1), built in CI | release run #18 on `71300ff`: tests, core smoke (arm64 under qemu), every packaged arm64 ELF 16 KiB-compatible, static AppImage runtime starts in a slim container (arm64 under qemu); `docs/evidence/release-v0.1.1.md`. v0.1.0 ARM64 AppImage is broken (needs `libz.so`). Not run on Asahi hardware (target unreachable) | | Windows x64 package | released (pre-release v0.1.1), local build | built on the developer PC from `71300ff`, static CRT core, provenance file attached; packaged smoke in `docs/evidence/runtime/2026-10-24-windows-package*/`; not tested on a pristine Windows | | macOS, Windows ARM64 | blocked | no macOS host; Windows ARM64 needs the VS "MSVC ARM64 build tools" component (not installed) | -| Server/channel group (role) and permission management | not implemented | groups are displayed read-only; no assignment or permission editing | -| General file browser / file transfer | not implemented | file transfer is used internally only to download icons, banners and avatars | -| Other TeamSpeak 6 features not listed here | not implemented | TeamsPeach does not claim full TS6 parity | +| Server/channel group (role) and explicit client/channel permission management | implemented; controlled command/wiring coverage, not live server proof | Real verbs and target/connection-generation guards; production-shell fixture confirms group/permission payloads and cancel paths. Unknown effective rights remain server-decided | +| Per-participant local volume/mute/reset | generated native two-codec decode/mix plus real UI transport verified | Whole native suite: 66 unit tests including both codecs, gain/mute/reset and subprocess proof; max sample error 2, target mute retains other speaker exactly. Connection-scoped UID identity and recycled decode queues tested; no new live call claim | +| Channel member collapse and sidebar resize | isolated Electron UI verified | `C:/Users/Admin/tmp/teamspeach-ui9-20261024/dev-tree/result.json`; actual pointer/keyboard, per-server persistence, child headings retained; no active live-call proof | +| Selected-application broadcast audio | Windows native capture proof and synthetic bridge-to-WebRTC proof are separate; Linux runtime unverified; macOS blocked | `docs/evidence/native-app-audio-proof.json` records prior Windows 64.7 dB selection isolation, before later ancestry/lifetime fixes. `smoke-out/appaudio-synthetic/result.json` proves exact-contract PCM through production transport/worklet and decoded WebRTC. Combined native-to-WebRTC verification needs an isolated audio endpoint; prior default-output tone was potentially audible. Linux requires pactl/parec and PulseAudio or PipeWire-Pulse; macOS SDK/CoreAudio/TCC implementation is missing | +| General file browser / file transfer | Implemented in current cutover, not part of this historical baseline | Legacy TCP transfer and app-wide settings; current native and main/renderer tests below | +| Other features | No blanket parity claim | The current full feature matrix identifies owners, observed tests and exact remaining prerequisites | + +## Current account-free acceptance (2026-11-01) + +Scope is strictly local/server functionality without an account; myTeamSpeak/cloud/Matrix services and +Remote Apps integration are excluded by instruction. No account UI is substituted for a missing local +feature. Tests use disposable state and controlled inputs. A protocol unit fixture is not a real server +interoperability claim, and synthetic renderer IPC is never described as native transaction success. + +Current exercised gates: **318 Node consumer tests passed**, one deliberately skipped live release-list +test; **152 native unit tests passed**, one optional external-PCM audit ignored; **5 native stdio bridge +tests passed** after contract fixes. Full logs are in +`C:/Users/Admin/tmp/teamspeach-official-parity-20261101/qa-final/`. Actual release subprocess checks also +passed: two simultaneous core PIDs sharing the canonical identity without private-key runtime copies, +and 30 disconnected administration requests plus four malformed requests rejecting with exact errors. +Linux x64 additionally passed **154 native unit tests and 5 stdio tests** in an approved disposable +Rust 1.96 container. The same source cross-built for `aarch64-unknown-linux-gnu`; its ELF passed the +16 KiB page-alignment check (64 KiB LOAD alignment, GLIBC_2.34). It was not executed on ARM/Asahi. +Only owned temporary build files/containers were removed afterward; runner services/config were unchanged. + +Actual hidden runtime passes include all twelve settings categories in EN/RU plus restart, native identity +CRUD/improvement cancellation, whisper/keybind persistence/restart, rich-chat history and safe local +math/diagram rendering, theme-resource confinement, onboarding theme-save ordering, menus, broadcast UI, +and administration/recording/file-browser controller rendering. The whole-shell batch passed 1,001 checks +over 324 cases. **224/224 class-matched visual metrics passed** at 1553×998 after correcting the independent +reference's source-observed 260 px popup modifier; this is not whole-image or whole-client identity. + + +| Feature family | Owner | Current observed evidence | Scope boundary | +|---|---|---|---| +| Multiple identities, additive import/export, defaults, guarded delete, hash-cash resume/cancel | AstraIdentity | Native profile/improvement and real CLI stdio tests; hidden actual create/edit/default/delete/improve-cancel passed | No official exported-key corpus claimed | +| Eight simultaneous server slots, viewed/input routing, reconnect epochs, bookmark identity | AstraConnections | Connection/media consumer units passed; actual two-core release subprocess proof passed | No new server joins; native microphone routing hardware not exercised | +| Channel CRUD/subscriptions, away/talk power, server moderation/keys/passwords/log/client database | AstraCore | Native wire/target units and 13 renderer behavioral cases passed; real disconnected-core rejections passed | Controlled protocol replies, not successful live server mutation | +| Server snapshots, typed properties, UID memberships and icons | AstraCore | Snapshot codec and main consumer suites passed | Import is non-atomic; server icon canonicalization and server feature support remain server-dependent | +| Whisper lists/groups/quick/reply, epoch gating and incoming deny | AstraAudio | Native generated Opus whisper route/block and target tests passed; local store/hold tests passed | Offline core rejection is not live whisper interoperability; contacts-only targets excluded | +| Per-device DSP, voice activation/PTT delay, dB fader, output/notification routing | AstraAudio | Native detector/mix tests and generated worklet consumer tests passed | Independent processing, not private native DSP identity; physical audio not exercised | +| Global hotkeys | AstraAudio | Windows/Linux parsing/backend tests and Linux x64/ARM compilation passed; offscreen no-helper guard passed | macOS global shortcuts unsupported; Windows/Linux OS registration/portal runtime deliberately unexercised | +| Legacy files, opaque chooser capabilities, commit/cancel/no-overwrite, global settings | AstraFiles | Real loopback TCP byte/hash/pacing/cancellation tests and main/renderer/scheduler consumer suites passed | HTTPFT/S3 explicitly unsupported; no speculative fallback; filesystem hard-link requirement fails safely | +| Recording/WAV timing, tracks, pause/finalize, notification log/matrix, OS local settings | AstraRecordThemes | Generated native PCM/WAV tests and main/renderer policy suites passed | No real microphone, OS startup/lock action, notification sound or private recording exercised | +| Local themes and appearance options | AstraRecordThemes / AstraVisual | Functional confinement suites and real selected CSS/font/image/restart/denied-remote smoke passed; actual settings pixels inspected | Package/token compatibility only, not official DOM-class compatibility | +| Local history, safe rich chat, drafts/unread, links/images, file attachments | AstraChat | Main/parser suites; actual 621-row history IPC/restart, local KaTeX/Mermaid and inert malicious-content smoke passed | Non-own-channel legacy text delivery unverified; no Matrix/cloud edit/reactions/read receipts | +| P2P stream extras, layout, internal/standalone popout and publishing controls | AstraStreams | 249 generated-media stage checks; actual sender→receiver video/Opus, admission, rate changes, pause, ban and cleanup passed | macOS selected-application audio unimplemented; standalone viewport emulation limitation below; no live SFU claim | +| Official visual system and EN/RU catalogs | AstraVisual / AstraQA | All twelve settings categories EN/RU/restart; actual full three-pane/settings/menu pixels reviewed; 224 class-matched metrics passed | Historical 22/22 source-reference probes are not whole-client identity | + +The complete **38-row original feature inventory**, owner, evidence and exclusions is +[`docs/evidence/official-parity/final-feature-matrix.json`](docs/evidence/official-parity/final-feature-matrix.json). +Consolidated results and exact package hashes: `qa-final/verification.json` and `qa-final/package-manifest.json` +under the evidence root above. The isolated package is `build/win-unpacked/TeamsPeach.exe`; no installer +was run, no version was changed and nothing was published. + +## Remaining implementation gaps and external verification prerequisites + +- **SFU:** `docs/evidence/official-parity/sfu-native-inspection.json` and + `docs/evidence/official-parity/sfu-request-construction.json` recover command/envelope fields, + not authoritative token origin/renewal, exact optional/value branches or a proved mediasoup-to-Chromium + negotiation. `docs/evidence/official-parity/server-sfu-prerequisite.json` records a read-only check of the configured server's empty + SFU endpoint; it does not prove absence of an advertised runtime capability. No controlled SFU endpoint + has been exercised, so SFU remains blocked rather than falsely successful. +- **HTTPFT/S3:** `docs/evidence/ts6-filetransfer-native.json` and `docs/evidence/ts6-filetransfer-native-continuation.json` record + command arguments but not complete endpoint/base-URL binding, operation response envelopes, S3 payload + mapping or required headers/verb values. No controlled newer-storage server fixture is available. +- **macOS implementations:** selected-application audio capture is not implemented; a CoreAudio/TCC + backend is still needed. Global shortcuts are explicitly unsupported by the non-Windows/non-Linux + branch of `core/src/hotkeys.rs`. These are implementation gaps, not merely unexecuted tests. +- **Non-own-channel chat:** arbitrary legacy channel-text delivery is not established by the own-channel + and UID-bound private-message fixtures. It remains specifically unverified; current results do not + establish permission semantics or delivery to a channel the client has not joined. +- **Platform/native behavior:** hidden Windows tests and Linux cross-compilation do not prove Asahi/M1 hardware, Linux portal/global + shortcuts, physical microphone/speaker/camera/application capture, native fullscreen/PiP or official + native DSP sound identity. Those are stated as verification limits, not silently emulated passes. +- **Standalone pop-out:** the actual Electron 44.9.3 offscreen guest starts with a 0×0 native viewport. + `docs/evidence/official-parity/popout-offscreen-limitation.json` records the source-supported engine + explanation. Explicitly authorized test-only CDP viewport emulation exercises the real adopted video, + MediaStream, continuing RTP, child controls and restore/cleanup. It does not verify unmodified native + offscreen painting or a normal visible child window; production flags are not weakened for the test. diff --git a/PRODUCT.md b/PRODUCT.md index 7391135..f4a94ff 100644 --- a/PRODUCT.md +++ b/PRODUCT.md @@ -40,8 +40,8 @@ a claim of complete interoperability; the evidence matrix records the demonstrat ## Operating Context Long voice sessions with the app in the background; push-to-talk or an open microphone; occasional stream -viewing in a channel; the server is the owner's own TS6 server, administered elsewhere (no administration -from this client). +viewing and explicitly started publishing in a channel; the client now offers target-bound moderation +and explicit group/client permission changes, while the server remains authoritative. ## Capabilities and Constraints @@ -54,11 +54,21 @@ from this client). ## Brand Commitments -Name "TeamsPeach"; restrained peach accent (*inferred* from the name and brief); English as the default -interface language, with Russian selectable through the shared translation catalog. -The owner pinned a visual reference for settings (TeamSpeak 6 style: category navigation on the left, -titled card sections on the right, dark blue-gray surfaces); settings follow it. -The owner explicitly asked for a straightforward, familiar chat UI rather than a branding exercise. +Name "TeamsPeach" and its own application icon; English as the default interface language, with Russian +selectable through the shared translation catalog. The owner's latest brief (2026-11-01) requires the +installed official TeamSpeak 6 client's design, not an interpretation: the Liquid Glass world and the +peach accent are retired. Colours, typography (bundled Noto Sans, SIL OFL), spacing, row heights, +the three-slot window (sidebar, server tree, detail pane), menus, settings and chat geometry come from +the installed client's own source values, with extraction offsets in `docs/evidence/official-parity/`. +The TeamSpeak application logo and name are not shipped. Non-brand SVG artwork is copied from the +installed client for the owner's requested local reproduction; no redistribution licence is claimed. +Account-bound surfaces (notification bell, contacts, myTeamSpeak presence, Setup Chat) remain omitted. +Remaining visual and functional deviations are listed in DESIGN.md and FEATURE_COMPATIBILITY.md; visual +parity is never presented as feature parity. Offline identity onboarding and the independent brand marker +are explicit exceptions, not imitations of account functionality. New module controls bind real APIs; +source-token matching is not a substitute for rendered screenshot comparison. No preference, error or +working control is removed for visual reasons. Keyboard focus, reduced motion, reduced transparency +where supported, increased contrast and forced colours remain part of the design contract. ## Evidence on Hand @@ -76,5 +86,6 @@ benchmarks exist and none may be invented. ## Accessibility & Inclusion Keyboard-operable controls with visible focus, screen-reader names for icon buttons and tree rows, light -and dark themes with an optional System mode, and readable system fonts. New profiles default to dark; -an existing saved theme choice is preserved. +and dark themes with an optional System mode, and the official interface font bundled locally so text +renders the same on Windows and Asahi Linux. New profiles default to dark; an existing saved theme choice +is preserved. diff --git a/README.md b/README.md index 680f7ad..1bdc864 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ of memory. Use a separate profile without touching the main one: `TEAMSPEACH_PROFILE_DIR= npm start`. +The safe UI suites use a disposable, hidden, nonfocusable, offscreen and muted Electron process: +`node scripts/smoke-official-shell-offscreen.mjs --exe --out `. +The launcher refuses packaged main code that differs from the current offscreen-aware source. Generated +streams use real local Chromium WebRTC but synthetic signaling/server state; this is not live-server +interoperability proof. No native fullscreen/PiP, OS input, capture, clipboard or native dialogs are used. + ## Packaging ``` @@ -50,31 +56,99 @@ attached with a `local` designation and a `*-build-info.txt` provenance file. ## Usage -1. On first launch, enter a nickname to create a cryptographic identity (P-256). The public UID is shown - in Settings → Identity. Changing your nickname does not change your UID. -2. Enter a server address and, if required, its password, then select Connect. Save adds the address to - saved servers above the tree; the bookmark button in the header toggles that list. Connect with one - click. If already connected elsewhere, Switch first disconnects from the current server cleanly. - Edit names and addresses or remove entries in Settings → Servers. Server passwords are not saved; - all servers use the same identity. -3. Click a channel to join it. Password-protected channels show a password field. -4. Choose how your voice is sent in Settings → Audio → Voice transmission: - - **Push to talk** (default): hold F8 (change it in Settings → Keyboard) or the button in the channel - header. The key works **only while the TeamsPeach window is focused**; the header hint says so. - - **Voice activation**: a small voice detector built into TeamsPeach decides on this computer when you - are speaking and sends only then, from about 0.1 s before a detected word until about 0.4 s after the - last detected speech (the first spurt after connecting, unmuting or changing the mode carries up to - 0.3 s of held audio and so starts up to 0.3 s late). Sensitivity: High (quieter speech), Normal, Low (noisier surroundings). It runs - after the microphone processing in the same panel (noise suppression, echo cancellation, gain - control). It is not speech recognition and saves nothing; loud speech-like sound (TV, other voices) - can also trigger it. - - **Open microphone**: continuous transmission. - The microphone test only shows the input level and never transmits. The microphone and audio buttons at - the bottom left update your server-visible mute state; muting or deafening stops transmission in every +1. On first launch, enter a nickname to create a local P-256 identity without an account. Settings → + Identity manages multiple identities, their names/nicknames, default selection, additive import, + selected export and cancellable security-level improvement. Default and in-use identities cannot be + deleted. Editing a stored nickname affects future connections; it does not rename every active session. +2. Enter a server address and, if required, its password, then select Connect. Up to eight simultaneous + native connections are supported. Selecting a server tab changes the viewed server, not automatically + the microphone target; input routing has its own controls and acknowledgement. Bookmarks save a name, + address and optional local identity, never a server password. A security-level rejection offers an + explicit improvement action for that identity rather than starting expensive work automatically. +3. Click a channel (or focus its row and press Enter) to **browse** its heading and available streams. + This does not move your voice or change the channel-chat destination: the chat tab and composer still + name your current voice channel, and a notice explains this while browsing elsewhere. Double-click + a channel, or use **Join channel** in its header, to move voice. Password channels then show a password field. + The right-edge chevron hides or shows that channel's direct members without joining; collapsed rows show + a compact avatar summary. Collapse choices are saved per server address. Drag the sidebar divider or + focus it and use Left/Right or Home/End to resize; Enter or a double-click restores the responsive default. +4. Settings → Audio provides per-input and per-output device processing profiles. Voice activation can + use automatic speech detection, a volume gate, or a hybrid; push-to-talk can be combined with activation + and an optional release delay. Disabling both gives continuous transmission. Existing profile choices + migrate to this model. Notification output has a separate device and dB level. Processing is independent + and is not claimed bit-identical to the official client's private native DSP. Local keyboard bindings + work in-window; global support depends on the OS backend and permissions. + Local whisper lists/groups, quick whisper and reply use held-target epochs; failed or stale whisper + targets suppress sending rather than falling back to ordinary channel voice. Contact-only targets are + not offered without an account. The microphone test retains at most ten seconds of PCM in memory, + plays it only after an explicit Listen action through the selected output, and blocks server voice + until Finish clears the clip. Device/privacy changes and leaving settings also cancel and clear it. + The microphone and audio buttons update your server-visible mute state; muting or deafening stops transmission in every mode. Right-click these buttons, or press Shift+F10 while focused, to select an input or output device using the same selection as Settings → Audio. Left-click still mutes or deafens. -5. A streaming member has a Watch button. Volume, mute, fullscreen and Stop watching are below the video. - The status line shows the negotiated codec, resolution and frame rate. + Deafening still blocks playback and transmission; its button state replaces the former muted banner. +5. Streaming members have a screen indicator. Select their channel to see available shares above the chat, + then choose **Watch** on a share. Several announced shares are listed separately; browsing alone never + subscribes to one. If the server flags a member as streaming but does not provide usable details, the + area shows discovery progress or the actual error instead of inventing a watchable stream. + Each watched share gets its own tile above chat and keeps playing while you browse other channels. + Volume, mute, picture in picture, full screen and Stop watching apply to that tile, not its neighbours. + The picture fills the tile: its name remains over the video while controls appear on pointer hover or + keyboard focus (always visible on coarse-pointer devices). **Stream details** opens the live statistics; + Escape closes that panel. Unavailable picture-in-picture remains disabled with an explanatory label. + Native picture in picture detaches the same video into an OS-managed floating window; full screen and + PiP do not subscribe again. Ending a share closes only its presentation; disconnecting closes all views. + Drag the divider above chat or focus it and use Up/Down or Home/End to resize the stream stage. Enter or + a double-click resets its height. Collapse hides the stage without stopping watched shares; its height + and collapsed state are saved. The chat retains usable space at the minimum window size. +6. Application chrome does not select text during interaction. Chat messages, editable fields, public + identity data and other useful content remain selectable. The server's host banner sits behind its + top card rather than in a separate panel, with a theme-aware contrast overlay. +7. Right-click a member, or focus the row and press Shift+F10 / the Menu key, for target-specific actions. + The menu uses server permission hints and distinguishes a known denial from an unknown permission that + the server must decide; group names never grant authority. Group/permission changes and moderation show + the exact target and operation before confirmation. A target that leaves, changes identity, or moves + channels closes its stale menu. Server errors are shown rather than reported as success. + Local volume uses the official -200..+10 dB taper, Mute and Reset. Reset restores 0 dB and unmutes; + explicitly committed modifiers persist by UID, while mute is session-local. Gain is applied before + voice mixing and never changes other participants. + The native avatar chooser accepts PNG/JPEG up to 128 KiB and exposes image bytes, never a file path, to + the renderer. Permission lists show explicit client/channel assignments, not a full effective-rights audit. +8. **Start Stream** opens the source chooser. Selecting a tile shows its thumbnail; **Next** starts + the muted private preview. Only **Go Live** publishes it. Choose an observed window/screen or + explicitly opt into a camera; camera capture does not include a microphone. Back, cancellation, + source loss and disconnect release the preview capture. + Presets and advanced controls set resolution/frame-rate and bitrate targets. Public allows viewers; + Selected participants uses a local UID allowlist (empty means nobody); Private requires a decision + per viewer. The stream can still appear in discovery. Audience settings remain locked until Stop. + Selected-application audio is opt-in: Windows uses WASAPI process-tree capture on build 20348+; + Linux uses PulseAudio/pipewire-pulse sink-input streams through `pactl` and `parec`. Pure PipeWire + without Pulse compatibility and macOS selected-application audio are not implemented. + Changing the audio source/scope/app selection never silently reopens the system picker. An explicit + Restart preview action is required for desktop-capturer sources; system-picker sources require Back + and a new explicit selection. The separate supported system-audio choice remains under Advanced. + Per-app/master gains apply to the outgoing mix; clicking the percent readout resets gain to 100%. + System audio is never substituted silently, and the local tile is not another receiver subscription. + Native capture depends on OS consent and the installed desktop/portal backend; these paths are not + universal cross-platform or official-client interoperability proof. +9. Channel/server menus provide typed administration with explicit destructive confirmations and server + errors. Snapshot import is non-atomic: completed server changes are not rolled back by cancellation. + General file browsing/transfers support the legacy server transport; HTTPFT/S3 remain explicit gaps + with no speculative legacy fallback. Filesystem publication fails safely when required atomic/no-replace + semantics are unavailable. Recording and transfer destinations are approved in main, not renderer paths. + File Transfer settings retain an approved download folder or ask every time, and apply upload/download + concurrency across all tabs (combined at most ten) plus shared directional rate limits. Limits apply to + active file/snapshot work without restarting streams; they are conservative ceilings, not bandwidth guarantees. +10. Chat history is local and separated by own identity, server and channel/peer identity. Drafts and + unread state are connection-local. Rich text, local math/diagrams, emoji and server-file links do not + require cloud services. Remote images require explicit consent; trusted external sites can be removed + in settings. Matrix/cloud edits, reactions, read receipts and contacts are outside the account-free scope. +11. Streams support hide/show without unsubscribing, ordering, focus with a secondary strip, pages, + an internal tile overlay and moving the existing stage over the server tree. Publisher admission, + kick/ban/unblock, pause and live options keep the original tracks/sessions. Standalone pop-out reuses + the same video; its hidden guest renderer was exercised with explicit test-only viewport emulation. + Unmodified native pop-out painting and SFU interoperability remain unverified. + ## Language @@ -113,7 +187,9 @@ Data locations: `%APPDATA%\TeamsPeach` (Windows), `~/.config/TeamsPeach` (Linux) - Screenshares use P2P only, as the official client does by default. SFU notifications are reported as unsupported. There is no TURN relay: the viewer needs a direct network path to the streaming computer (STUN uses `turn.teamspeak.com`, as in the official client). -- Sending your own screenshare is not implemented. +- P2P screenshare publishing is implemented, but native source capture on every OS/window manager, + macOS selected-application audio and official-client interoperability are not all verified. SFU publishing + is unavailable. See the feature matrix for the precise implementation and evidence boundaries. - Push-to-talk only works while the window is focused. A global hold-to-talk shortcut, such as one using the Wayland GlobalShortcuts portal, is not implemented. - The official client highlights your own nickname and myTeamSpeak contacts using local relationships, @@ -136,13 +212,28 @@ Data locations: `%APPDATA%\TeamsPeach` (Windows), `~/.config/TeamsPeach` (Linux) ## Product and design -A familiar voice-chat layout: server and channel tree on the left, channel and chat on the right. -Settings use category navigation (Identity, Servers, Appearance, Audio, Video, Keys, Information) on the -left and cards on the right, following the supplied reference. New profiles default to a dark theme, -independent of the OS. Choose Light or System in Settings → Appearance; the choice persists, and an -existing saved choice is preserved across upgrades. +The interface reproduces the installed TeamSpeak 6 client's own design from its source values (see +DESIGN.md and `docs/evidence/official-parity/`): a three-pane window with a 270 px navigation sidebar +(collapsible to a 62 px rail) listing server connections and saved servers, a 500 px server pane with +the server header card and channel tree, and a detail pane with the channel header, stream stage, chat +and composer. Settings open in the main and detail panes with the official category column and section +cards (Identity, Servers, Appearance, Audio, Video, Keyboard, Chats, Notifications, OS Specific, +Information). Reduced-transparency, reduced-motion and forced-colors preferences have explicit fallbacks. +New profiles default to dark independently of the OS; Light and System remain selectable. Account-bound +official surfaces (notification bell, contacts, myTeamSpeak presence) are intentionally absent. -System fonts and a restrained peach accent keep the interface readable; green indicates a speaker. +Each pane has the official 44 px window bar as its drag surface; the server pane's bar carries the +microphone/speakers toolbar pill. Startup and error views keep a 44 px drag strip. Electron's hidden +title bar retains native caption controls in the window-bar colour: Windows/Linux use the +window-controls overlay; macOS retains left-side traffic lights. +Minimize, maximize/restore, close, system shortcuts and caption double-click belong to the OS, not +duplicated JavaScript handlers. Native button accessibility names follow the OS language; the app's +title-bar landmark follows English/Russian. Theme changes also update the native overlay colours. +Fullscreen content removes the app bar; picture-in-picture remains a separate native window. +Only a read-only, trusted top-frame state endpoint is exposed, not generic window control IPC. + +Bundled Noto Sans (OFL) and the official blue tint keep text identical across platforms; green indicates +a speaker. Server text is rendered with `textContent`; image bytes are checked by signature. The renderer uses context isolation, a sandbox, a strict CSP and allowlisted main-process commands. Only the main process selects file paths through native dialogs. @@ -161,6 +252,26 @@ rewritten to resemble the current interface. Unicode test fixtures retain their ## Checks - `npm test` runs unit tests for contracts such as IPC validation, viewer sessions and stream discovery. +- `node --test test/titlebar.test.js` covers native caption configuration, state-event publication, + theme-listener cleanup and IPC trust rejection. `node scripts/smoke-titlebar-offscreen.mjs --out ` + uses the shared hidden/offscreen harness and a disposable profile for EN/RU, light/dark, System-theme + and layout evidence. Native overlay buttons are outside renderer screenshots. Actual OS dragging, + Snap layouts, caption double-click, shortcuts and Linux/macOS integration require separate manual + platform checks; this smoke never sends OS keys or shows/maximizes/minimizes a window. +- `node scripts/smoke-official-shell-offscreen.mjs --out ` measures the actual renderer across EN/RU, + dark/light and 1280×900/880×560, including onboarding, connection, chat, all settings, menus and dialogs. + Its server data is labelled read-only synthetic IPC, not a live connection or product demonstration. + Companion `smoke-stream-stage-offscreen.mjs` measures actual contained image size with generated local + WebRTC; `smoke-broadcast-ui-offscreen.mjs` uses generated muted canvas capture, never private pixels. + The shared launcher requires an invisible, unfocused, nonfocusable offscreen window, mutes webContents, + and rejects packaged main-process code that differs from the current guarded source. Separate disposable + profiles prevent these checks from changing normal preferences. Results are evidence only when exercised. +- `node scripts/official-pair-capture-offscreen.mjs --out --sizes 1553x998,1280x800,880x800` + compares the actual installed official frontend with TeamsPeach using the same synthetic data. + It preserves explicit brand/account/native-caption exceptions, checks painted chat timestamps rather + than hidden DOM history, and exercises bottom-anchor/history-reading behavior across window resize. + The strict pixel gate currently fails; see `docs/evidence/official-parity/qa-parity-harness.md`. + The default 860px matrix entry is below the current 880px product minimum; use the sizes above. - `node scripts/core-smoke.mjs ` checks identity invariants offline. - `node scripts/smoke-ui.mjs`, `smoke-voice.mjs`, `probe-stream.mjs`, `loopback-stream.mjs` and `smoke-tree.mjs` exercise the real UI. Recorded results are in `docs/evidence/runtime/`; each run's diff --git a/docs/bridge.md b/docs/bridge.md index 42834c6..8c4ae93 100644 --- a/docs/bridge.md +++ b/docs/bridge.md @@ -8,13 +8,13 @@ to the core directly: main forwards only the commands listed here, after checkin ## 1. Process model ``` -teamspeach-core --data-dir +teamspeach-core --data-dir [--connection-dir ] ``` - `--data-dir` is resolved and passed **only by main** (e.g. `/core`). - The core creates it if missing. One core process per data dir: the core takes an - exclusive lock (`/core.lock`); a second instance fails at startup - with exit code 3 and a stderr message. + The core creates it if missing. A standalone core locks it exclusively. Multi-server main starts + one core per server, sharing the vault lock and exclusively locking each distinct connection dir. + A conflicting instance fails with exit code 3; connection IDs/epochs remain main-owned. - **stdin**: UTF-8, one JSON object per line (`\n`, `\r\n` tolerated). Max line **256 KiB**; a longer line is discarded up to its newline and answered with an `error` event `bad_request` (no `id` can be recovered). @@ -99,6 +99,7 @@ branch on human-readable message wording. | `audio_codec_unsupported` | current channel codec is not Opus (legacy Speex/CELT): we cannot transmit there (event, once per burst); received non-Opus voice is reported once per speaker | | `rename_not_persisted` | server accepted the new nickname but saving it failed; see §4.3 | | `not_found` | requested icon/avatar/banner does not exist (`detail.builtin:true` for built-in icon ids) | +| `target_changed` | private message/client target disappeared or numeric ID now refers to a different UID | | `media_too_large` | file exceeds the size limit of its kind (§4.17) | | `media_unsupported` | file is not a recognized image, or a banner reference the core cannot fetch | | `external_media` | banner or avatar lives at an `https://` URL (`detail.url` for banners, `detail.urls` for avatars); main may fetch it itself | @@ -147,12 +148,13 @@ Result = profile object; emits `profile` event. Nickname rules: after trimming, 3–30 Unicode scalar values, no control characters. -### 4.4 `connect` — `{address, server_password?, channel?, channel_password?}` +### 4.4 `connect` — `{address, server_password?, channel?, channel_password?, identity_id?}` - `address`: `host`, `host:port`, `[v6]:port` (default port 9987). Not a path. - `server_password`: optional string. - `channel`: optional initial channel, either numeric channel id string `"cid:12"` or a path `"Parent/Child"`. +- `identity_id`: selected vault UID; omitted selects the default. Server-demanded proof-of-work is handled by the bounded identity CLI, not automatically during connect. - Uses the persisted identity and nickname (`profile_missing` / `nickname_required` otherwise). If the nickname is taken on the server, the server appends digits (e.g. `Name1`); the snapshot shows the server-side name, the profile keeps the saved one. @@ -174,9 +176,9 @@ pending connect attempt was abandoned. `not_connected` if idle. Emits Moves self (`clientmove`). Result `{}` after the server confirms; snapshot follows. -### 4.7 `send_text` — `{target: "channel"|"server"|"client", client_id?: number, message: string}` +### 4.7 `send_text` — `{target: "channel"|"server"|"client", client_id?: number, expected_client_uid?: string, message: string}` -`client_id` required iff `target = "client"`. Message 1–8192 bytes UTF-8; +`client_id` and `expected_client_uid` are required iff `target = "client"`. Native rechecks the UID immediately before sending, otherwise `target_changed`. Message 1–8192 bytes UTF-8; TeamSpeak escaping is done by the core. Result `{}` after server confirmation. The server echoes our own messages as `text` events (verified live for private messages: the sender receives exactly one `text` with `to_client_id` = recipient); the core adds no @@ -191,7 +193,7 @@ gates: while `input_muted || output_muted` outgoing frames are discarded; while next connect). Result = audio state object; emits `audio_state`. Initial state at process start: both `false`. -### 4.9 `audio_frame` — `{pcm: string}` (no `id`, no response) +### 4.9 `audio_frame` — `{pcm: string, whisper?: u32}` (no `id`, no response) One 20 ms microphone frame: base64 (standard alphabet, padded) of **960 signed 16-bit little-endian mono samples at 48 kHz = 1920 bytes** (2560 base64 chars). @@ -208,29 +210,91 @@ Not connected → frames dropped with one `not_connected` error event per burst. deafened, or not allowed to talk by the server → frames dropped with one `audio_muted` event per burst; in mode `vad` the detector state and preroll are discarded as well. +Before IPC, the capture worklet stamps each frame's final sample with its own AudioContext +time. The engine drops messages older than 200 ms in that same clock; a busy renderer must +not replay a long MessagePort backlog. This is separate from the native queue bound and +does not shorten VAD's intentional 100–300 ms preroll. Normal delivery, DSP preferences, +privacy gates, native worklet shutdown and output/per-peer gains are unchanged. + +Channel quality `q` remains clamped to 0–10: Voice targets `8000 + 4000*q` bps with +`OPUS_APPLICATION_VOIP`; Music targets `24000 + 8000*q` bps with `OPUS_APPLICATION_AUDIO`. +These are TeamsPeach's existing targets, not a claim of TeamSpeak's proprietary encoder +configuration. The installed official UI contains a different bandwidth-estimate table; +that display code alone does not justify lowering encoder targets. Evidence and the exact +source hash are in `docs/evidence/voice-official-source-20261029.json`. No real server's +bitrate cap was queried or changed in this offline audit. + +`scripts/audit-voice-timed.mjs --seconds 190 --verify` captures only a licensed fake WAV +through real Chromium into PCM, disconnected and with sink `none`. `--stall --seconds 12 +--verify` exercises a bounded 600 ms renderer stall; `--exe ` uses the guarded +packaged launcher. The ignored Rust test `captured_speech_quality_matrix` accepts +`TEAMSPEACH_AUDIT_PCM` and `TEAMSPEACH_AUDIT_OUT` and runs the real encoder/receiver at +qualities 0/6/10, both codecs, including a synthetic channel-context reset at 90 seconds. +Timed metrics are in `docs/evidence/voice-timed-20261029.json`. They do not establish +natural-microphone quality, proprietary DSP equivalence or native Linux/ARM behavior. + ### 4.10 `audio_end` — no args (no `id`, no response) Ends the current transmission burst (core sends the TeamSpeak end-of-voice packet). In mode `vad` it also discards the detector state and preroll (capture stopped or the renderer stopped forwarding). -### 4.11 `set_transmit` — `{mode: "direct"|"vad", sensitivity?: "high"|"normal"|"low"}` +### 4.11 `set_transmit` — `{mode: "direct"|"vad", detector?: "automatic"|"volume_gate"|"hybrid", sensitivity?: "high"|"normal"|"low", level_db?: number}` Selects who decides when voice is sent. `direct` (initial state at process start): every -forwarded frame is sent. `vad`: voice activation in the core (`core/src/vad.rs`): frames are -decimated to 16 kHz and scored by the earshot voice detector (embedded model, 16 ms windows, -probability 0–1). The gate opens after 3 consecutive windows at or above the threshold -(`high` 0.45, `normal` 0.6 — default, `low` 0.75) and sends the 5 frames (100 ms) held before -the onset, then the current frame. While open, a window counts as voiced down to 0.15 below the -threshold; the gate closes 20 frames (400 ms) after the last voiced frame. It cannot open -during the first 10 frames after a reset; until the first spurt after a reset all frames since it are held -(at most 15 = 300 ms) and sent before the current one, later spurts send 5. Detector, filter history and preroll are reset on -every `set_transmit`, `audio_end`, mute/deafen, disconnect, channel or codec change and when -the server does not allow talking. `sensitivity` is accepted only with `vad`. -Before answering, the core discards frames still queued from the previous mode and ends any -open burst; the renderer forwards nothing until it has this answer. -Result `{"mode":"direct"}` or `{"mode":"vad","sensitivity":"normal"}`. `audio_state.transmitting` -is true only while voice packets are actually being sent. +forwarded frame is sent. `vad`: voice activation in the core (`core/src/vad.rs`) with the +official TS6 VAD modes (our own implementations, not TS6's native code): + +- `automatic` (default; TS6 "Automatic"/`Likelihood`): frames are decimated to 16 kHz and scored + by the earshot voice detector (embedded model, 16 ms windows, probability 0–1). The gate opens + after 3 consecutive windows at or above the threshold (`high` 0.45, `normal` 0.6 — default, + `low` 0.75). While open, a window counts as voiced down to 0.15 below the threshold. It cannot + open during the first 10 frames after a reset. `sensitivity` is a TeamsPeach extension. +- `volume_gate` (TS6 "Volume Gate"/`Power`): `level_db` is required (−50..=50, TS6 slider range, + default −30 in the app). A frame opens the gate when its RMS level in dBFS is ≥ `level_db`; + while open it counts as voiced down to 3 dB below. No warm-up. TS6's native level reference is + not visible: here 0 dB is digital full scale, so positive levels can never open the gate. + `sensitivity` is rejected. +- `hybrid` (TS6 "Hybrid"/`LikelihoodAndPower`): `level_db` required; the detector onset AND the + current frame's level must both pass; while open, a frame must be voiced and within 3 dB of the + level. `sensitivity` applies to the detector. + +The gate sends the 5 frames (100 ms) held before the onset, then the current frame, and closes +20 frames (400 ms) after the last voiced frame. Until the first spurt after a reset all frames +since it are held (at most 15 = 300 ms) and sent before the current one, later spurts send 5. +Detector, filter history and preroll are reset on `audio_end`, mute/deafen, disconnect, channel +or codec change, when the server does not allow talking, and on every `set_transmit` that +changes between `direct`/`vad` or to another detector: before answering such a change the core +discards frames still queued from the previous mode and ends any open burst, and the renderer +forwards nothing until it has this answer. A `set_transmit` that only changes `sensitivity` or +`level_db` of the active detector (the user moving the VAD level slider) applies from the next +frame without discarding audio or ending the spurt. +Result `{"mode":"direct"}`, `{"mode":"vad","detector":"automatic","sensitivity":"normal"}`, +`{"mode":"vad","detector":"volume_gate","level_db":-30}` or +`{"mode":"vad","detector":"hybrid","sensitivity":"normal","level_db":-30}`. +`audio_state.transmitting` is true only while voice packets are actually being sent. + +### 4.11a `set_local_volumes` — `{replace: bool, volumes: [{uid: string, db: number}]}` + +Persisted local per-user volume modifiers pushed by main (`app/main/client-volumes.js`): `uid` +is the client's base64 unique identifier (1–128 chars), `db` −200..=10 in 0.5 dB steps (−200 = +silence, gain 10^(dB/20)). `replace:true` swaps the whole map (sent whenever a core becomes +ready), `false` upserts; a 0 dB entry removes the UID. At most 4096 entries per request. The +map lives for the core process and applies to every connection it makes; a live +`client_action volume` on the current connection takes precedence until disconnect. Result +`{"count": }`. + +### 4.11b `set_playback_dsp` — `{agc: bool}` + +Playback automatic gain control of the current output device profile (TS6 "Automatic Gain +Control — Automatically level the volume of other users"; our own algorithm in +`core/src/voice_dsp.rs`, not TS6's): every speaker's decoded 20 ms (before local volume) updates a +smoothed speech level (frames below −50 dBFS are ignored); the speaker's gain moves toward +−20 dBFS RMS within ±12 dB, rising at most 0.25 dB and falling at most 3 dB per 20 ms, and applies +from the next tick multiplied with the user modifier. Off (process default) = gain exactly 1. +Multitrack recording taps stay pre-AGC; the mix is still hard-clipped at full scale (no limiter). +Result `{"agc": bool}`. + ### 4.12 `stream_list` — `{client_id?: number}` @@ -258,12 +322,62 @@ Result `{}` (or `server_error`). The SDP offer arrives as `stream` event Sends `streamsignaling id= clid= json=`. Examples of `json`: `{"cmd":"answer","args":{"answer":""}}`, `{"cmd":"iceCandidate","args":{"mLine":0,"mid":"0","sdp":"candidate:..."}}`. +Publisher ICE restart responses use `{"cmd":"reconnectOffer","args":{"offer":""}}`. +The renderer allowlist accepts only `answer`, `iceCandidate`, and `reconnectOffer`, not arbitrary signaling commands. Max serialized `json` size 60 KiB (the whole stdin line is capped at 256 KiB). Result `{}` or `server_error`. ### 4.15 `stream_leave` — `{stream_id: string, client_id: number}` Sends `joinstreamrequest id=… clid=… msg= is_remove=1`. Result `{}`. +### 4.15a Publishing: `stream_setup`, `stream_update`, `stream_stop`, `stream_respond`, `stream_remove` + +Metadata arguments: `{name, type, accessibility, mode, bitrate, viewer_limit, audio}`. +`type` is camera `1`, screen `2`, window `3`; `accessibility` is public `1`, official +contacts-only `2`, private/by-approval `3`; only P2P `mode:1` is accepted. `bitrate` +is an integer target in Kbps (`100..100000`), `viewer_limit` is `0..65535` (`0` means +unlimited), and `audio` is boolean, serialized as `1`/`0`. + +| Bridge command | Additional arguments | Legacy wire | +|---|---|---| +| `stream_setup` | none | `setupstream name type bitrate accessibility mode viewer_limit audio` | +| `stream_update` | `stream_id` (required) | `updatestream id name type bitrate accessibility mode viewer_limit audio` | +| `stream_stop` | only `stream_id` | `stopstream id` | +| `stream_respond` | only `stream_id, client_id, decision, offer, message` | `respondjoinstreamrequest id clid decision offer msg` | +| `stream_remove` | only `stream_id, client_id` | `removeclientfromstream id clid reason=4` | + +`stream_respond.decision` is boolean; acceptance requires nonempty SDP (`offer`, max +60000 UTF-8 bytes); denial requires an empty offer. `message` is at most 200 characters. +Eviction reason `4` is the official `KICKED` enum and cannot be chosen by the renderer. +All commands use the existing escaped `OutCommand` and server-acknowledgement path; +they do not synthesize successful server responses. A successful setup command is +not the stream ID: wait for our `notifystreamstarted` notification. Stopping while +that notification is pending retains the session solely to unregister its late ID. + +The renderer publisher owns one peer per authorized UID and source tracks, and +reconciles client-ID reuse on every snapshot. Selected participants are a **local +UID allowlist**, not myTeamSpeak contacts: this mode advertises public metadata +(`accessibility=1`) but never sends an offer/media to an unlisted UID. The stream may +appear in the channel list. By-approval uses private metadata (`3`) and queues +requests until explicit acceptance. Reducing access/limits closes revoked peers +before waiting for server eviction responses. A kicked UID cannot rejoin that share. + +Resolution/FPS/bitrate options apply capture-track constraints and actual per-peer +RTP sender parameters; they are targets/ceilings, not claims of achieved resolution, +throughput or frame rate. Presets fit the source aspect ratio without upscaling; +presentation uses 5 FPS. Sender codecs intentionally offer only H264 High and VP8 +based on the desktop decoder compatibility evidence; AV1/VP9 are not offered by +this sender. SFU publication is unsupported, never relabeled P2P. + +Evidence: `docs/evidence/ts6-publisher-native.json` (DLL hash and legacy argument +assembly addresses), `ts6-publisher-ui-enums.json` (official JS enums/limit logic), +and `ts6-official-client.md`. Static reverse engineering is not live server proof. +`node scripts/smoke-stream-publish.cjs --out ` runs an always-hidden/offscreen +production publisher-to-viewer test using generated canvas and tone only; no capture +device or server is opened. Rust unit tests check exact serialization and the real +stdio smoke checks parser/dispatch rejection offline. A controlled TS6 server and +official viewer are still required for live interoperability verification. + ### 4.16 `shutdown` — no args Disconnects cleanly if needed, responds `{}`, exits 0. @@ -295,7 +409,250 @@ Render only via ``/canvas (SVG included). Cache by `icon_id` / `avatar_hash - At most 3 transfers run at once (the rest queue); each has a 20 s deadline (`io` error). Server refusals surface as `server_error` with `ts_error`. +### 4.18 User context and target-bound actions + +`client_context {client_id, uid}` requests the connected server's permission catalog and +returns `{generation,client_id,uid,is_self,channel_id,is_channel_commander,volume_db, +volume_muted,capabilities,server_groups,channel_groups,permissions}`. The UID must match +the currently visible client. `generation` changes on reconnect; reuse of a numeric client +ID cannot redirect a stale menu operation to another identity. + +Each capability is `{allowed:true|false|null,reason,source}`. `null` means the server must +decide, **not** administrator permission or success. Source evidence is target-specific +`notifyclientpermhints`, effective `notifyclientneededpermissions`, and group membership +power requirements. No role name, icon or “admin” label grants a capability. Reasons are +`server_hint`, `permission_denied`, `server_decides`, `self_only`, `other_only`, or `local`. +If catalog retrieval is refused, context still returns known hints with `permission_error`; +unknown metadata remains unknown. The server rechecks every protocol mutation. + +Group rows contain `{id,name,member,can_add,can_remove}`; channel rows additionally contain +`can_set`, combining the current group's removal requirement with the new group's add +requirement. These fields are capability objects. Only regular server-provided groups +are offered. Permission metadata is `{id,name,description}` from `permissionlist`, not a +hardcoded server-version-specific numeric table. + +`client_action` always requires `{client_id,uid,generation,action,...}`. Unknown fields, +missing required values and invalid ranges are rejected in both IPC and Rust. + +| action | additional fields | behavior | +|---|---|---| +| `poke` | `message` (1–1024 UTF-8 bytes) | `clientpoke`; other clients only | +| `connection_info` | none | `getconnectioninfo`; result `{rows:[...]}` | +| `commander` | `enabled:bool` | self `clientupdate client_is_channel_commander` | +| `server_group` | `group_id,enabled` | `servergroupaddclient` / `servergroupdelclient` | +| `channel_group` | `group_id,channel_id` | `setclientchannelgroup`; channel must still match target | +| `client_permissions` | none | `clientpermlist`; result `{rows:[...]}` | +| `channel_permissions` | `channel_id` | `channelclientpermlist`; result `{rows:[...]}` | +| `set_client_permission` | `permission_id,value:i32|null,skip:bool` | explicit value adds/updates; explicit null deletes | +| `set_channel_permission` | `channel_id,permission_id,value:i32|null` | channel-client permission add/update/delete | +| `kick_channel`, `kick_server` | `reason` (0–1024 bytes) | `clientkick`, reason IDs 4 / 5 | +| `ban` | `reason,duration:u32` | `banclient`; duration is seconds (0 permanent) | +| `volume` | `db:-200..10 (0.5 steps),muted:bool` | local pre-mix gain 10^(db/20) (−200 = silence), no server mutation | +| `avatar` | `data:base64` | self PNG/JPEG, at most 128 KiB decoded | +| `move_to_own_channel` | `password?` | target-bound `clientmove` to current own channel; password encoded | +| `delete_avatar` | none | target-bound `clientavatardeleted cluid=…`, after explicit UI confirmation | + +Volume retains the modifier while muted; reset is `{db:0,muted:false}`. It is keyed by +native UID bytes for the connection lifetime, not a recycled client ID. Result echoes +`{volume_db,volume_muted}`. Persisted modifiers are pushed with `set_local_volumes`; mute is not persisted. + +Read rows contain source key/value strings; render as text, not markup. Only one client +information/permission read is in flight because these notifications are not tagged with +the bridge request ID. Connection reads expose `connection_*` fields, not login tokens. +Avatar bytes upload through `ftinitupload /avatar`; only after TCP upload completion does +the core send `clientupdate client_flag_avatar=`. Success requires the server's +command acknowledgement; file-transfer and command errors remain visible. Uploads have +a bounded deadline and are canceled on disconnect. File-transfer keys never cross IPC. + +Protocol mutation results are `{}` only after server acknowledgement. Server refusals +include the existing numeric `ts_error` and `missing_permission`; preflight hints cannot +override a server rejection. Destructive confirmations belong to the renderer. +Tests use escaped protocol fixtures and disconnected subprocess requests, never real +participant kicks, bans or permission/group mutations. + +### 4.19 Channel file browser: `file_list`, `file_mkdir`, `file_rename`, `file_delete`, `file_download`, `file_upload`, `file_cancel`, `file_transfers`, `file_fetch_image` + +Legacy TeamSpeak file transfer (`ftgetfilelist`, `ftcreatedir`, `ftrenamefile`, `ftdeletefile`, `ftinitdownload`, `ftinitupload`, `ftstop`), implemented in `core/src/file_transfer.rs` and `core/src/files_session.rs`. Every command needs an established connection (`not_connected` otherwise) and a channel the client can see (`not_found`). The main-only snapshot exception permits `channel_id:0` for listing `/icons/` and transferring `/icons/icon_`; renderer file operations still require a nonzero channel. `channel_password` is optional; it travels as base64(SHA-1), like tsclientlib's own transfers, and an empty one is sent as the bare `cpw` flag. + +Remote paths are UTF-8, start with `/`, are at most 512 characters, and every component is non-empty, not `.` or `..`, and contains no control character or backslash. A folder path (`file_list`) is normalized to `/` or `/a/b/`. A file or folder path (`file_mkdir`, `file_rename`, `file_delete`, `file_download`, `file_upload`, `file_fetch_image`) has no trailing slash and is not the root. + +| Command | Args | Result | +|---|---|---| +| `file_list` | `{channel_id, path, channel_password?}` | `{channel_id, path, entries:[{name, type:"file"\|"folder", size, datetime, incomplete_size?}], malformed, capabilities, storage}` | +| `file_mkdir` | `{channel_id, path, channel_password?}` | `{}` | +| `file_rename` | `{channel_id, from, to, channel_password?, target_channel_id?, target_channel_password?}` | `{}` (a target channel moves the item between channels) | +| `file_delete` | `{channel_id, paths:[1..100], channel_password?}` | `{}` (one `ftdeletefile`, one `name` per entry) | +| `file_download` | `{channel_id, path, channel_password?, dest_dir, subdirs?:[..32], overwrite}` | transfer record, `state:"queued"` | +| `file_upload` | `{channel_id, path, channel_password?, source, overwrite}` | transfer record, `state:"queued"` | +| `file_cancel` | `{transfer_id}` | `{transfer_id, cancelled:true}` | +| `file_transfers` | `{}` | `{transfers:[record…], storage}` | +| `file_fetch_image` | `{channel_id, path}` | `{mime, bytes, data}` (base64; same pipeline and limits as §4.17 channel banners) | + +**`file_list` details** +- The server's empty-folder answer (error 0x0501 "database empty result set") becomes an empty `entries`. +- Rows of `notifyfilelist` are matched by the echoed `return_code`, or else by channel and path. Only one listing per folder may be pending; a second one is `bad_request`. +- Arguments sent once for all `|`-joined entries are inherited by the later entries. +- A row is counted in `malformed` instead of being returned if any of these hold: the name is invalid, `type` is not `0` (folder) or `1` (file), or size/datetime are not numbers. +- More than 10 000 rows is an error, never a truncated list. +- The listing fails if the server does not complete it within 20 s. + +**`capabilities`** are the full-width `u64` channel permission hints (`notifychannelpermhints`): `{known, upload, download, delete, rename, browse, create_directory}`. Unknown hints count as allowed, as in the official client; the server decides. No narrowing cast discards high bits. + +**`storage`** is `{capability_extensions, httpft, s3, supported}`. It is computed from `virtualserver_capability_extensions` (tapped from `initserver`/`notifyserverupdated`/`notifyserveredited`) using the official substring test. Known `HTTPFT` or `s3` advertisements cause every file operation except transfer inspection/cancellation to fail with `media_unsupported` and storage detail **before any legacy command or local disk side effect**. No UI override falls back to a different store. Unknown/unannounced capability flags retain legacy requests and authoritative server errors; they do not prove newer-storage support. + +**`file_download` and `file_upload` carry host paths. Only the Electron main process sends them**, built from native dialog results (`app/main/files-main.js`). They are absent from the renderer allowlist. +- `dest_dir` is an absolute, existing folder. + - `subdirs` are created inside it, never through an existing non-directory or symlink. + - Every created name, and the downloaded file name, must be storable on every supported OS. Refused: `/ \ : * ? " < > |`, control characters, a trailing dot or space, and Windows device names such as `CON` or `COM1.txt`. +- A download streams into `.teamspeach---….part` in the target folder, is fsynced, and then moved into place. + - With `overwrite:false` it never replaces an existing name: it uses an atomic hard link, which fails if the name exists. File systems without hard links fail safely; there is no racy check-then-rename fallback. A conflict is `file_exists` (`detail.name`), both before the transfer and at commit. + - With `overwrite:true` (the user confirmed) the move replaces the target. + - Any failure or cancel deletes the temporary file. +- `source` must be a regular file. Its size is measured once and sent in `ftinitupload`. Exactly that many bytes are streamed; a file that shrinks fails the upload. + - With `overwrite:false` a server-side "file already exists" (0x0802) fails the transfer with code `file_exists`. + +**Transfers** +- Main allocates app-global directional slots (default two each, configurable combined maximum ten); at most 512 native records per connection. +- Transfer ids are bridge-visible `u32` values, unique per connection. +- Lifecycle: `queued` → `starting` (`ftinit*` sent) → `running` (stream granted) → [`confirming`, upload only] → `done` | `failed` | `cancelled`. +- A transfer fails with an explicit error in these cases: + - no grant within 30 s; + - no byte moved for 30 s (`file transfer stalled`); + - the connection closes; + - a non-success `notifystatusfiletransfer`. +- An upload is `done` when either of these happens after the last byte and the write-half shutdown: + - the server closes the stream; + - status 0x0811 "file transfer complete" arrives. + Otherwise it fails after 15 s ("server did not confirm the upload"). +- `file_cancel` is refused with `bad_request` in upload `confirming` or once atomic download publication has won the cancellation/commit gate. + - Accepted cancellation wins the gate before reporting `cancelled:true`, aborts the stream task, closes the TCP connection, and prevents a queued disk commit from publishing. The blocking disk worker owns temporary-file creation and cleanup; it closes its handle before deleting on Windows. + - When the `serverftfid` is known (tapped from `notifystartdownload`/`notifystartupload`; the `ftkey` is never stored or logged), it sends `ftstop serverftfid=… delete=1` for uploads and `delete=0` for downloads. + - A grant that arrives after the cancel is dropped and stopped. +- Progress is emitted at most every 250 ms while bytes move. + +Not implemented (explicit limits): +- The TeamSpeak 6 `HTTPFT` and `s3` branches. Exact recovered constructor arguments, bounded RIP-relative/native-function continuation, and unresolved endpoint/payload semantics are in `docs/evidence/ts6-filetransfer-native.json` and `docs/evidence/ts6-filetransfer-native-continuation.json`. These are static interoperability evidence, not server acknowledgements. +- Resume/pause. +- Drag-and-drop upload, because the renderer never holds host paths. + +### `file_transfer` (event) + +`{event:"file_transfer", transfer_id, direction:"download"|"upload", channel_id, path, name, state, bytes, total, error?}`. `state` is one of `queued|starting|running|confirming|done|failed|cancelled`; `error` is an error object (§3), e.g. code `file_exists`, `transfer_cancelled`, `io`, `server_error` with `ts_error`. Records never contain host paths. `total` is 0 for a download until the server reports the size. + +New error codes (§3): `file_exists` (target name exists and replacing it was not confirmed; `detail.name`), `transfer_cancelled`. + +Main chooser APIs take the originating `connectionId`, capture its session epoch, and reject delayed chooser completion after a connection change. Renderer chooser and overwrite-confirmation continuations also capture/recheck the originating connection/session before starting an operation. Tokens remain opaque local-path capabilities; deliberate reuse is not prohibited. Offscreen tests use disposable-profile fixture paths and never invoke a native dialog or OS folder opener. + +Offline regression sources: `test/files-main.test.mjs`, `test/files-renderer.test.mjs`, and `core/src/file_transfer.rs` tests (real loopback TCP transferred bytes/hash, upload/download cancellation, Unicode, empty/short/conflicting files and deterministic cancellation/publication gate). Their existence is not an execution result; final QA records execution after the global freeze. + +### File Transfer preferences and app-wide scheduling + +Official source: installed `html/client_ui/main.js` module `87209` (`SettingsFileTransfer`). It reads singleton workflow settings `alwaysAskForDownload`, `ft_max_parallel_downloads/uploads`, and global native `getTransferSpeedLimit`/`setTransferSpeedLimit`/`updateConcurrentTransferLimits` calls without a connection ID. This supports app-global, not multiplied per-tab, semantics. Source control values: speed 1–25600 MiB/s with 0.5 steps; concurrency at least one each, combined at most ten. + +Implemented main-owned `files-settings.json` persists `alwaysAsk`, `downloadSlots`, `uploadSlots`, rate toggles and remembered rate values, plus `approvedDownloadDir`. The absolute folder never comes from renderer arguments or generic preference updates: only an explicit main native chooser (or disposable-profile offscreen fixture) writes it. The renderer receives a display basename. Choosing/copying is user-invoked; clipboard and native dialogs are disabled in offscreen tests. An unavailable saved folder fails explicitly instead of switching destinations. If no folder has been approved yet, downloading still asks. + +IPC: `files:settings/get`, `files:settings/set`, `files:settings/choose-default`, `files:settings/copy-default`. Set accepts only public booleans/numeric controls; unknown fields and out-of-range values fail. Default: always ask, two uploads/two downloads, rate limits disabled, remembered rates 10 MiB/s. Updates persist via temporary-file rename. + +`TransferScheduler` in `app/main/files-settings.js` tracks native transfer IDs across server cores and allocates directional start slots globally. Native queues retain progress and cancellation while waiting. Start reservations survive event latency, preventing transient duplicate slots. Lowering concurrency does not abort existing/reserved work; those transfers drain before new starts. Closed/reconnected sessions discard obsolete scheduler records. Snapshot upload/download requests pass the same broker. + +Main-only native `file_config` accepts `{download_slots,upload_slots,download_limit,upload_limit}`. Slot zero pauses new starts; CLI/default core behavior remains two per direction until configured. Rates are integer bytes/second; zero means unlimited. Config requires a connected native session and is absent from the renderer command allowlist. Changing rates updates the shared pacing limiter for already-running transfers; no streams are restarted. + +Each direction's global byte ceiling is divided conservatively across currently demanded server cores. Every stream in a core shares one async pacing mutex; each TCP read/write chunk acquires a pacing turn (up to 64 KiB). Config decreases apply before increases. The aggregate rate is not multiplied by tabs; bounded bursts are one chunk per participating core, and already-scheduled chunks finish under their prior pacing interval. Unused per-core bandwidth is not borrowed until allocation changes, so this is a conservative ceiling rather than a work-conserving bandwidth optimizer. Downloads with short reads may be slower than the configured maximum, never faster because of short-read accounting. These user file/snapshot transfer limits do not throttle unrelated cached icon/avatar preview fetches. + +Regression sources: `test/files-main.test.mjs` covers persisted approved destinations and illegal renderer path injection; `test/files-settings.test.mjs` covers cross-core aggregate slots/rates, delayed events, drain-on-reduction and cancellation; `core/src/file_transfer.rs::tests::download_rate_limit_paces_real_bytes_and_can_be_disabled` streams and hashes real loopback TCP bytes and asserts pacing at 1 MiB/s. These tests are prepared; only final QA execution establishes pass status. + + +### 4.20 Server/channel administration + +Every mutation below is answered only after its real server command result. Permission hints never manufacture success. Requests capture a server connection ID in main and its native `generation`; stale mutations fail. Read replies are `{rows:[wire-key/string-value objects]}`, not HTML. Only one reader per notification type is allowed in flight; over 10,000 rows fails rather than silently truncating. Empty database/permission-list replies become empty rows. + +`admin_context {}` returns `{generation,server_uid,own_client_id,catalog_received,permissions,permissions_catalog,permission_error?}`. Permissions are the official named hint values (null if unknown); catalog entries are `{id,name,description}`. + +| Command | Arguments / result | +|---|---| +| `channel_create` | `{generation,parent_id,properties}` → `{channel_id}` from own channel-created event | +| `channel_edit` | `{generation,channel_id,properties}` | +| `channel_move` | `{generation,channel_id,parent_id,order?}` | +| `channel_delete` | `{generation,channel_id,force,confirm}`; confirm exact current channel name | +| `channel_subscribe` / `channel_subscribe_all` | `{channel_id,subscribe}` / `{subscribe}` | +| `channel_description` | `{channel_id}` → `{description}` | +| `channel_list` / `channel_info` | `{}` / `{channel_id}`; observed channel wire properties, info refreshes description | +| `client_info` | `{client_id,uid}`; checks current UID, requests `clientgetvariables` | +| `set_away` | `{away,message?}`; message only when away, ≤80 characters | +| `talk_request` | `{request,message?}`; message only when requesting, ≤50 characters | +| `talk_power` | `{generation,client_id,uid,grant}`; UID checked against live target | +| `server_info` | `{}`; `servergetvariables`/`notifyserverupdated` | +| `server_edit` | `{generation,confirm,properties}`; confirm exact server UID | +| `ban_list` | `{}` | +| `ban_add` | `{generation,ip?,name?,uid?,duration_s,reason?}`; at least one target; 0 seconds permanent | +| `ban_delete` / `ban_delete_all` | `{generation,ban_id,confirm}` / `{generation,confirm}`; confirm decimal ID / `all_bans` | +| `privilege_key_list` | `{}` | +| `privilege_key_add` | `{generation,kind:"server_group"|"channel_group",group_id,channel_id?,description?}`; channel ID iff channel group; → `{token}` | +| `privilege_key_use` / `privilege_key_delete` | `{generation,token}` / `{generation,token,confirm}`; confirm exact token | +| `temp_password_list` | `{}` | +| `temp_password_add` | `{generation,password,description?,duration_s,channel_id?,channel_password?}`; positive duration | +| `temp_password_delete` | `{generation,password,confirm}`; confirm exact password | +| `server_log` | `{lines:1..1000,reverse,instance,begin_pos}`; `logview` → source rows including `last_pos/file_size/l` | +| `client_database_list` | `{start:u32,duration:1..200}` | +| `client_database_find` | `{pattern,uid:bool}`; `clientdbfind -details [-uid]` | +| `client_database_delete` | `{generation,client_database_id,confirm}`; confirm decimal database ID | +| `client_database_id` | `{uid}`; rows with `cluid/cldbid` | +| `server_group_list` / `channel_group_list` | `{}` | +| `server_group_perm_list` / `channel_group_perm_list` | `{group_id}` | +| `channel_perm_list` | `{channel_id}` | +| `server_group_client_list` | `{group_id}`; sends `-names` to include UID/nickname | +| `group_add` | `{generation,kind:"server"|"channel",name,type:0|1|2}` → `{group_id}`; missing/ambiguous resulting ID fails with created detail | +| `group_rename` | `{generation,kind,group_id,name}` | +| `group_set_permissions` | `{generation,kind,group_id,permissions:[{id:string,value:i32,negate?,skip?}]}`; 1..512 rows; negate/skip only server group | +| `channel_set_permissions` | `{generation,channel_id,permissions:[{id:string,value:i32}]}` | +| `server_group_add_client` | `{generation,group_id,client_database_id}` | +| `server_group_member_add_uid` | `{generation,group_id,uid}`; official TS6 `vsgroupassignbyids json={version:1,add:[…]}`; short UID uses `migration`, long UID `client_uid`, group ID string | + +Property allowlists and exact bounds are `core/src/admin.rs` and `app/main/admin-validate.js`: no arbitrary wire fields. Channel passwords are SHA-1/base64 encoded and flag derived; codecs 0..5, quality 0..10; permanence flags mutually exclusive. Main exposes only safe JS integers. Snapshot import reports unrepresentable large integers rather than rounding them. + +UI `admin.js` supplies Away/status controls, channel and server menus, information views, talk-power queue, changed-only channel/server edit forms, bans/keys/temporary passwords and database/log dialogs. Connection/session/generation are captured before asynchronous work. Destructive actions need explicit confirmation; failed acknowledgements keep the form and error. Database pages are 100 entries; log offsets are explicit. Local server-event history is separate from server log retrieval. + +### 4.21 Client-built server JSON snapshots + +Snapshot export/import is main-owned orchestration in `server-snapshots.js` / `server-snapshot-codec.js`, never a fictitious `serversnapshotcreate` or ServerQuery command. It uses ordinary commands above and confirmed local file dialogs. Exact official schema 0.0.1, options, remapping, confirmations and evidence: [ts6spec-snapshots.md](evidence/official-parity/ts6spec-snapshots.md). Server/channel settings, groups, named permissions, members and icons are independently selected. Import is non-atomic: cancellation and per-item/property errors preserve a truthful partial report, not rollback or complete success. Source-backed modern channel banners, SFU endpoint and storage quota are typed mutations; HTTP/S3 icon transfer failures remain explicit, not silently omitted content. + +### 4.22 Whisper routes + +`whisper_start {epoch:u32,target}` resolves a route against the live connection; epoch must be nonzero. Target is `{kind:"list",entries:[{type:1|2,uuid,name}]}`, `{kind:"group",group_type:0..3,target_mode:0..6,group_id,server_uuid}`, or `{kind:"ids",clients:[{id,uid}],channel_ids:[…]}`. At most 255 resolved clients and channels. `whisper_stop {epoch}` stops that route; `set_whisper_receive {mode:"allow_all"|"deny_all"}` controls incoming whispers. + +`audio_frame` accepts optional `whisper:epoch`; stale/stopped/other-generation tags drop, never fall back to ordinary voice. Untagged queued frames also drop while a whisper route is held. Transitions end the previous spurt and discard capture queued before the transition. Incoming `whisper_received {client_id}` feeds reply history; receive deny mode removes queued whispers. This is real TeamSpeak whisper packet routing, not local recipient filtering. + +### Local recording (`recording_*`) + +One recorder per core (= per server connection). Nothing is recorded until `recording_start`; recording stops on `recording_stop`, disconnect (`reason: "disconnected"`), a write failure (`"write_failed"`) or core shutdown. While recording, the core sends `clientupdate client_is_recording=1` (others see REC, like the official client) and `=0` when it stops; failures of that update arrive as `error` events (`client_is_recording: …`). + +| Command | Args | Result | +|---|---|---| +| `recording_start` | `directory` (absolute, ≤1024 chars, no control chars; created if missing), `mode` 1 Multitrack / 2 Master / 3 Both (official values), `label` optional `YYYY-MM-DD_HH-MM-SS` (session folder name, caller's local time; default UTC with `Z`) | `recording_info` object. Errors: `bad_request` (already recording, bad args), `not_connected`, `recording_failed` (folder/manifest/thread). | +| `recording_stop` | — | `{outputPath, finalizing: true}`; files are finalized on a writer thread, then `recording_finalized`. | +| `recording_pause` / `recording_resume` | — | `{isRecording: true, isPaused}`. Paused time is not on the timeline. | +| `recording_status` | — | `{isRecording, isPaused}` | +| `recording_info` | — | official `getRecordingInfo` fields: `isRecording, isPaused, mode, startTimeEpochMs, outputPath, sampleRate (48000), peakBucketFrames (960), timelineFrames, droppedChunks, droppedCaptureFrames, totalBytes, error, tracks[{id, kind: client\|capture\|master, uid (base64), name, instance, file, startOffsetFrames, timelineFrames, audioFrames, bytes}]`; `{isRecording:false}` when idle. | +| `recording_waveform` | `track_id`, `from_bucket` | `{trackId, fromBucket, nextBucket, totalBuckets, bucketFrames, peaks[0..1000]}` (≤2000 per call, last 6000 kept). | + +Events: `recording_state {isRecording, isPaused, outputDirectory, mode, reason?, error?}`, `recording_dropped {droppedChunks}` (first dropped tick after a good one), `recording_finalized {outputPath, ok, error, totalBytes}`. + +Files (`/