From 10cc1db13663009c9f27f077dcb93b1f50e66ed0 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Fri, 20 Nov 2026 17:13:57 -0500 Subject: [PATCH 1/2] feat(drawer): hide and unhide sessions 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. --- .../ai/opencode/core/sharing/SharedKeys.kt | 3 +++ .../core/testing/TestIsolationGuard.kt | 1 + docs/parity/drawer.md | 2 +- .../ai/opencode/feature/drawer/HomeFeature.kt | 4 +++ .../feature/drawer/HomeFeatureCore.kt | 1 + .../feature/drawer/HomeFeatureDrawer.kt | 10 ++++++++ .../feature/drawer/HomeFeatureDrawerState.kt | 11 ++++++-- .../feature/drawer/HomeFeatureSessionPages.kt | 1 + .../feature/drawer/list/DrawerListModel.kt | 5 ++++ .../drawer/list/DrawerListSessionCell.kt | 3 +++ .../feature/drawer/list/DrawerListView.kt | 1 + .../feature/drawer/list/DrawerSelection.kt | 15 +++++++++-- .../drawer/src/main/res/values-am/strings.xml | 3 +++ .../drawer/src/main/res/values-az/strings.xml | 3 +++ .../drawer/src/main/res/values-bg/strings.xml | 3 +++ .../drawer/src/main/res/values-bn/strings.xml | 3 +++ .../drawer/src/main/res/values-bs/strings.xml | 3 +++ .../drawer/src/main/res/values-ca/strings.xml | 3 +++ .../drawer/src/main/res/values-cs/strings.xml | 3 +++ .../drawer/src/main/res/values-da/strings.xml | 3 +++ .../drawer/src/main/res/values-de/strings.xml | 3 +++ .../drawer/src/main/res/values-dz/strings.xml | 3 +++ .../drawer/src/main/res/values-el/strings.xml | 3 +++ .../drawer/src/main/res/values-es/strings.xml | 3 +++ .../drawer/src/main/res/values-et/strings.xml | 3 +++ .../drawer/src/main/res/values-fi/strings.xml | 3 +++ .../drawer/src/main/res/values-fo/strings.xml | 3 +++ .../drawer/src/main/res/values-fr/strings.xml | 3 +++ .../drawer/src/main/res/values-hi/strings.xml | 3 +++ .../drawer/src/main/res/values-hr/strings.xml | 3 +++ .../drawer/src/main/res/values-hu/strings.xml | 3 +++ .../drawer/src/main/res/values-hy/strings.xml | 3 +++ .../drawer/src/main/res/values-in/strings.xml | 3 +++ .../drawer/src/main/res/values-is/strings.xml | 3 +++ .../drawer/src/main/res/values-it/strings.xml | 3 +++ .../drawer/src/main/res/values-ja/strings.xml | 3 +++ .../drawer/src/main/res/values-ka/strings.xml | 3 +++ .../drawer/src/main/res/values-km/strings.xml | 3 +++ .../drawer/src/main/res/values-ko/strings.xml | 3 +++ .../drawer/src/main/res/values-lo/strings.xml | 3 +++ .../drawer/src/main/res/values-lt/strings.xml | 3 +++ .../drawer/src/main/res/values-lv/strings.xml | 3 +++ .../drawer/src/main/res/values-mk/strings.xml | 3 +++ .../drawer/src/main/res/values-mn/strings.xml | 3 +++ .../drawer/src/main/res/values-ms/strings.xml | 3 +++ .../drawer/src/main/res/values-my/strings.xml | 3 +++ .../drawer/src/main/res/values-nb/strings.xml | 3 +++ .../drawer/src/main/res/values-ne/strings.xml | 3 +++ .../drawer/src/main/res/values-nl/strings.xml | 3 +++ .../drawer/src/main/res/values-pl/strings.xml | 3 +++ .../src/main/res/values-pt-rBR/strings.xml | 3 +++ .../drawer/src/main/res/values-ro/strings.xml | 3 +++ .../drawer/src/main/res/values-ru/strings.xml | 3 +++ .../drawer/src/main/res/values-si/strings.xml | 3 +++ .../drawer/src/main/res/values-sk/strings.xml | 3 +++ .../drawer/src/main/res/values-sl/strings.xml | 3 +++ .../drawer/src/main/res/values-sq/strings.xml | 3 +++ .../drawer/src/main/res/values-sr/strings.xml | 3 +++ .../drawer/src/main/res/values-sv/strings.xml | 3 +++ .../drawer/src/main/res/values-tg/strings.xml | 3 +++ .../drawer/src/main/res/values-th/strings.xml | 3 +++ .../drawer/src/main/res/values-tk/strings.xml | 3 +++ .../drawer/src/main/res/values-tr/strings.xml | 3 +++ .../drawer/src/main/res/values-uk/strings.xml | 3 +++ .../drawer/src/main/res/values-uz/strings.xml | 3 +++ .../drawer/src/main/res/values-vi/strings.xml | 3 +++ .../src/main/res/values-zh-rCN/strings.xml | 3 +++ .../src/main/res/values-zh-rTW/strings.xml | 3 +++ .../drawer/src/main/res/values/strings.xml | 3 +++ .../feature/drawer/HomeFeatureTestsDrawer.kt | 25 +++++++++++++++++++ 70 files changed, 248 insertions(+), 5 deletions(-) diff --git a/core/src/main/kotlin/ai/opencode/core/sharing/SharedKeys.kt b/core/src/main/kotlin/ai/opencode/core/sharing/SharedKeys.kt index 4dd6c6bba..173a7b0da 100644 --- a/core/src/main/kotlin/ai/opencode/core/sharing/SharedKeys.kt +++ b/core/src/main/kotlin/ai/opencode/core/sharing/SharedKeys.kt @@ -71,6 +71,9 @@ object SharedKeys { /** Phone-local, server-scoped (`serverID|sessionID`) like pins: muted sessions never reach Catch Up or an unread badge. */ val mutedSessionKeys = SharedKey.fileStorage>(FileDirectory.Documents, "muted-sessions.json", emptySet()) + /** Phone-local, server-scoped (`serverID|sessionID`) like pins: hidden sessions leave the drawer's list but still turn up in search. */ + val hiddenSessionKeys = SharedKey.fileStorage>(FileDirectory.Documents, "hidden-sessions.json", emptySet()) + val initializedInboxServerIDs = SharedKey.fileStorage>(FileDirectory.Documents, "initialized-inbox-servers.json", emptySet()) diff --git a/core/src/testFixtures/kotlin/ai/opencode/core/testing/TestIsolationGuard.kt b/core/src/testFixtures/kotlin/ai/opencode/core/testing/TestIsolationGuard.kt index 8d30a17b4..6a7062955 100644 --- a/core/src/testFixtures/kotlin/ai/opencode/core/testing/TestIsolationGuard.kt +++ b/core/src/testFixtures/kotlin/ai/opencode/core/testing/TestIsolationGuard.kt @@ -208,6 +208,7 @@ object TestIsolationGuard { sharedProbe("Shared.uploadUnsupportedServerIDs", SharedKeys.uploadUnsupportedServerIDs, "[]"), sharedProbe("Shared.pinnedSessionKeys", SharedKeys.pinnedSessionKeys, "[]"), sharedProbe("Shared.mutedSessionKeys", SharedKeys.mutedSessionKeys, "[]"), + sharedProbe("Shared.hiddenSessionKeys", SharedKeys.hiddenSessionKeys, "[]"), sharedProbe("Shared.favoriteModelIDs", SharedKeys.favoriteModelIDs, "[]"), sharedProbe("Shared.appTheme", ThemeSharedKeys.appTheme, "System"), sharedProbe("Shared.appearanceColorScheme", ThemeSharedKeys.appearanceColorScheme, "System"), diff --git a/docs/parity/drawer.md b/docs/parity/drawer.md index 396a90911..5ecce800b 100644 --- a/docs/parity/drawer.md +++ b/docs/parity/drawer.md @@ -44,7 +44,7 @@ Status values: `todo`, `partial: `, `done`, `n/a: