Repository / docs/PANEL-SAFETY.md
Panel safeguards
TgWitness / Documentation · Getting started
Documentation · Accounts · Storage
The panel double-checks which account you're acting as, inspects imported files before signing in and keeps chat actions off until you turn them on. It's about avoiding mistakes; the server still checks permissions on its own.
On this page
File check#
! No session found
Only application settings. Add .session / TData,
or sign in by phone or QR.
[Choose files] [Phone] [QR] [Connect — disabled]
✓ Session found — Telegram will validate it on connect
Device Synthetic desktop
Platform Windows 11
Version 5.13.1 x64
Language en
[Connect] or, when another account is connected:
[Create workspace and connect]
Green means a usable session was decoded, not that Telegram accepted it. Broken ZIPs, mixed app IDs and incomplete credentials each get their own error. A settings-only JSON never shows success.
Extra workspaces can be deleted by typing their name, which also deletes their journal, files and key. The main workspace can't be deleted here.
Account context#
Workspace [Case A ▾] / Exports [avatar] @account_a
! You are viewing @account_a, but @account_b is selected.
Actions are paused until the account is confirmed.
Account in this link: @account_a.
[Switch to the account in this link]
The URL decides the workspace. Late responses from a previous selection are ignored and the mismatch notice blocks everything until you pick. Export confirmation names the account and checks again after you confirm.
Direct links keep their page and workspace even if first setup isn't finished. Reconnecting an account keeps its workspace and key, adding another one creates a new workspace. Pending confirmations belong to the workspace they started in and get cancelled when you switch. A temporary load failure offers Retry instead of logging you out.
Read-only chat#
[✓] Read only [✓] Mask secrets
Sending and bot actions are hidden.
Password: B4X••••• [Show]
Turning on chat actions shows the composer and bot buttons. Sending or pressing a bot button asks for confirmation naming the account; consent lasts ten minutes or until you switch chat. Opening or joining a Telegram link has its own confirmation.
Secret masking is a heuristic (passwords, tokens, keys, OTPs, sessions, card numbers), it won't catch everything. List previews always mask. Revealing a value writes a journal note first, without the secret itself. Saved bytes and signed exports don't change; if the recipient should get less, use a disclosure export.
Downloads#
If the file picker is denied or writing fails, the panel falls back to a normal browser download through a short-lived one-time cookie. Tokens never go into URLs.
Prepared exports show what each file holds, size, SHA-256 and Download again. The cache keeps up to 20 files within 2 GiB plus the latest one. "Sent to the browser" doesn't mean received, check your Downloads. Chat exports, handovers, account archives, disclosures and group exports say "saved" only after the panel wrote the file through the browser's save picker. Otherwise the panel says the download started, and a chat export keeps its download button.
Big account archives stream straight from the job. A job can't be removed while its archive is downloading.
Code map#
Files (in tgwitness/) |
What |
|---|---|
account_import.py, static/account-import.js, static/account-import.css |
Import preflight, account card, extra workspaces, deletion |
app.py, middleware.py, access.py |
Server checks, workspace identity, audited reveals, download auth |
static/core/workspace-safety.js, static/workspace-safety.css, static/router.js |
Account header, URL ownership, mismatch blocking |
static/app.js, static/chat-safety.js, static/views/chats.css |
Read-only chat, confirmations, history loading |
static/privacy.js, static/views/chat-list.js, static/analysis.js |
Masking and audited reveals |
export_history.py, downloads.py, static/views/exports.js |
Retained exports, download copies, cache limits |
static/components/journal.js, static/core/time.js |
Event numbering and missing-data labels |
locales/ru.json, english_fallbacks.json |
Russian copy and English fallbacks |
Analysis previews follow the same masking setting, but masking doesn't redact what gets sent to a model after you approve it.
Checks#
The private validation workspace covers import preflight, chat safety, workspace downloads, prepared-export access, services, settings and privacy controls using synthetic Telegram and storage clients. Browser coverage includes Chromium, Firefox and WebKit; Playwright WebKit does not qualify a real iPhone.