ui: a New line above the first unread message, and read markers kept on disk
Messages count as read only while their chat is on screen (Nav.chat-shown) in the focused window: winit's focus events, through slint's unstable-winit-030 on the desktop; Android counts a chat on screen as read. A tab keeps the newest message read and counts what came after it, not our own. Entering a tab with new messages puts a red New line above the first one until the tab is left (so does a stored or gateway page that brings them while the tab is on screen), and while that line is above the view a bar over the list counts them, with Jump and Mark as read. voelin-store migration 5 adds chat_reads (Store::chat_read, set_chat_read, chat_reads). Markers are loaded once a session's server is known and written when a tab is left, marked read, its session ends and on exit, never per message; a restart counts what came while away again, gateway pages included. Dev switch VOELIN_OPEN=unread[:end]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
20 files changed
+877
-128
No files matched your search
@@ -69,7 +69,7 @@ fuzz/ cargo-fuzz targets
|
||||
| `voelin-query` | ServerQuery codec and transports: raw TCP, SSH (russh), HTTP WebQuery | done |
|
||||
| `voelin-observer` | Presence tracker + chat relay pool over `voelin-query` | done |
|
||||
| `voelin-gateway-proto`, `voelin-gateway` (`tsgw`) | Companion service for server admins: identity-challenge auth, permission-mirroring authorization, presence stream, chat relay, SQLite history, WebSocket + JSON (`tsgw.v1+json`) | done |
|
||||
| `voelin-store` | Identities, bookmarks, settings, chat history (dedupe, paging, sync cursors), contacts, secrets (keyring / Android Keystore); versioned schema | done |
|
||||
| `voelin-store` | Identities, bookmarks, settings, chat history (dedupe, paging, sync cursors, where each chat was read), contacts, secrets (keyring / Android Keystore); versioned schema | done |
|
||||
| `voelin-audio` | Capture/playback, Opus, echo cancellation, resampling, jitter buffer, mixer, VAD/push-to-talk | v0 (no AEC yet) |
|
||||
| `voelin-stream` | TS6 stream commands, JSON signalling, str0m peer connections, host/STUN candidates, streamer/viewer sessions, frame-source seam | sessions + transport |
|
||||
| `voelin-core` | Engine: runtime, per-server sessions, merge of voice/gateway/query sources, event bus, command API, chat history, the gateway's features, audio settings and volumes, streams on TS6, files, avatar and icon cache, pokes, offline messages, contacts; `media` module (capture → encoder → stream, stream → decoder) | done |
|
||||
|
||||
+11
-3
@@ -146,7 +146,7 @@ comes from the engine's events; what a gateway adds is hidden without it.
|
||||
|
||||
| Part | `VOELIN_OPEN` | What it shows | Engine data |
|
||||
|---|---|---|---|
|
||||
| Chat | `server` (`server:chat`: the server chat), `actions`, `link-confirm[:<url>]` | Header with Pinned Messages, Topics, the voice channel and the members button; chat tabs; messages grouped by author ("Today at 10:14"), avatars, BBCode formatting (see Formatting below), emoji, reactions with an add button, pin and topic marks, file cards with download; composer with attach, emoji and send. A link opens in the browser; one whose text is not its address (a masked link) first shows where it goes in `LinkDialog` (the host, the whole address; Open, Copy link, Cancel); a TeamSpeak link is copied for now; a right-click on a link offers Open link and Copy link. Every message has actions on hover (`MessageActions`; `actions` shows the last one's): Quote (`> Author: …` lines at the start of the composer, which takes the focus to write below them and grows to show up to about eight lines) and Copy text, and with a gateway quick reactions, pin and Start a topic; a right-click on a message shows Copy text, Copy link (its first web address), Quote, and with a gateway React… and Pin. The server chat starts with the server's welcome message (and its host message when the server puts it in the chat log). Opens at the newest message and follows new ones while at the end. Scrolling up to within a screen of the top loads the page before, above the rows on screen, which stay in place (a spinner above the oldest message while it loads). The Older messages button there is for a chat too short to scroll, and for after a page that brought nothing (scrolling loads again once the list was a screen away). The voice view, the phone's voice screen and private chats load the same way | `ChatHistory` (and `Chat` for servers without history), `Presence` (welcome and host message), `AvatarReady`, `Transfer`, `Gateway` (pins; reactions arrive as stored messages); `Command::LoadOlderHistory`, `DownloadChatFile`, `UploadFile`, `GatewayRequest::React`, `Unreact`, `Pin`, `Unpin` |
|
||||
| Chat | `server` (`server:chat`: the server chat), `actions`, `link-confirm[:<url>]`, `unread[:end]` | Header with Pinned Messages, Topics, the voice channel and the members button; chat tabs; messages grouped by author ("Today at 10:14"), avatars, BBCode formatting (see Formatting below), emoji, reactions with an add button, pin and topic marks, file cards with download; composer with attach, emoji and send. A link opens in the browser; one whose text is not its address (a masked link) first shows where it goes in `LinkDialog` (the host, the whole address; Open, Copy link, Cancel); a TeamSpeak link is copied for now; a right-click on a link offers Open link and Copy link. Every message has actions on hover (`MessageActions`; `actions` shows the last one's): Quote (`> Author: …` lines at the start of the composer, which takes the focus to write below them and grows to show up to about eight lines) and Copy text, and with a gateway quick reactions, pin and Start a topic; a right-click on a message shows Copy text, Copy link (its first web address), Quote, and with a gateway React… and Pin. The server chat starts with the server's welcome message (and its host message when the server puts it in the chat log). Opens at the newest message and follows new ones while at the end. Scrolling up to within a screen of the top loads the page before, above the rows on screen, which stay in place (a spinner above the oldest message while it loads). The Older messages button there is for a chat too short to scroll, and for after a page that brought nothing (scrolling loads again once the list was a screen away). The voice view, the phone's voice screen and private chats load the same way. Messages count as read while their chat is on screen in the focused window; the chat tabs and the server rail count the others (not our own). A chat that comes on screen with new messages, or that is on screen when messages that came while away arrive (a stored or gateway page), shows a red line with New above the first (`NewDivider`) until the chat is left; while that line is above the view, a bar over the list says how many are new and since when (`UnreadBar`: "5 new messages since 10:14", Jump, and × to mark them read). Where each chat was read is kept on this device (the store's `chat_reads`), so the counts survive a restart: messages that came while away (a gateway's history) count as new | `ChatHistory` (and `Chat` for servers without history), `Presence` (welcome and host message), `AvatarReady`, `Transfer`, `Gateway` (pins; reactions arrive as stored messages); `Command::LoadOlderHistory`, `DownloadChatFile`, `UploadFile`, `GatewayRequest::React`, `Unreact`, `Pin`, `Unpin` |
|
||||
| Members panel | `server` (`panel`, `no-panel`) | "Members — N" and a search; those streaming first (the people in our channel while the voice channel or a stream is shown), then each server group in the server's order with its icon, then those without a group. Rows: avatar with status, name, crown (admin groups), priority speaker, channel commander, recording, up to three myTeamSpeak badges, moderator role, talk power, what they do or the channel they are in. Resizable: the width is `ui.members_width` | `Presence`, `Groups`, `Talking`, `IconReady`, `PictureReady` |
|
||||
| Member card | `member` | Description, groups, badges (up to three chips in the client's order, what each is for on hover; "Badge" for one the app does not know), talk power, country; private message, poke, friend, block; volume and mute for us | `ContactsChanged`, `PictureReady` (badges); `Command::SetContact`, `SetClientVolume`, `SetClientMuted`, `Poke` |
|
||||
| Poke | `poke` (the first other member's, card open; after `friends` a contact's) | `PokeDialog`, from the member card, a friend's row and the direct message header: an optional message with a "12/100" count, Send off above 100 characters, Enter sends, Escape cancels | `Command::Poke` (trimmed, cut to 100 characters; the engine cuts too) |
|
||||
@@ -433,7 +433,10 @@ Environment variables (see `src/dev.rs`):
|
||||
`voice`, `pins`, `topics`, `topic:<id>`, `member`, `poke`,
|
||||
`channel-password[:wrong]`, `actions` (the last message's actions, as if
|
||||
hovered: a screenshot cannot hover), `link-confirm[:<url>]` (the question
|
||||
before a masked link opens, by default the sample's), `watch`, `popout`
|
||||
before a masked link opens, by default the sample's), `unread` (the
|
||||
current chat read up to five messages before its end: the New line,
|
||||
scrolled up to; `unread:end` ten messages before, at the end of the list,
|
||||
under the bar that counts them), `watch`, `popout`
|
||||
(the server page, above), `tab:<home|servers|chat|activity|you>` (phone
|
||||
layout); `friends[:<uid>]`, `messages[:<uid>]`, `inbox`, `offline`,
|
||||
`library`, `events`, `event-form`, `search[:<text>]`, `notifications`,
|
||||
@@ -633,7 +636,12 @@ renderer; the phone layouts are desktop renders, not Android device tests.
|
||||
shows the decoded picture's height.
|
||||
- Popping the stream out fills the main window (no second window yet).
|
||||
- A jump to a pinned message scrolls to where an average row would be
|
||||
(rows differ in height), and only to messages already loaded.
|
||||
(rows differ in height), and only to messages already loaded. So does
|
||||
the unread bar's Jump, and the bar shows while that estimate of the New
|
||||
line is above the view.
|
||||
- What is read stays on this device: TeamSpeak has no read receipts. The
|
||||
window's focus is known on the desktop (winit); on Android a chat on
|
||||
screen counts as read.
|
||||
- The window keeps its native decorations (no custom title bar).
|
||||
- The Stream Studio streams to the voice channel we are in (a TeamSpeak 6
|
||||
stream belongs to its channel): its destination picks among the servers,
|
||||
|
||||
Reference in new issue
Block a user