Skip to content

fix(store): take the "left" mark off rejoined chats (cli-core 0.352.0) - #744

Merged
leemour merged 2 commits into
mainfrom
chore/core-0.352.0
Oct 19, 2026
Merged

leemour merged 2 commits into
mainfrom
chore/core-0.352.0

Conversation

@leemour

@leemour leemour commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Take @wirecat/cli-core 0.352.0 (WireCatLabs/cli-core#1621, BUG-322) and do the adoption its changelog
requires. 0.351.0 only adds API, and no other max code marks chats left or saves membership, so there is
nothing else to adopt.

In 0.352.0, saveChats and Delta.chats no longer clear a chat's "left" mark when the update has no
membershipState. Without rejoinChats, a chat the owner rejoined stays "left" after a cut-short list or
a login: it is hidden from max chats list, and store clear --left deletes it with its messages.

  • rememberChats (src/record.ts): a complete list calls markChatsLeft as before (it now also takes the
    mark off the chats it names); a cut-short list calls rejoinChats(key, ids).
  • applyLogin: calls rejoinChats for the login's chats. Before 0.352.0 applyDelta did this itself.
    The ids are the same list rememberChats gets: mergeLogin reads the session's chats after the rest
    of the list has been read or merged, so a login is no weaker proof of membership than the cut-short list
    cli-core prescribes. It also keeps the promise in docs/archive.md that a chat you are added back to
    reappears at the next login. That MAX's login list names only chats the owner is in is not measured.
  • Tests: a cut-short list and a login take the left mark off, keep "archived", and leave another
    account's left chat alone; a complete list still marks the missing chat left. The cut-short and login
    cases fail without the fix.
  • docs/dev/architecture/store.md states the rejoin rule; changelog line under «Не выпущено».

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com

leemour and others added 2 commits October 19, 2026 04:42
cli-core 0.352.0 (WireCatLabs/cli-core#1621) stops `saveChats` and
`applyDelta` from clearing a chat's "left" mark when the update carries no
membership. A chat list that is not complete, and the login snapshot, are
lists of chats the account is in, so they now call the new
`ChatsStore.rejoinChats` for the chats they name. A complete list still goes
through `markChatsLeft`, which marks the missing chats left and rejoins the
named ones. Other states such as "archived" are kept.

Without this, a chat the owner rejoined stayed "left" after a cut-short list
or a login: hidden from `max chats list`, and deleted with its messages by
`store clear --left`.

0.351.0 only adds API; nothing else to adopt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The login case now also checks that "archived" survives, and both rejoin
cases check that a second account's left chat stays left. The store
architecture page says that cut lists and logins take the left mark off
the chats they name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour leemour changed the title fix(store): take the "left" mark off rejoined chats, cli-core 0.352.0 fix(store): take the "left" mark off rejoined chats (cli-core 0.352.0) Oct 19, 2026
@leemour
leemour merged commit 255a104 into main Oct 19, 2026
10 checks passed
@leemour leemour mentioned this pull request Oct 19, 2026
leemour added a commit that referenced this pull request Oct 19, 2026
Version and dated changelog for 0.65.0: the login QR prints as text
without a terminal and `--qr-file` is gone (#746, cli-core 0.352.0 →
0.362.0), plus #744 and #745 already on main.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant