Skip to content

Commit 0f35566

Browse files
committed
implemented further refactoring
1 parent 9971495 commit 0f35566

5 files changed

Lines changed: 1162 additions & 458 deletions

File tree

‎PLAN.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Current Stage
44

5-
Implementation is past the local-shell phase and currently sits at a DB-first, live WhatsApp client with remote history/media support, outbound text, single-attachment media send, recent-sticker send, protocol-backed read receipts, reactions, own-message text editing, own-message delete-for-everybody, replies, quote-jump, a right-edge reply gesture in the message pane, typing presence, group-member mention autocomplete, accent-aware search, visible-first chat-avatar sync/rendering with full profile images, first-class sticker receive/render/download behavior, app-state-backed muted/pinned chat settings, stable paused/resumed pixel overlays for media/avatar/sticker rendering, direct-chat PN/LID canonicalization plus split-thread repair, desktop notifications with cached chat-avatar icons where supported, immediate DB catch-up sync overlay blocking with non-blocking startup app-state sync, denormalized chat-list previews, media retry UX, first-use-state logout reset, temp-backed non-exported chat media caches, clipboard attachment paste with Windows file-drop support, a persistent in-chat new-message divider, hardened Windows inline preview defaults, composer tail-follow scrolling, and the planned media/export CLI helpers. The next major gaps are live validation/polish of the notification and media-send paths on real chats, especially desktop delivery on fresh Linux and Windows installs, notification backend default resolution on a fresh config, audio/document fallback behavior, the new avatar/sticker behavior under daily use, plus attachment draft persistence and follow-on resend polish for failed rows.
5+
Implementation is past the local-shell phase and currently sits at a DB-first, live WhatsApp client with remote history/media support, outbound text, single-attachment media send, recent-sticker send, protocol-backed read receipts, reactions, own-message text editing, own-message delete-for-everybody, replies, quote-jump, a right-edge reply gesture in the message pane, typing presence, group-member mention autocomplete, accent-aware search, visible-first chat-avatar sync/rendering with full profile images, first-class sticker receive/render/download behavior, app-state-backed muted/pinned chat settings, stable paused/resumed pixel overlays for media/avatar/sticker rendering, direct-chat PN/LID canonicalization plus split-thread repair, desktop notifications with cached chat-avatar icons where supported, immediate DB catch-up sync overlay blocking with non-blocking startup app-state sync, async store/protocol-backed TUI actions for sends, lazy loads, filters, read receipts, reactions, retries, stickers, drafts, and mentions, denormalized chat-list previews, media retry UX, first-use-state logout reset, temp-backed non-exported chat media caches, clipboard attachment paste with Windows file-drop support, a persistent in-chat new-message divider, hardened Windows inline preview defaults, composer tail-follow scrolling, and the planned media/export CLI helpers. The next major gaps are live validation/polish of the notification and media-send paths on real chats, especially desktop delivery on fresh Linux and Windows installs, notification backend default resolution on a fresh config, audio/document fallback behavior, the new avatar/sticker behavior under daily use, plus attachment draft persistence and follow-on resend polish for failed rows.
66

77
### Implemented now
88

@@ -19,7 +19,7 @@ Implementation is past the local-shell phase and currently sits at a DB-first, l
1919
- Protocol-backed remote media download for received images, videos, audio, and documents, using persisted WhatsApp download descriptors and temp-backed cached local files.
2020
- Visible-first chat avatar sync and compact chat-list rendering, backed by full WhatsApp profile-picture refreshes, cached local avatar files, `ueberzug++` pixel avatars when available, blank-reserved overlay pause/resume during chat-list scrolling, compact inline fallbacks, and initials fallback when image rendering is unavailable.
2121
- First-class sticker receive/render support: sticker messages are ingested into SQLite with explicit media kind/flags, remote sticker downloads work through the existing media pipeline, PNG sticker thumbnails are cached immediately when provided by WhatsApp, sticker previews auto-inline in the message pane, and chat/notification preview text uses sticker-specific labels instead of generic file names.
22-
- Recent sticker send support: WhatsApp recent-sticker history/app-state sync is persisted in SQLite, startup app-state metadata/mute/pin handling runs off the live event critical path, renderable WebP stickers are cached under the transient app directory as background best-effort work with URL-first/direct-path fallback, `key_normal_pick_sticker` defaults to `leader t`, the picker command is configurable with an `nsxiv -t -o -p {files}` Linux default, Enter selects the highlighted nsxiv thumbnail immediately, and selected stickers are sent through a dedicated WhatsApp sticker message path. Lottie/TGS stickers are metadata-only for now.
22+
- Recent sticker send support: WhatsApp recent-sticker history/app-state sync is persisted in SQLite, startup app-state metadata/mute/pin handling runs off the live event critical path, renderable WebP stickers are cached under the transient app directory as background best-effort work with URL-first/direct-path fallback and live-event file downloads are handled by a bounded worker pool after metadata ingestion, `key_normal_pick_sticker` defaults to `leader t`, the picker command is configurable with an `nsxiv -t -o -p {files}` Linux default, Enter selects the highlighted nsxiv thumbnail immediately, and selected stickers are sent through a dedicated WhatsApp sticker message path. Lottie/TGS stickers are metadata-only for now.
2323
- Real outbound send from the inline composer for plain text plus one local attachment per message, with precomputed WhatsApp message IDs, local `sending`/`sent`/`failed` status updates, draft preservation on failure, captions for image/video/document sends, audio-caption rejection before queueing, ffprobe-backed generic audio send, and document fallback when audio metadata is unavailable.
2424
- CLI helpers for persisted data: `vimwhat media open <message-id>` reuses the normal opener flow and auto-downloads remote media when possible, while `vimwhat export chat <jid>` writes a local-only Markdown transcript into the configured downloads directory.
2525
- Protocol-backed message interactions: auto/manual mark-read, monotonic outgoing receipt status updates with seen/read receipts rendered as boxed ticks, reaction send/clear plus reaction rendering, own outgoing text edit via WhatsApp edit with local rewrite after ACK, inbound edit ingestion, own outgoing message delete-for-everybody via WhatsApp revoke with local deletion after ACK, inbound revoke ingestion, text replies with quoted metadata, quote-jump into loaded history, a right-edge `l` reply gesture from the message pane when no further pane exists to the right, direct-chat typing/online/last-seen presence in a two-line active chat header, and best-effort composing/paused presence send while typing.
@@ -28,7 +28,7 @@ Implementation is past the local-shell phase and currently sits at a DB-first, l
2828
- Retry/resend UX for failed outgoing media rows in the TUI via `R` and `:retry-message`, keeping the original failed row in chat and queueing a brand-new send attempt when the local attachment file still exists.
2929
- Chat title quality tracking with source precedence, group/contact metadata refresh, and safe placeholders so group JIDs/phone-like IDs are not treated as real names.
3030
- Direct-chat identity hardening for WhatsApp PN/LID aliases: canonicalize mapped 1:1 chats onto a single chat ID, merge already-split alias rows/messages/drafts/history cursors in SQLite, and preserve the active conversation when a live merge remaps the selected chat.
31-
- Large-history TUI guardrails: paired live startup immediately shows a blocking sync/check overlay only for local DB catch-up, historical imports avoid refresh storms, implicit database imports show a blocking local-update progress overlay even when WhatsApp omits an offline-sync preview, reconnect catch-up sync batches snapshot refreshes until completion, live refreshes are debounced, chat-list preview text is stored on chats instead of recomputed through per-chat message subqueries during every refresh, preview recomputation is skipped for older message/media mutations that cannot affect the latest chat preview, stale snapshot reloads do not steal chat focus, message rendering and cursor visibility are bounded to the visible window, message cursor scrolling behaves like the chat list viewport, duplicate in-flight history requests are suppressed, message filtering uses the maintained FTS index instead of a chat-wide scan, remote media and sticker download work observes caller deadlines, clipboard image transfer has bounded memory/file-size limits, desktop notification bursts surface backpressure instead of silently dropping everything, and pixel media/avatar/sticker overlays pause into blank reserved space while scrolling before resyncing with bounded sync contexts.
31+
- Large-history TUI guardrails: paired live startup immediately shows a blocking sync/check overlay only for local DB catch-up, historical imports avoid refresh storms, implicit database imports show a blocking local-update progress overlay even when WhatsApp omits an offline-sync preview, reconnect catch-up sync batches snapshot refreshes until completion, live refreshes are debounced, chat-list preview text is stored on chats instead of recomputed through per-chat message subqueries during every refresh, preview recomputation is skipped for older message/media mutations that cannot affect the latest chat preview, stale snapshot reloads do not steal chat focus, message rendering and cursor visibility are bounded to the visible window, message cursor scrolling behaves like the chat list viewport, duplicate in-flight history requests are suppressed, send/draft/read-receipt/reaction/retry/sticker/lazy-load/history/filter/mention TUI callbacks return asynchronous result messages instead of blocking `Update`, message filtering uses the maintained FTS index instead of a chat-wide scan, UI-facing store callbacks use bounded contexts, remote media and sticker download work observes caller deadlines, clipboard image transfer has bounded memory/file-size limits, desktop notification bursts surface backpressure instead of silently dropping everything, and pixel media/avatar/sticker overlays pause into blank reserved space while scrolling before resyncing with bounded sync contexts.
3232
- Terminal/UI polish for real chat data: full/compat/auto emoji rendering, stable emoji fallback for terminals such as `st`, Windows Terminal, and classic Windows console hosts, Windows console output-mode setup with a two-column guarded render width plus a final frame clamp to avoid edge-wrap frame corruption, Windows terminal-size polling plus a lower default renderer FPS for smoother ConPTY behavior, pywal-backed mode indicators with per-mode hex overrides, focused-pane borders that distinguish chat-list vs message-pane input focus, highlighted unread-count badges in the chat list, a structured keymap-driven help screen, non-redundant mode prompts, configurable help/prompt key hints, search match counts in the status bar, configurable cancellation/search-clear bindings, platform-specific terminal focus-reporting options, and native Windows runtime defaults that do not affect Linux behavior.
3333
- Search now folds accents only for accent-free queries, so `/Jose` matches `José` while `/José` stays accent-sensitive, with matching highlight behavior in the TUI and the same rule in store-backed chat/message filtering.
3434
- Demo/dev workflows that exercise the full local UI without a live WhatsApp session.

0 commit comments

Comments
 (0)