The app's chat UI duplicates a full screen (layer tree, ChatView, kv tree,
mesh caches) for every joined channel, scrolls with costs that grow linearly
with buffer size, keeps render resources (meshes, glyphs, textures, layouts)
forever once messages scroll out of view, and conflates every scroll gesture
into a single velocity scalar — making animated wheel paging, stable
anchoring, and richer content (images, expandable rich messages, stickers)
progressively harder to bolt on. The full requirements list agreed during
exploration is captured in this change's design.md and spec; this change
implements it as a ground-up chatview2 with the current implementation
serving as the functional spec (feature parity, no regressions).
src/ui/chatview2/ module in bin/app: modular chatview — buffer
(ordered arena + Fenwick height index), scroll controller, background
loader, virtualizing view, and per-type message nodes.src/ui/chatview/ is removed
once parity is reached; src/app/schema/chat.rs moves from one duplicated
screen per channel to a single chat screen with the chatview retargeted
via set_channel.new(); .regen() rebuilds rendered state (used for both
styling changes and async content updates).(timestamp, msg_id) composite; value becomes a type ID followed by
type-owned bytes; unconfirmed messages are persisted with a confirmed
flag.chatview: the chatview2 widget — scene API (properties, methods,
signals, per-type message sub-nodes), buffer and geometry semantics
(ordering, insertion, dedup, heights), scrolling behavior (gestures,
animation, clamping, anchoring, restore), storage format, background
loading, filter, resource eviction, and feature parity with the current
chatview (URL clicks, selection/copy, file messages, notices/actions,
unconfirmed messages, date separators, keyboard scrolling).(none — no existing specs in this repo; the chat screen rework in
src/app/schema/ is part of this change's tasks and is exercised through
the chatview capability.)
bin/app/src/ui/chatview2/ (new module), bin/app/src/ui/chatview/
(removed at switchover), bin/app/src/ui/mod.rs.bin/app/src/app/schema/chat.rs (single screen, channel switching),
bin/app/src/app/schema/mod.rs (per-channel screen creation loop),
bin/app/src/app/node.rs (node factories), bin/app/src/main.rs
(message relay paths), bin/app/src/plugin/darkirc.rs,
bin/app/src/plugin/fud.rs (insert/status paths, unconfirmed
persistence).nick, text encoding plus a confirmed flag).bin/app Makefile targets (make compile-dev,
compile-apk); no changes outside bin/app, no new dependencies.