zalo-tui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,33 @@ A release is made by adding a section for the new version below and bumping `ver
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.0] - 2026-11-28
10
+
11
+ Unread tracking starts when you first run this version: messages from before the upgrade aren't counted as unread.
12
+
13
+ ### Added
14
+
15
+ - `zalo-tui --version` (or `-v`) prints the installed version.
16
+ - `w` on a message shows who reacted with what, newest first.
17
+ - Search: `/` in the messages pane searches the open chat (`n`/`N` step through matches), and the chat list filter also finds chats by message text. Accents are optional, so "hoa don" finds "hóa đơn". Only loaded messages are searched.
18
+ - @mentions: typing `@` in a group suggests members; picked names are sent as real mentions, so those people get a mention alert. `@All` mentions everyone.
19
+ - `r` replies to the selected message with a quote, and replies from others show the message they quote.
20
+ - Multi-line messages: `Alt+Enter` adds a line, the message box grows up to five lines (the message pane shrinks to make room), and `↑`/`↓` move between lines. `Ctrl+w` deletes a word.
21
+
22
+ ### Changed
23
+
24
+ - Group messages now notify like direct messages, as in the Zalo app; muted groups stay silent. Press `m` in the chat list to notify only when you're @mentioned (mentions then notify even in muted groups).
25
+ - On macOS, notifications use terminal-notifier when it's installed: clicking one brings the terminal to the front and opens that chat, and each chat keeps only its latest notification.
26
+
27
+ ### Fixed
28
+
29
+ - Unread counts are no longer lost by moving through the chat list: a highlighted chat is only previewed, and it counts as read once you open it (Enter, `l`, a click, or typing). Messages that arrived while the app was closed now count as unread, and a "new messages" line marks where they start.
30
+ - A message now shows every reaction a person adds, not only their latest one.
31
+ - Long drafts wrap instead of being cut off, so the cursor stays visible after `Home` or `Ctrl+a`, including with emoji and other wide characters.
32
+ - A link whose title is its URL no longer shows the URL twice.
33
+ - Help scrolls with `j`/`k` in small terminals instead of overlapping, lists keys that were missing, and no longer mentions an `m` key in the react popup that didn't exist.
34
+ - Shorter status bar hints that fit the terminal.
35
+
9
36
  ## [0.1.0] - 2026-11-24
10
37
 
11
38
  ### Added
package/README.md CHANGED
@@ -11,14 +11,16 @@ A terminal client for Zalo personal accounts, built on [zca-js](https://github.c
11
11
  - Chat list with friends and groups, recent chats first, unread counts and a name filter.
12
12
  - Read and send messages; links are clickable and open with `o`.
13
13
  - Send photos and files (drag a file into the terminal, or `/photo` and `/file`).
14
+ - Quote replies, @mentions in groups, and search through loaded messages.
14
15
  - Reactions (all of Zalo's built-in ones), recall, and delete for yourself.
15
- - Desktop notifications for direct messages and @mentions, respecting muted chats.
16
+ - Desktop notifications, respecting muted chats; groups can be limited to @mentions.
16
17
  - Keyboard first (vim-style keys), with mouse clicks and wheel scrolling.
17
18
 
18
19
  ## Requirements
19
20
 
20
21
  - Node.js 22 or newer.
21
22
  - macOS is the main target. Notifications and opening links use `osascript` and `open`; on Linux they fall back to `notify-send` and `xdg-open`, which are untested. Windows is not supported.
23
+ - Optional on macOS: with [terminal-notifier](https://github.com/julienXX/terminal-notifier) installed (`brew install terminal-notifier`), clicking a notification brings your terminal to the front and opens that chat, and each chat keeps only its latest notification.
22
24
  - A terminal with true mouse and focus reporting works best (Ghostty, iTerm2, WezTerm, Kitty).
23
25
 
24
26
  ## Install
@@ -43,14 +45,15 @@ Run `pnpm build` again after pulling changes.
43
45
 
44
46
  Run `zalo-tui`, then open Zalo on your phone, use its QR scanner on the code shown, and confirm the login on the phone.
45
47
 
46
- Type `/help` or press `?` inside the app to see all keys.
48
+ Type `/help` or press `?` inside the app to see all keys. `zalo-tui --version` prints the installed version.
47
49
 
48
50
  | Where | Keys |
49
51
  |---|---|
50
- | Chat list | `j`/`k` or `↑`/`↓` move · `g`/`G` top/bottom · `Ctrl+d`/`Ctrl+u` half page · `/` filter · `l` or `Tab` messages · `Enter` or `i` type · `n` notifications · `r` reconnect |
51
- | Messages | `j`/`k` select · `e` react · `d` recall or delete · `o` open photo, file or link · `h` or `Tab` chats · `i` type |
52
- | Message box | `Enter` send · `Esc` back · `←`/`→` move · `Ctrl+a`/`Ctrl+e` start/end · `Ctrl+u` clear |
53
- | Anywhere | `PgUp`/`PgDn` or wheel scroll · click to open a chat, select a message or type · `Shift`-drag selects text · `Ctrl+C` quit |
52
+ | Chat list | `j`/`k` or `↑`/`↓` move · `g`/`G` top/bottom · `Ctrl+d`/`Ctrl+u` half page · `/` filter by name or message text (`↑`/`↓` move while typing, `Enter` opens at the match, `Esc` clears) · `Enter` or `i` open and type · `l` or `Tab` messages · `n` notifications · `m` group alerts: all or @mentions · `r` reconnect |
53
+ | Messages | `j`/`k` select · `g`/`G` top/bottom · `Ctrl+d`/`Ctrl+u` half page · `/` search this chat, then `n`/`N` older/newer match · `r` reply · `e` react · `w` who reacted · `d` recall or delete · `o` open photo, file or link · `Enter` or `i` type · `h`, `Esc` or `Tab` chats |
54
+ | React popup | `1`–`6` quick reactions (or click them) · type to search all · `↑`/`↓` `Enter` pick · `0` remove yours · `Esc` close |
55
+ | Message box | `Enter` send · `Alt+Enter` new line · `Esc` back · arrows move · `Ctrl+a`/`Ctrl+e` or `Home`/`End` start/end · `Ctrl+w` delete word · `Ctrl+u` delete to start · `@` in a group suggests members to mention (`↑`/`↓`, `Enter` or `Tab` picks, `Esc` dismisses) |
56
+ | Anywhere | `PgUp`/`PgDn` or wheel scroll messages (the wheel over the chat list moves the selection) · click to open a chat, select a message or type · `Shift`-drag selects text · `Ctrl+C` quit |
54
57
 
55
58
  Commands in the message box:
56
59
 
@@ -61,7 +64,9 @@ Commands in the message box:
61
64
  | `//text` | send text that starts with `/` |
62
65
  | `/help` | show help |
63
66
 
64
- A path on its own, for example from dragging a file into the terminal, asks before sending it.
67
+ Paths can start with `~/`, be quoted, or use `\ ` for spaces. A path on its own, for example from dragging a file into the terminal, asks before sending it.
68
+
69
+ Moving through the chat list previews the highlighted chat; it only counts as read once you open it (`Enter`, `l`, a click, or typing). Each chat keeps its own unsent draft.
65
70
 
66
71
  ## Your data
67
72
 
@@ -70,8 +75,10 @@ Everything is stored in `~/.config/zalo-tui/`, readable only by you:
70
75
  | File | Contents |
71
76
  |---|---|
72
77
  | `credentials.json` | your logged-in session. Anyone with this file can use your account. Delete it to log out. |
73
- | `settings.json` | notification preference |
78
+ | `settings.json` | notification preferences |
79
+ | `read.json` | how far you've read in each chat, so unread counts survive restarts |
74
80
  | `activity.json` | each chat's last activity time and name, used to keep the list order |
81
+ | `open-<pid>` | briefly, while a notification click asks the running app to open a chat |
75
82
  | `debug.log` | only with `ZALO_TUI_DEBUG=1`: why each message did or didn't notify (no names or text) |
76
83
 
77
84
  Set `ZALO_TUI_HOME` to use a different folder.
@@ -79,9 +86,10 @@ Set `ZALO_TUI_HOME` to use a different folder.
79
86
  ## Limitations
80
87
 
81
88
  - Zalo allows one web session at a time. Opening Zalo Web or PC elsewhere disconnects the app; press `r` in the chat list to reconnect.
82
- - On connect, Zalo returns roughly the last day of messages. Older history isn't available.
89
+ - On connect, Zalo returns only recent messages (usually the last few days). Older history isn't available.
83
90
  - Stickers show as `[sticker]` and can't be sent. Voice, video and polls show as placeholders.
84
91
  - Clipboard images can't be pasted; save them as a file first.
92
+ - Search only covers messages the app has loaded; Zalo has no message search API.
85
93
 
86
94
  ## Development
87
95