chore(client): checkpoint deployed features and unfinished server management

User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
This commit is contained in:
Loki 2026-11-01 15:31:21 +01:00
parent 15f03bf8df
commit f04691c3cd
Signed by: boba
GPG key ID: 253067914055423B
90 changed files with 9599 additions and 371 deletions

View file

@ -0,0 +1,29 @@
# Global channel management
The additive Session.node_admin flag (field 4, default false) advertises permission
for the connected Central account to manage this node's global channels. The
client never grants this permission itself and clears it on disconnect.
The global sidebar offers text/voice creation, rename and explicit delete
confirmation only when advertised. Guild and direct-message views remain outside
this UI. Requests use existing ChannelCreate/Delete and ChannelEdit (0x0036);
server broadcasts acknowledge success. Errors remain visible in the dialog;
ten-second timeout reports uncertainty, and no channel list mutation is optimistic.
Channel IDs are client-generated UUIDs, names are trimmed and limited to 100
characters without controls, and every Rust callback rechecks scope/capability.
## Server settings and channel context menus
Design: retain the current theme tokens and left sidebar hierarchy. Clicking the
server heading opens a compact menu; authorized node administrators can open real
server settings (server-name editor plus channel/category management). Right-click
on empty channel-list space or a channel opens a keyboard-accessible create menu;
a category establishes the parent context. Right-click never joins a voice room.
Menus dismiss with Escape or an outside click.
Categories are presentation containers, never voice/text subscriptions. Children
retain their actual text/voice/forum kind, and collapsed categories hide children
without leaving an active voice room. Parent IDs and server display names persist
on the gateway; the native client waits for acknowledgements and fences operations
to the session that authorized them. Guild rights and direct messages are not
expanded by node-admin controls. Forum topic/reply content is handled separately.

11
docs/chat-images.md Normal file
View file

@ -0,0 +1,11 @@
# Images and GIFs in chat
Direct HTTPS PNG, JPEG, WebP and GIF image links render inline in channel and direct-message chat. The first supported image link in a message is shown; the original text remains visible. GIFs animate with their original frame timing (minimum 20 ms). Animated previews are scaled to at most 384 pixels on the longest side while retaining every accepted frame. Voice messages are not part of this feature.
Paste an actual clipboard image with Ctrl+V (including a Cyrillic keyboard layout) or use **Paste image** in the composer. An image preview appears before any upload. **Send image** explicitly uploads it to the selected original channel; **Cancel** discards it. Ordinary text paste continues to use the editor. Clipboard images are encoded as PNG, limited to 3 MiB, and only read after an explicit paste action. Images are not uploaded when the window gains focus. Channel changes and reconnects cannot redirect a pending upload into another conversation. Direct-message attachments are currently unavailable; direct image links still render there.
Attachments use the existing authenticated LNEx TLS connection. The gateway validates and stores image bytes durably and posts a channel-scoped attachment marker in history. Other channel participants fetch those bytes through the same authenticated connection. There are no public upload URLs or added HTTP ports. See the server's `docs/02-protocol/chat-attachments.md` for access checks, protocol fields, storage quotas and retained attachment policy.
Remote downloads allow HTTPS on port 443, without URL credentials, cookies, proxies or forwarded authentication. Each redirect is revalidated; DNS addresses must all be public and are pinned for the request. Loopback, private, link-local, reserved and special-purpose destinations are rejected. A direct URL preview contacts the external image host and therefore exposes the viewer's IP address to that host.
Remote encoded files are limited to 16 MiB with a 30-second overall download timeout and three redirects. Decoding accepts dimensions at most 4096 per side and 4 megapixels per frame. GIFs are limited to 120 frames, 128 megapixels of source decoding work, and 64 MiB of preview pixels. The UI limits concurrent media operations, caches at most 24 sources and 64 MiB of decoded frames, and shows an error when a source exceeds its budget. An unavailable image does not prevent sending or reading text. The example `https://evolationstudios.ru/admindata/gifs/cuckoding2.gif` was verified through the safe downloader and decoder: 5,457,840 encoded bytes, 119 frames, 384×279 preview, 50 ms per frame.

View file

@ -0,0 +1,69 @@
# Clipboard shortcuts on Linux/Wayland
## Diagnosis (2026-11-01)
The reported failure follows the active keyboard layout: English Ctrl+V
works; Russian Ctrl+V fails in every Slint input. Slint 1.18.1's
`InternalKeyEvent::shortcut()` recognizes the literal Latin `v`. Winit sends
the Russian logical character `м`, with physical `KeyV`, and the backend
previously forwarded that character unchanged. Clipboard initialization is
not the cause of this layout-specific failure.
The vendored winit backend now translates standard Ctrl shortcuts to Latin
letters using physical key positions only when the logical letter is
non-ASCII. Latin logical letters remain authoritative for AZERTY/Dvorak.
Regular Cyrillic input and Alt/Meta combinations retain their original text.
AltGr is tracked separately from Winit's Alt flag because Linux commonly
uses XKB Mod5 for it. Ctrl+AltGr key sequences therefore keep their text too.
If focus is acquired with AltGr already held and no AltGraph key event is
delivered, the aggregate modifier notification cannot identify Mod5; release
and press AltGr again in that case.
The backend also reconciles Wayland modifier notifications: virtual keyboards
and focus changes can supply modifier state without individual Ctrl events.
Previously `wtype -M ctrl -k v -m ctrl` inserted a plain `v` for this reason.
Native clipboard access already uses arboard with `wayland-data-control`.
Both the installed October 25 binary and the current build contain the
arboard/Wayland clipboard backend; the installed binary predates this
keyboard-layout fix.
References:
- [Winit key-event documentation](https://docs.rs/winit/latest/winit/event/struct.KeyEvent.html)
distinguishes logical characters from layout-independent physical keys.
- [Arboard Linux backend documentation](https://docs.rs/crate/arboard/latest)
explains the required `wayland-data-control` feature.
- [Slint shortcut implementation at v1.18.1](https://github.com/slint-ui/slint/blob/v1.18.1/internal/core/input.rs)
matches Latin letters for standard shortcuts.
## Verification
Run policy regression tests with:
```sh
cargo test --test clipboard_shortcuts --no-default-features
```
For a native GUI check:
```sh
VNOX_CLIPBOARD_EXPECT=vnox-probe cargo run --example clipboard_probe
```
Copy `vnox-probe`, then paste with Ctrl+V in the ordinary, password, and
multiline fields (Tab moves between them). Repeat with English and Russian
keyboard layouts. Output reports field, character count, and equality only;
it never prints pasted text. Also check Ctrl+A/C/X/V in the ordinary field,
and ordinary Cyrillic typing without Ctrl.
The automated workstation check used a separate temporary evdev keyboard,
with its own English/Russian layout selection, on real Hyprland/Wayland.
All three field types received the expected system clipboard text. Russian
Ctrl+A/C/X/V and ordinary Cyrillic input were checked through real key events.
English physical Ctrl+V and virtual-keyboard Ctrl+V were also checked.
The user's original clipboard was retained privately in process and restored;
their physical keyboard layouts were not changed.
Shift+Insert is not a standard paste shortcut in Slint 1.18.1's native
shortcut matcher; use Ctrl+V. This patch keeps clipboard handling in Slint's
backend and does not add application-wide paste interception.

View file

@ -0,0 +1,36 @@
# Forum client interaction contract
A forum is a channel containing separately addressable topics. It is not a text
channel with a different icon. Gateway owns the topic list, creation, history and
replies; the client displays successful results only after acknowledgement.
The matching LNEx specification must define the wire payloads and capability
before implementation of network commands.
The main panel has two views: a topic list with title, author and reply count,
and an opened topic with its title, opening message and chronological replies.
Creating a topic requires a title and first message. Opening a topic fetches its
history. Returning to the list preserves unsent input within the same server;
disconnecting or changing server clears forum data and pending operations.
Loading, empty, denied and failed requests have explicit visible states. Failed
requests keep input, and provide retry instead of claiming success.
Use existing Theme colors and font scale, left-aligned topic rows, the current
focus styles and normal sentence-case actions. Navigation remains in the sidebar.
The forum panel has no voice controls or membership side effects. Selecting a
category is navigation only. Only an explicit voice-channel selection may request
voice membership; arbitrary callbacks for categories or unknown channel kinds
must be rejected. Browsing a forum does not disconnect an existing voice session.
Forum commands require the advertised server capability and an authenticated
session. Old servers receive no new forum packets. Requests carry correlation
IDs and the selected forum/topic context; stale responses cannot switch the
current topic or replace another server's data. Node and guild visibility and
write permissions are enforced by Gateway, with errors surfaced in the forum.
Retries use a new request ID; creation/reply input clears only on matching success.
Pagination is bounded by the server contract and must not silently truncate a
thread without a way to fetch further results.
Regression checks cover wire encoding/dispatch, request correlation, failed
creation preserving drafts, stale results after selection/session changes,
capability gating, topic/reply history, and category/forum navigation without
voice capture. GUI checks use an isolated virtual display and profile only.

View file

@ -0,0 +1,41 @@
# Local microphone monitor
The test opens the selected input and output for at most 30 seconds. It does not
send audio to a room. The live voice pipeline releases its devices before the
monitor starts; stop, settings close and device changes revoke the monitor.
## Correction — 2026-11-01
The former callbacks allocated vectors, independently restarted linear resampling
for every chunk, and used `try_lock` to share samples. Lock contention could drop
input or silence an output callback. Its queue permitted 250 ms of backlog.
The replacement uses preallocated atomic sample slots with one producer and one
consumer. Only the consumer advances the read position. A full producer drops
new samples and marks an overflow; playback discards stale queued audio before
prefilling fresh audio. Streaming resamplers retain phase across callbacks and a
bounded ±0.2% correction accommodates independent device clocks. Playback starts
with 20 ms, trims above 40 ms, and the ring holds at most 60 ms. Short gain ramps
smooth restart/underrun edges. The level meter holds and decays instead of resetting
visibly to zero on every UI poll. RNNoise reuses its 480-sample scratch buffers.
The monitor requests approximately 5 ms callbacks only within the device's
reported supported buffer range. If the request cannot build the streams, both
are rebuilt with device defaults. This is a request, not a measurement or a
promise of 5 ms end-to-end latency. Driver/server/hardware buffering and RNNoise
framing add delay. No desktop audio configuration is changed.
Synthetic checks exercise irregular 44.1/48/96 kHz callbacks, ±1000 ppm clocks,
concurrent ordered queue operations, overflow and stale-audio removal, underrun,
cancellation, and level hold/decay. They do not measure the user's headset or
establish human-perceived voice quality.
## Primary references
- [CPAL 0.18.2 BufferSize](https://docs.rs/cpal/0.18.2/cpal/enum.BufferSize.html)
- [PulseAudio stream buffering](https://freedesktop.org/software/pulseaudio/doxygen/streams.html#buffering)
- [PulseAudio client latency control](https://wiki.freedesktop.org/www/Software/PulseAudio/Documentation/Developer/Clients/LatencyControl/)
- [RNNoise frame API](https://github.com/xiph/rnnoise/blob/main/include/rnnoise.h)
The installed CPAL 0.18.2 Pulse backend was also inspected: fixed buffer requests
set `ADJUST_LATENCY`; default buffers leave the backend's defaults in place.

View file

@ -20,7 +20,7 @@
| 10c | Голосовая комната | Верхняя строка «Подключение к голосовой комнате…» остаётся, хотя внизу «Голос подключён» | B исправлено: единый статус голоса (см. ниже) |
| 10d | Аккаунт | Можно зайти на сервер без аккаунта; регистрация или вход в Central должны быть обязательными | C | открыто |
| 10e | Аватары | Две буквы вместо аватара; при первой регистрации нужен случайный сгенерированный аватар | C | открыто |
| 10f | Отзывчивость | Приложение реагирует медленно; нажатие срабатывает не с одного клика, а со второго | A | исправлено (поток A). Причина: `FocusScope` лежал над `TouchArea` и по умолчанию забирал первое нажатие (`focus-on-click`), клик доходил до кнопки только со второго раза; плюс панель действий над сообщением пропадала при наведении на её кнопки. Тест `ui_smoke` шлёт реальные события указателя и падал до исправления. Отдельно остаётся: `refresh_devices` при открытии настроек опрашивает ALSA в потоке интерфейса (поток B) |
| 10f | Отзывчивость | Приложение реагирует медленно; нажатие срабатывает не с одного клика, а со второго | A | исправлено (поток A). Причина: `FocusScope` лежал над `TouchArea` и по умолчанию забирал первое нажатие (`focus-on-click`), клик доходил до кнопки только со второго раза; плюс панель действий над сообщением пропадала при наведении на её кнопки. Тест `ui_smoke` шлёт реальные события указателя и падал до исправления. Опрос устройств при открытии настроек вынесен из потока интерфейса (01.11.2026, поток B): один фоновый опрос, неблокирующее получение результата, сохранение выбора по ID и прежнего списка при ошибке. Проверено тестом с задержанным опросом и headless-тестом интерфейса |
| 11a | Настройки звука | В списках устройств вывода и микрофона мусорные ALSA-пункты (Discard all samples, Rate Converter Plugin, JACK, Open Sound System) | B исправлено: фильтр устройств, выбор хранится по идентификатору |
| 11b | Настройки | Те же двойные клики в настройках | A | исправлено (поток A): та же причина, что в 10f |
| 12a | Темы | Тема работает странно (чёрная тема: части интерфейса остаются серыми, фон не везде одинаковый) | A | исправлено (поток A): все экраны проверены в светлой, тёмной, чёрной и своей теме по снимкам `ui_smoke`; захардкоженные цвета убраны, кнопка отправки и состояния берут цвета темы |