Files
client/docs/evidence/official-parity/ts6spec-chat.md
T
omar 21085b967d
ci / linux-arm64-cross (push) Successful in 3m44s
ci / linux-x64 (push) Successful in 3m48s
docs: record native server-chat request constructors
2026-11-02 12:58:34 +03:00

40 KiB
Raw Blame History

TS6 6.0.0.5163 — Detail-pane chat spec (channel / private / poke), composer, toolbar

Sources: C:/Users/Admin/tmp/ts6ref/* extracts plus targeted greps of installed html/client_ui/main.js, main.css, locales/en.json, locales/ru.json. Values are resolved at Medium scale (main.css :root defaults). "Theme" means the CSS module at main.js@92422 (dark) or main.js@201685 (light). Both modules contain the same chat overrides at the same inner offsets, so theme@N below means both. A theme rule beats a main.css rule only when specificity is equal or higher.

Token values used (from themes.txt): see §6.


0. Architecture: what drives which chat

  • One component for every chat. ts-chat (render@3472672) renders legacy channel/private text and room-based chat.
    • Container getters at main.js@~3431811: isLegacy = !this.room, chat = room ? null : item; room is set for the shared NW room class. A room does not by itself imply a myTeamSpeak account.
    • A directly passed channel/client item selects legacy chat. With a decentralized participation, the content view instead passes roomParticipation.room (main.js@4324239 / @4326512).
  • Legacy chat model (module 60408, main.js@2137033). Chat target enum: CLIENT=1 (private), CHANNEL=2, SERVER=3, POKE=4. Event types: None, TextMessage, Poke, ChannelJoined, ChannelLeft.
    • Messages (class main.js@2136580) have the fields time, isPoke, isSystem, isSelfMentioned, isGroupStart, isDayStart.
    • Grouping window constant CU = 30 (minutes).
    • Send, limits and history go through native methods on the chat object: GetMaxInputLength(), GetCanSendMessage(), GetUnreadMessagesCount(), OnMessageDidSend(). In other words these are the TS3-protocol server text messages handled by the native core.
  • How you switch chats. There are no chat tabs inside the chat view. Chat is a content mode of the selected tree item, chosen in the detail pane header's SegmentedControl (main.js@1339858–1344484):
    • channel: ChannelInfo "Info" → Chat "Chat" (universal.chats count 1) → ChannelFiles "Files". Chat is only offered when your own client is in that channel (isAvailable checks GetClients().find(own id)).
    • client: ClientInfo "Info" → Chat (shown only when the client is not yourself) → OwnFiles (unlisted). This is the private chat.
    • server: Recording, Info, ServerLog "Recent Server Events", Permissions … — no Chat mode for the server. A server-chat UI surface was not found (see UNRESOLVED). Only the notification strings settings.notifications.self.text.(from|to).server refer to server chat.
    • Room (chatRoom): Chat / Pinned / Info / Settings. Central/homebase rooms are account-bound; server-hosted rooms use the decentralized server-identity path below. Pinning is non-direct-room-only.
    • The tool button currentChannelToolButton (main.js@1746938) has icon ChannelShowChat, title "Show current Channel Chat" / "Showing current Channel Chat" ("Показать текущий чат канала" / "Показывается текущий чат канала"), and a Notification-style badge = channel.chat.GetUnreadMessagesCount(). The badge is 0 while that chat is the one being shown.
  • Pokes:
    • Pokes are legacy messages with isPoke (bubble class poke; no .poke CSS rule exists).
    • Pokes survive the system-message filter: !e.isSystem || e.isPoke (main.js@2140412).
    • The poke notification widget is render@1730302, string channel.chat.events.client.poked_you "Poked you".

Server-hosted Matrix versus central account chat — static scope correction, 2026-11-02

The server's MATRIXCHAT capability enables hasDecentralMessaging (main.js@2420596). The decentralized manager starts unconditionally (@2482171), unlike central/default participation, which requires account.isConnected || account.isPseudoConnected (@2476536).

On a server connection, getConnectionParticipation keys participation by uuidv5/usedIdentityId (@2556137); connectToDecentral requires that server identity, calls native getWellKnown(scHandlerId) and consumes chat.domain. It then calls tschat_create(scHandlerId, serverUuid, identityId, endpoint) and tschat_connect(tsChatId, displayName, presence) (@2480332, @2486407, @2526967). There is no frontend myTeamSpeak login gate in this route. Native authentication is still unresolved; these static findings are not a successful account-free server-room login.

Incoming PrivateChat invitations create a direct participation. Manual Accept and the default-false autoAcceptIncomingDirectChats setting both set permanentlyJoined=true (@1328392, @3556822), leading to native tschat_joinRoom. Reject calls tschat_leaveRoom. An outgoing private request instead uses tschat_requestPrivateChat(scHandlerId, clientId) and waits up to ten seconds for a matching invitation. Channel participation waits for and accepts its own channel invitation. Peer availability, the CAN_RECIEVE_TEXTMESSAGES hint and room permissions still gate actions.

Both decentralized and central paths use room class NW (@2585285). The edit/reply/react/redact menu does not require a central room (@1523559); edit additionally checks sender/permission and pending/redacted state, and pinning requires a non-direct room. Native sync/E2EE/event behavior has not been exercised. Attachments need server HTTPFT, or the separate central fallback with mytsFeaturesEnabled; do not infer that account-free room text therefore includes central attachment storage.

Static native inspection subsequently recovered two command constructors from TeamSpeak.dll (SHA-256 b4888a71b8e7a029e7124950737874e124aff7404f126ed8140b55273113edcb):

  • 0x181496030 constructs chatlogintoken without adding command parameters.
  • 0x1814b6140 constructs requestchat type=private clid=<uint16>; a different type returns 0x602 before sending.
  • The registered notifychatlogintoken handler at 0x1814b1960 reads string field token and passes it to a per-connection callback. No token value or network traffic was captured.

Exact disassembly and limits are in native-chat-command-constructors.json under C:/Users/Admin/tmp/teamspeach-exact-design-20261101/. These are constructor facts, not an executed exchange; common command transport may add return-code metadata.

Independent implementation still needs the native well-known binding and full envelope, token-to-Matrix login construction and renewal, device/session lifecycle, server uuidv5 derivation and room/sync payloads. The string http://{0}/.well-known/teamspeak/{1} is recorded in ../ts6-filetransfer-native-continuation.json; its placeholders are not established here. Go build metadata identifies the chat library as a private local tschat_client_lib module, not an independently reusable ARM64 implementation.

Feature inventory (legacy server text versus shared room-based chat)

Feature Legacy channel / private chat Room-based (server-hosted or central) Evidence
Send/receive text, BBCode + markdown render yes yes markdown help intro "We still support BBCode" (en.json settings.chat.markdown_help.intro.body)
Join/leave/move/kick/ban/poke system rows yes (legacyEvent + i18nPath) own variants main.js@3305577
Grouping / day start / self-mention flags computed in JS (stampGrouping) room-side main.js@2140019
Unread marker + unread count yes (unread_message_count) yes main.js@2137033
Emoji picker yes (button always rendered) yes main.js@3571557
File/image attach button only if sc_handler.hasFeature(FileTransfer) or (useCentralForChatAttachments && mytsFeaturesEnabled) — main.js@4325033, shouldDisplayFilePickerAction main.js@3539164
GIPHY integration tab external network service — render@1481197
Formatting toolbar / rich-text (CodeMirror) editor yes (client-side markdown) yes useRichTextEditing = workflowSettings.useRichTextEditor, default true (main.js@1298340)
Edit, reply, reactions, pin, quick-action hover bar, read receipts/status, E2EE "unable to decrypt", call-log rows, invites/participation prompts no (they need room / isTSChatMessage) yes quickButtons uses allowed(event, room) (main.js@3262534); edit/reply helpers main.js@1554003
Typing indicator UNRESOLVED for legacy yes —

1. DOM skeleton

Chat container (render@3472672)

div.ts-chat-container.tsv-view [.is-compact | .is-detailed]
  ts-background-hexes
  div.tsv-pinned-message-overlay …            (Matrix pins)
  chat-overlay > div.ts-unread-events-left[.as-addition] > div.ts-unread-events-left__inner
       > span.ts-unread-events-left__inner__unread_text.ts-font-small (ts-icon.inline + "chat.alert.jump_to_unread")
       + ts-button (ts-icon.inline "universal.dismiss")
  ts-loader.tsv-load-spinner
  div.ts-chat-container-overlay
  div.ts-chunk-scroll-track[.scrollbar-visible] > .__thumb, .__chunks > .__chunks__chunk[.is-hovering]
  div.tsv-body.tsv-flex-column.tsv-virtual-list-container
    ts-virtual-list.tsv-flex-grow{loading, scrollbar-visible}
      (rows: ts-chat-room-event-generic-rendered → .ts-rendered-message)
      div{ts-chat-messages-container-typing} > div.ts-chat-input-placeholder
      TSChatQuickActions (hover, Matrix)
    div.tsv-subtitle.tsv-absolute-below-header "chat.waiting_for_messages"   ← empty state
    div.tsv-subtitle.tsv-absolute-below-header "chat.error.you_left"
  TSChatInput
  TSChatDropzoneOverlay

Detailed message row (default style; render@3336866)

[system → ts-chat-room-event-system-compact (legacy, inline-timestamp-only=true)]
div.ts-chat-room-event-detailed{group-start, ownclient, isPending, isError, slim, ts-chat-room-event-selected}
  div.ts-chat-message-header                 (group start only)
    div.ts-chat-room-event-sender-avatar-wrapper > div.ts-chat-room-event-sender-avatar.has-presence.rounded-presence.ts-noselect > ts-icon-stack
    span.ts-chat-message-sender-name.ts-font-large.ts-font-bold{disabled:isSelf} style=color:colorFromString(name)
    span.room-users-title.LocalUser          (if the name matches the server tree; tooltip channel.chat.user.name.tooltip)
    span.ts-font-small.ts-style-caption.ts-timestamp   → formatDate(time,false)
  div.ts-chat-room-event-body
    div.ts-chat-room-event-bubble-container
      ts-chat-detailed-timestamp → div.ts-chat-room-event-timestamp-container.ts-font-minimal
                                     > span.ts-chat-room-event-timestamp (HH:mm) + div.…-flexible-offset
      div.ts-chat-room-event-bubble{poke, self-mention, deleted, ts-unable-to-decrypt-bubble}
        [span.ts-chat-detailed-edited "chat.message.edited_by" | span.ts-chat-detailed-editing]
        parsed-text-render (.ts-chat-message-content.ts-parsed-text-content)
        span.ts-chat-hidden-copy
    ts-chat-message-attachment.ts-chat-message-attachment-container{ts-timestamp-margin-left}
    ts-reactions.ts-timestamp-margin-left.tsv-mar-t-minimal      (Matrix)
  ts-chat-message-unread "chat.unread_messages"

Legacy system row (component ts-chat-room-event-system-compact, scope data-v-5c102790, render@3304620)

div.ts-chat-room-event-detailed.is-system{slim, has-self-mention, group-start, selected}
  [div.ts-chat-message-header > span.ts-font-minimal.ts-style-caption "chat.conversation_started"]  (not for legacy: renderHeaderOnGroupStart=false)
  div.ts-chat-message-system-body.compact{slim-layout}
    div.ts-chat-message-system-body-icon      (class only when inlineTimestampOnly)
    div.ts-chat-message-system-body-contents.ts-chat-message-system-body-contents-spaced
      i18n.ts-font-small(path=legacyEvent.i18nPath) with <strong> slots victim/invoker/channel (click/contextmenu → client context menu)
    span.ts-font-minimal.ts-style-caption.ts-chat-message-system-time   (inline timestamp: formatDate(timeDate,false,false))
  ts-chat-message-unread (literal text "Unread Messages", not i18n)
  • In the outer wrapper, a system row is preceded by div.ts-chat-day-start.ts-font-small ("Conversation started: {time}") when isDayStart (main.js@3327217).

Compact message row (setting "Compact"; render@3327069)

div.ts-chat-room-event-compact > div.ts-chat-message-compact-container > div.ts-chat-room-event-compact.actual{poke,self-mention}, which contains:

  • div.ts-chat-message-compact-details > span.ts-chat-timestamp.ts-font-minimal
  • div.ts-chat-sender.ts-chat-sender-name{group-start} (coloured)
  • status
  • div.ts-chat-message-main

Composer (render@3561789)

div.ts-chat-input-container{focus, showEmoji, ignoreHover, ts-chat-input-hide}
  div.ts-card.ts-chat-prompt[.warning|.ts-participation] …  (prompts, Matrix/direct-request)
  transition > ts-chat-input-integrations.ts-chat-input-emoji-picker{maxWidth}
       (= div.ts-flex.column > div.ts-chat-input-tabs > div.ts-chat-input-tab{active}… + div.ts-chat-input-integration-container)
  transition > div.ts-chat-scroll-to-bottom > TSButton.ts-chat-scroll-bottom-button.tsv-action-subtle
  div.ts-chat-input-top-section
    div.ts-chat-editing-wrapper > div.ts-chat-referenced-event{is-hoverable} … + TSButton.ts-chat-editing-abort "universal.abort"
    ts-chat-autocomplete.ts-chat-input-container-autocomplete   (emoji ":", users "@", markdown "/")
    div.ts-chat-input-container-previews > div.ts-chat-input-previews > TSChatInputFilePreview*
    div.ts-card.ts-chat-typing > span.ts-dot-animate > div.dot-pulse{animated}; span.ts-style-caption.ts-typing-text
  div.ts-chat-input-container-content
    div.ts-chat-input-edit-toolbar{is-attached-to-autocomplete}
       TSButton.ts-chat-input-edit-toolbar-button{is-group} (+ ts-icon.ts-chat-input-edit-toolbar-button-expander{only-text}) …
       TSButton.ts-chat-input-edit-toolbar-button.is-overflow ("More")
    div.ts-chat-input-edit-toolbar-measure (offscreen clone used for overflow measuring)
    div.ts-chat-input-container-content-inner
       TSChatInputTextarea.ts-chat-input → div.ts-chat-input-textarea-inner{editing} > div.ts-chat-input-textarea-inner-editor.ts-parsed-text-content{is-empty}[data-placeholder]
       div.ts-chat-input-container-actions
          TSButton.ts-chat-emoji-button.tsv-action-subtle (icon ChatEmoji)
          TSButton.ts-chat-image-button.tsv-action-subtle (icon ChatImage)   [conditional]
          TSButton.ts-chat-send-button{disabled} (icon ChatSend)

Refs: render@3561789, main.js@3570908, main.js@3571557, main.js@3572062.


2. Measurements (Medium scale)

2.1 Pane / list

Element Property DARK LIGHT Ref
detail pane body background --tsv-bg #2b3346 #f5f5f5 .tsv-body-background main.css@90047 [INFERENCE: the detail pane is not .tsv-activity-secondary]
detail header backdrop background --tsv-shaded-bg #222A3C rgb(235,235,235) theme@35204
.ts-chat-container user-select:text; --tsv-overlay-respecting-top-space = 1px + transparent-header(0) + pinned(0) = 1px same same main.css@534826
virtual list native scrollbar hidden; .scrollbar-visible adds padding-right 10px main.css@536117, @541403
chunk scroll track right 0; width 8px; top = overlay-space + 8px; opacity 0 unless .scrollbar-visible main.css@540234
scroll track thumb radius 8px; bg --tsv-scrollbar-bg #0B111D UNRESOLVED (light value not in themes.txt excerpt) main.css@540548
scroll track chunks radius 8px; opacity .75; even = hsl(189 79% 34%), odd = hsl(208 47% 31%); hover = tint2 at .85 main.css@541008–541321
load spinner top 16px; radius 50%; bg --ts-context-menu-background rgba(20,23,32,.85) rgba(230,238,243,.85) main.css@536227
empty-state text .tsv-subtitle.tsv-absolute-below-header; absolute, top 1px, width 100% main.css@535040
.ts-chat-messages-container-typing height 41px; transition .5s main.css@534652

2.2 Detailed message (default style: chat_compact=false, main.js@1299504)

Element Property Value (both themes unless noted) Ref
.ts-chat-room-event-detailed padding-left 15px (theme 1.5*10; overrides main.css 20px) theme@31422
--tsv-timestamp-width 58px (33 + 2·20 − 15; theme) theme@31422
white-space nowrap main.css@496611
layout flex column; flex 1 main.css@496611
highlight vars border = tint, border2 = tint2, bg = shaded-bg-selection (#1A2B50 / #cccccc) main.css@496611
.ts-chat-room-event-body margins / padding margin-top 2px, margin-bottom 1px (theme), padding-left 5px, flex 1 theme@32434, main.css@496928
.ts-chat-message-header box height 22px; line-height 22px; margin-bottom 4px; padding 0 main.css@497113
group-start margin-top 4px theme@32532
sender name font 16px / 19px (.ts-font-large), weight 700 (theme bold) theme@31811
colour colorFromString(name), see §3 main.js@3339106
hover opacity .75, cursor pointer (not when self/disabled) main.css@497378
click / contextmenu opens the sender unified menu
header timestamp .ts-timestamp font 13px / 14px, weight 300, uppercase theme@34262
colour --tsv-font-color #FFFFFF / #1a1a1a (theme beats .ts-style-caption) theme@34262
spacing margin-left 5px theme@34262
avatar size 37.95px square (1.15 × 33) theme@32633
margin 17.5% 16px 0 0 (top margin is % of the containing block width) theme@32633
other radius 33px; --tsv-icon-scale 1.725; cursor pointer; z-index 1; inside a float-left wrapper; animated avatar swaps on hover main.css@490864, @491468
presence ring has-presence.rounded-presence → presence-width-large vars theme@106674
timestamp column box width 58px (min = max); flex column, justify flex-end; user-select none main.css@501410
.ts-chat-room-event-timestamp box padding 2px 5px; radius 4px; 13px / 14px (ts-font-minimal); right-aligned; pre-line main.css@501662
colour transparent by default main.css@501662
row hover colour --ts-muted-font-color #797878 (main.css root; no theme override found); bg --tsv-bg main.css@502225, @502135
group-start rows visibility hidden (the header carries the time) theme@32966
text HH:mm (24h default, use24hrTime=true) or h:mm A main.js@1249144, @2175222
hover tooltip (400ms) full date formatDate(time,false,false,true,true) main.js@3334866
bubble container layout flex; align stretch; margin-left 0 main.css@498725
.ts-chat-room-event-bubble (remote) background --tsv-chat-remote-bg #697a97 / rgb(164,186,224) main.css@499619
text colour --tsv-chat-remote-font-color #FFFFFF / #333 main.css@499619
padding 8px 12.5px (theme) theme@31907
radius 8px; top-left 0 on group start theme@31907
spacing / layout margin-right 25px; flex-grow 0; flex-shrink 2; min-width 0; word-wrap break-word; flex column main.css@499619
bubble tail ::before shape border-bottom 14px transparent; border-right 12px solid bubble colour; left 0, top 0; translateX(calc(−100% + 1px)) main.css@500639 + theme@32108
non-group-start radius 8px all corners; tail display:none theme@32231, @32367
own bubble (.ownclient, exact [class=ts-chat-room-event-bubble] only) background --tsv-chat-self-bg #0C1326 / rgb(138,206,204) main.css@495968
text colour --tsv-chat-self-font-color #FFFFFF / #333 main.css@495968
tail same colour main.css@496152
link colour tint #1588FA / #5DA1CB theme@32856
message text .ts-chat-message-content font 16px / 19px (theme large; overrides main.css round(1.5625em)) theme@31675
links in bubble colour --tsv-chat-link-color = #081cbd both themes (theme var on .ts-chat-room-event-detailed); .ts-currently-referencing → #1A0D96 theme@31422, main.css@500543
deleted bubble colours bg #684454 / rgba(255,130,130,.25); text #E0E0E0 / rgb(121,121,121); italic; tail same colour main.css@500042
self-mention bubble colours bg rgb(37,221,133) / rgb(255,212,119); tail same main.css@500325
pending (.isPending, .ts-chat-message-pending) colours bg #138b81 (both); text self-font colour main.css@503006, @538378
failed (.isError) colours bg #138b81 (.isError rule) main.css@503403
failed (.ts-chat-message-failed) colours bg error-light rgb(255,130,130) / rgb(218,77,77) main.css@538925
pending / error status content Retry + Discard buttons ("universal.retry" Retry/Повторить, "chat.message.pending.discard" Discard/Сбросить) render@3319078
emoji-only message (apparently-people-like-huge-faces) look bubble transparent, no tail; emoji 55px main.css@496316, @502779
emoji default size 24px (--tsv-emoji-size) main.css@539501
edited marker icon in subtitle colour; absolute bottom 2px, right −5px, translateX(100%); tooltip "Edited by {user}, {time}" main.css@497810
selected row ::before look bg --room-event-highlight-bg; 1px tint2 ring; radius 4px; left-mask gradient main.css@499120
slim layout avatar 15px square, top 2px; bubble container margin-left 0 main.css@503688
attachments box height 250px (compact 180px); inner bg contrast-bg (#0C1326 / #C9D9E5); 1px separation border; radius 8px; max-width 425px; min-width 50% main.css@511145, @511676

2.3 Legacy system / event rows (join, leave, move, kick, ban, poke), data-v-5c102790

Element Property DARK LIGHT Ref
row wrapper box .ts-chat-room-event-detailed.is-system, padding-left 15px; timestamp column display:none (theme) same theme@31422, @33063
.ts-chat-message-system-body.compact background linear-gradient(90deg, --ts-chat-system-message-bg 0, transparent 80%) = #131824 → transparent #C9D9E5 → transparent main.css@477464
layout flex; width calc(100% − 16px) same main.css@477464
radius / padding radius 10px; padding 2px 0 same theme@33354
position margin-top 4px; position relative; left −2px same main.css@477768, @479361
icon slot (.ts-chat-message-system-body-icon, legacy only) size width / min-width --tsv-system-icon-width 32px (set on .ts-rendered-message) same main.css@477886, @490367
look mask linear-gradient(90deg, #000, transparent 90%); svg fill secured-text colour #3dda8b / rgb(40,151,96) main.css@478107
contents typography colour subtitle #697A97 / #445d77 (theme); 15px / 15px (main.css); flex 1 0 50%; text 13px / 15px (theme .ts-parsed-text-content; legacy i18n span .ts-font-small 13/15); word-break break-all; white-space normal main.css@478270, theme@33670, @33848
margin 2px 0. The compact rule (specificity 0,4,0) beats theme 0 0 0 5px (0,3,0) [INFERENCE from specificity] main.css@479864
spacing each child except the last gets margin-right .5ch (-spaced, legacy) main.css@478693
strong (names / channels) look weight 700; colour --ts-chat-system-message-text-color #acacac (main.css root) / rgb(100,100,100) (light theme); cursor pointer; click / contextmenu opens the client menu theme@34116, main.css@477187
.ts-italic inside look font-style normal theme@34014
inline time .ts-chat-message-system-time look colour subtitle; opacity .75; line-height 15px; margin 2px 5px; 13px / 14px (ts-font-minimal). Text formatDate(timeDate,false,false) → today: "HH:mm - ddd" (time.format.same_day.at) main.css@479522, main.js@3307119
icon-on-hover (matrix detailed system variant) animation icon opacity 0 → 1 and translateX(50%) → 0, .2s / .1s main.css@486466
selected system row ::before look shaded-bg-selection; radius 7px (1.75 × 4) main.css@477330, theme@33543

Legacy event strings (en / ru):

Key English Russian
channel.chat.events.client.joined "{invoker} joined the channel" "{invoker} вошел(-ла) на канал"
.joined.from_channel "{invoker} joined coming from {channel}" "{invoker} присоединился(-ась) с канала {channel}"
.left "{invoker} left heading to {channel}" "{invoker} ушел(-ла) на {channel}"
.moved.from "{victim} was moved to {channel}" "{victim} перемещен(-а) в {channel}"
.moved.into "{victim} was moved from {channel}" "{victim} был(-а) перемещен(-а) с {channel}"
.kicked.from "{victim} was kicked from the server" "{victim} был(-а) кикнут(-а) с сервера"
.poke.received "{invoker} poked you: {message}" "{invoker} толкнул(-а) тебя: {message}"
  • The *.by_invoker and *.with_reason variants are listed in en.json lines 58–80 (banned / kicked / moved).
  • Poke sent: "You sent a poke: {message}".

2.4 Day divider / unread

Element Property DARK LIGHT Ref
.ts-chat-day-start look subtitle colour; 13px / 15px; padding 2px 0; selectable same main.css@504638
text "Conversation started: {time}" / "Беседа началась: {time}" (formatDayOnly, see UNRESOLVED)
.ts-chat-message-unread layout flex row, centered; margin 16px 0 8px same main.css@476309
rules (::before / ::after) 45×1px each, colour --ts-chat-system-highlight-text-color rgb(22,188,251); gap 10px to the text rgb(50,133,167) main.css@476473
label span.ts-style-caption in the same colour (13px / 15px); "Unread Messages" / "Непрочитанные сообщения" render@3302322
.slim start-aligned; margin-left 10px; only ::before, 30px wide, gap 5px main.css@476927
Jump-to-unread banner .ts-unread-events-left.as-addition box width calc(100% − 20px); margin 8px 10px 0; no bg (theme); inner border-top 1px subtitle colour, padding-top 4px; text 13px; cursor pointer theme@84051, @84273
text "There are unread messages — jump to last seen" / "Есть непрочитанные сообщения — перейти к последнему просмотренному"; button "Dismiss" / "Закрыть"

2.5 Compact style (alternative setting)

  • Row padding-left: 10·1.5 + 5 − 4 = 16px (main.css@504759).
  • Timestamp: subtitle colour, opacity .75, width 65px, margin-right 5px; non-first rows use the muted colour (main.css@508378, @509475).
  • Sender: 13px, weight 700, line-height 1rem; shown on group start only; colour from colorFromString (main.css@508607, main.js@3329666).
  • Message text colour #b5b5b5 (.ts-parsed-text-render; main.css@508289).
  • Mention row: gradient from mention-bg to transparent 90%, opacity .2 / .5 (main.css@506888).
  • Selected row: #1b2c50 plus a tint2 ring (main.css@505392).

2.6 Composer

Element Property DARK LIGHT Ref
.ts-chat-input-container position absolute; bottom 0; margin 10px; width / min-width calc(100% − 20px); z-index 3; flex column same main.css@206847
border 1px solid #697a97 (--tsv-chat-remote-bg, theme) rgb(164,186,224) theme@34684
radius 8px (theme)
background #2b3346 (--tsv-bg, theme) #f5f5f5
hover / .focus border-color highlight #1588FA (main.css 0,2,0 beats theme 0,1,0) --tsv-icon-tint = tint #5DA1CB main.css@207222
.ignoreHover separation border #1D1F20 rgb(189,189,189) main.css@207660
.showEmoji top-right radius 0; z-index 101 main.css@207491
.ts-chat-input-container-content look bg --tsv-bg (theme); radius 8px; flex column; z-index 6 theme@34898, main.css@211964
light extra --ts-chat-background-color = contrast-bg on .ts-chat-input-container-inner; input colour font-color main.js@201685@115487 (light only)
content-inner layout flex row, nowrap, stretch main.css@212210
editor .ts-chat-input typography 14px, weight 400, letter-spacing −0.025rem (−0.375px at the source's fixed 15px root), line-height 18px, colour font-color (#FFF / #1a1a1a) main.css@212377, @1034
box padding 8px 10px; max-height 250px; transparent; no border
.error colour --ts-error-color #f82929
placeholder (.is-empty::before) look subtitle colour #697A97 / #445d77; 14px; absolute 0,0 main.css@205825
text "Send Message" / "Отправить сообщение" (client.action.message.button, count 1) main.js@3540267
other texts disabled: "Cannot send messages at this time" / "В настоящее время невозможно отправлять сообщения"; with attachments: "Add Comment" / "Добавить комментарий"; editing with attachments: chat.input.currently_editing_attachments
CodeMirror selection look color-mix(shaded-item-selection (= --tsv-bg) 80%, transparent); caret font-color main.css@206599
max length legacy: native chat.GetMaxInputLength(); fallback 4096 when there is no chat object main.js@3540718
actions row box flex row; height 26px; margin auto 3px 4px auto; children margin auto 2px (theme) main.css@211296, theme@34964
order Emoji → Image / File (conditional) → Send main.js@3571557
send button look icon fill tint (#1588FA / #5DA1CB); hover scale(1.2) main.css@211633
disabled opacity .5, no scale. Disabled when (msg, previews and attachments are all empty) OR isDisabled, unless overridden main.js@3572062
emoji / image buttons tsv-action-subtle TSButton (button styling in buttons spec)
scroll-to-bottom box absolute; right 0; bottom calc(100% + 8px); 38×38px; svg scale(2); slide transition translateY(38px) .15s main.css@215615
typing line .ts-chat-typing box absolute; left 0; bottom calc(100% − 8px); text subtitle colour main.css@209608
dots 4px subtitle-colour dots, radius 3px; 2s pulse; .ts-dot-animate left 15px, width 25px; text padding-left 10px main.css@207849–209141
text "{user} is typing…" / "{user} печатает…"
emoji picker box 375×375px (max-height 60vh); absolute; bottom 100%; right −1px; bg shaded-bg (#222A3C / rgb(235,235,235)); separation border, bottom transparent; top radii 4px; z 3; .maxWidth → calc(100% + 2px) main.css@210465
hover / focus border highlight
search placeholder "+1, 😀, …"
picker tabs box height 36px; padding 0 6px; bg contrast-bg (#0C1326 / #C9D9E5); each tab 36×36; active = shaded-bg; icon 22px centered main.css@202405
tab order emoji first, then integrations (GIPHY) render@3502579
integration panel box height calc(100% − 36px); .ts-chat-input-panel padding 0 6px main.css@203066, @203172
file preview tile box 150×150px (100 at ≤800px viewport height, 75 at ≤600, 65 at ≤500); bg shaded-bg; separation border; radius 8px; margin-right 5px; failed → error-light border main.css@199140
close box top / right 5px
previews strip box padding 5px 10px 0; 8px scrollbar main.css@210895
referenced-event bar (edit / reply) look bg contrast-bg; border-bottom 2px --tsv-shaded-bar-bg (= --tsv-bg); radius 4px; hover bg --tsv-bg; "Jump To"; Abort button top-right main.css@216335
autocomplete box max-height 300px; padding 10px; border-bottom separation main.css@190573

2.7 Formatting toolbar

Element Property Value Ref
.ts-chat-input-edit-toolbar box flex, align center; bg shaded-bg (#222A3C / rgb(235,235,235)); border-bottom 1px separation (#1D1F20 / rgb(189,189,189)); top radii 8px; gap 2.5px; padding 2px 10px; nowrap; overflow hidden main.css@213134
autocomplete open top border transparent, square top main.css@213580
button box transparent; border 2px solid transparent; radius 2px; min-height 24px; padding 0 2.5px; colour font-color; with icon → content margin-left 5px; .is-group → padding-right 0 main.css@214153
hover bg color-mix(--tsv-bg 65%, transparent); border-bottom tint; icon tint main.css@215101
active color-mix 80% main.css@215372
transition background-color / border-color .2s ease main.css@214885
group expander icon look 16px, subtitle colour, margin-left −5px (0 when the group has no icon) main.css@213789
show / hide animation opacity + translateY(3px), .2s (used unless "Always Visible") main.css@212890

Visibility setting chat_input_toolbar_visibility (default "always-visible", main.js@1299504):

  • Hidden: never shown.
  • Dynamic: shown when the text is non-empty or while editing.
  • Always Visible: always shown.
  • Logic at main.js@3522855. The setting strings are under §4 "Toolbar visibility setting".

Button order ve (main.js@3517677). Overflowing items collapse into the More / Ещё button (.is-overflow, measured offscreen).

# id Icon Label EN / RU Action / insert Ref
1 bold FaBold Bold / Жирный toggleBold **…** main.js@3507738
2 italic FaItalic Italic / Курсив toggleItalic *…* main.js@3507437
3 strike FaStrikethrough Strikethrough / Зачёркивание toggleStrikethrough ~~…~~ main.js@3508029
4 underline FaUnderline Underline / Подчёркивание toggleUnderline ++…++ main.js@3508356
5 link FaLink Link / Ссылка […](https://) main.js@3510417
6 quote FaBlockquote Blockquote / Блочная цитата > on each line main.js@3511967
7 codeblock FaCode Code Block / Блок кода toggleCodeBlock ``` main.js@3513413
8 lists-group FaListUl Lists / Списки ul - , ol, task - [ ] main.js@3512491
9 spoiler-group Hidden Reveal / Показать spoiler ||…|| (toggleSpoiler) main.js@3509534
10 heading-group FaHeading Heading / Заголовок h1–h6, setext (Section title\n---) main.js@3505575
11 others-group (none, text only) Others / Другое highlight ==…==; Code (inline `); Math ($…$, sub ~…~, sup); Footnote ([^…], def); Align (left / center / right / justify :::x); Links main.js@3518074, @3508674, @3516673

3. Behaviours

Grouping (stampGrouping, main.js@2140019):

  • The first message is both a group start and a day start.
  • isDayStart = the weekday (getDay()) differs from the previous message.
  • A non-system message starts a new group when the sender differs, the gap is ≥30 minutes, or the previous message was a system message.
  • A system message starts a group when the previous message was not a system message.

Sender key:

  • Client sender → "" + client.id.
  • Otherwise → `${uuid}-${id ?? -1}`.

System messages filter:

  • Setting chat_show_system_messages (default true), labelled "Show Moderation Events".
  • When it is off, only system rows that are pokes survive.

Sender name colour (colorFromString, main.js@1253518):

  1. Hash: h = c + ((h << 5) − h) over the name.
  2. Colour: hex of h & 0xFFFFFF, zero-padded to 6 digits.
  3. Contrast check against the computed --tsv-bg (fallback #2b3346), up to 3 iterations:
    • If the luminance difference (299R + 587G + 114B)/1000 is < 40, or the RGB Manhattan distance is < 80, convert to HSV.
    • If luminance difference < 40: S = min(100, S × (S > 50 ? 0.5 : 1.5)) and V = min(100, V × (2 − V/100)).
    • If distance < 80: hue += 60.
    • Convert back to RGB (main.js@1252141–1252646). The HSV→RGB tail was not read; assume standard [INFERENCE].

Name hover and pills:

  • Hover over a sender name shows a custom tooltip.
  • The LocalUser pill appears when the name matches the server tree.
  • Pill style: subtitle colour, 16px, padding-left 10px, top 3px (theme), with a ::before bar 5px wide × 10px tall in subtitle colour (main.css@503940, theme@103560).
  • Tooltip: "Username matches Server Tree" / "Имя пользователя совпадает с записью в дереве сервера".

Timestamps:

  • Group-start rows show the time in the header (uppercase), formatted by the calendar rules: same day "HH:mm - ddd", last day / last week "HH:mm - ddd", next week "dddd", else "HH:mm - L" (time.format.*, main.js@2174753).
  • Following rows show "HH:mm" in the left column, visible only on row hover.
  • 24-hour format is the default (use24hrTime=true).

Truncation:

  • Message text wraps (pre-wrap, break-word).
  • The detailed row itself is nowrap; the bubble wraps via word-wrap.
  • Attachment links truncate with an ellipsis.

Mentions and spoilers:

  • .md-mention is bold and has a pointer cursor; self / everyone mentions use the default cursor.
  • A self-mention turns the whole bubble mention-coloured.
  • Spoiler: background --tsv-spoiler-background-color, opacity .7; click to reveal (main.css@355108).

Hover quick-actions bar:

  • Pill radius (theme), shaded-bg at .9, buttons separated by 1px --strong-bg dividers; shows at most 2 buttons plus an expander.
  • Room-based: needs room, which may belong to a TS server or the central/account connection.

Keyboard and drag-drop:

  • Composer: keydown handler, paste handler, drop handler.
  • Drag-and-drop overlay: "Drop a file here to add it to your message"; maximum drag size 5 MB (chat.attachment.dnd.error.too_big_drag).

Icon sizes:

  • Toolbar and composer icons: 22px default.
  • Toolbar group expander: 16px.
  • System icon slot: 32px.
  • Picker tab icons: 22px.

4. Other i18n (en / ru)

Key English Russian
chat.waiting_for_messages Waiting for messages Ожидание сообщений
universal.system System Система
chat.message.edited_by Edited by {user}, {time} Отредактировал(-а) {user}, {time}
chat.message.deleted_by Deleted by {user}, {time}. Удалено пользователем {user}, {time}.
chat.input.start_conversation Send a message to start the conversation! not looked up
client.action.open_chat Open Private Chat not looked up
client.info.chat.open Start Private Chat not looked up
Toolbar visibility setting Editing Toolbar Visibility: Hidden / Dynamic / Always Visible not looked up
Rich text setting Use Rich Text Editor not looked up
24h setting Format timestamps to display as 24-hour not looked up

5. UNRESOLVED

  1. Server chat surface. There is no server Chat content mode in contentModes.server. The SERVER=3 target exists, but where server chat is shown in 6.0.0.5163 was not found.
  2. formatDayOnly implementation (the day-start text format) was not traced.
  3. Day divider in detailed non-system rows. Whether non-system detailed rows render .ts-chat-day-start was not confirmed; the skeleton shows it only for system and compact rows.
  4. Legacy max input length. The value returned by native GetMaxInputLength() is not visible in JS.
  5. Typing indicator for legacy chats (whether TS6 servers support it) was not checked.
  6. Legacy context menu items. The right-click menu for legacy messages (copy etc.) was not enumerated.
  7. Light --tsv-scrollbar-bg. Not present in the themes.txt excerpt.
  8. Chat header DOM. The header is the generic CentralHeader (.tsv-content-header-bar + ContentItemCell + ToolButtons + SegmentedControl, render@2975910); its dimensions belong to the header/base spec and are not repeated here.
  9. Extra composer buttons. Exact icons and conditions for the "image" button versus a generic file picker when FileTransfer is unavailable were not checked beyond the getter quoted in §0.

6. Tokens referenced

Token DARK LIGHT
--tsv-bg #2b3346 #f5f5f5
--tsv-shaded-bg #222A3C rgb(235,235,235)
--tsv-contrast-bg #0C1326 #C9D9E5
--tsv-tint #1588FA #5DA1CB
--tsv-tint2 = tint (#1588FA) #22658f
--tsv-font-color #FFFFFF #1a1a1a
--tsv-font-subtitle-color #697A97 #445d77
--tsv-separation-border-color #1D1F20 rgb(189,189,189)
--tsv-error-light-color rgb(255,130,130) rgb(218,77,77)
--tsv-shaded-bg-selection #1A2B50 #cccccc
--strong-bg #0B1124 = contrast-bg (#C9D9E5)
Scale font 15 / content 14 / small 13 / minimal 13 / large 16; line-heights 19 / 18 / 15 / 14 / 19; padding-h 20 / 10 / 5; padding-v 16 / 8 / 4 / 2; bar 36; bar-element 26; radii 10 / 8 / 4 / 2; icon 22 / 16 / 33 / 55; portrait 38 same