Skip to content

feat(drawer): hide and unhide sessions - #217

Merged
Tarquinen merged 3 commits into
devfrom
hide-sessions
Nov 21, 2026
Merged

Tarquinen merged 3 commits into
devfrom
hide-sessions

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Ports iOS fe22dea2: a session's ⋮ menu (and TalkBack actions) can now Hide or Unhide it. Hidden sessions leave Pinned and Recents but still show up in search, where they can be unhidden. Hidden keys are stored per server in hidden-sessions.json and removed when a session is purged.

The selection bar now looks up the chosen sessions in what the drawer shows, so its actions also reach a session that only server search found. Before, Hide/Unhide (and the existing Mute, Pin, Mark as Read/Unread and Archive) cleared the selection and did nothing for such a row. It also ports iOS 42c10069: hiddenSessionIDs works out this server's hidden IDs once per list build instead of a key per session.

Tests: the iOS tests hiddenSessionsLeaveTheListButStayInSearch and hiddenSessionsMatchTheirKeys are ported, plus unhidingAServerResultFromTheSelectionUnhidesIt for the search-only row. The first and last fail without their fixes.

Verified: scripts/check.sh on the VM. On the emulator against session-lab, I hid a session, saw it leave Recents, found it by search, and unhid it from there. The lab loads every session at once, so the search-only case is covered by the unit test only.

Two windows on a tablet each keep their own copy of the hidden set until reopened, as mutes and pins already do.

Before (dev) After
Menu before Menu with Hide
Menu before, dark Menu with Hide, dark
After hiding Found by search Unhide in search
List without the hidden session Hidden session in search Unhide in the menu

Ports iOS fe22dea2. Holding a row and choosing Hide in the selection bar's
overflow menu takes the session out of the drawer (Pinned and Recents); it
still turns up in search, where Unhide brings it back. Hidden sessions are
phone-local and per server (SharedKeys.hiddenSessionKeys, hidden-sessions.json)
and are forgotten when the session is deleted. Rows also get a Hide/Unhide
TalkBack action and a "Hidden" state.

Verified: ported hiddenSessionsLeaveTheListButStayInSearch fails without the
visibleSessions filter and passes with it; full scripts/check.sh on the VM;
checked on the emulator with session-lab.
… hidden IDs once

The selection bar looked up the chosen sessions in the loaded list only, so
a session found by server search but not loaded got no action: Unhide (and
Mute, Pin, Mark as Read/Unread, Archive) cleared the selection and did
nothing. It now reads visibleSessions, which includes those results; the
reducer already adopts them.

Ports iOS 42c10069: hiddenSessionIDs works out this server's hidden IDs once
per pass, so visibleSessions and DrawerListModel.build no longer build
server.persistenceID per session. Ports hiddenSessionsMatchTheirKeys from
d535eda4. Parity rows for the list model, row cell, selection bar and test
counts mention Hide/Unhide.

Verified: unhidingAServerResultFromTheSelectionUnhidesIt fails without the
fix and passes with it; full scripts/check.sh on the VM; on the emulator
against session-lab, Hide from the ⋮ menu, find by search, Unhide from the
search result.
@Tarquinen
Tarquinen enabled auto-merge (squash) November 21, 2026 01:04
@Tarquinen
Tarquinen merged commit 895705b into dev Nov 21, 2026
2 checks passed
@Tarquinen
Tarquinen deleted the hide-sessions branch November 21, 2026 01:07
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