From 2621fed63c82f9ea9234eb752349e3d45f7ca196 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Jul 2026 20:46:56 +0000 Subject: [PATCH] fix(buzz): hide DM + Console cards until there is a workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DM inbox and Agent Console both query only your joined/dialect workspace relays (BuzzWorkspaces + BuzzRelayDialect), so with zero workspaces they have no relays to hit and can only ever be empty — yet the hub showed both as prominent top-level cards, implying they're global features when they're workspace-derived (a DM is a per-community NIP-29 group; the console aggregates the fleet on your community relays). Gate both behind having >=1 workspace so the empty state is just the "join a workspace" prompt; once you have one they sit above the list as the cross-workspace inbox / fleet view. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01J8KBSw6smQRyXLiWHeDsZ8 --- .../ui/screen/loggedIn/buzz/BuzzWorkspacesScreen.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/buzz/BuzzWorkspacesScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/buzz/BuzzWorkspacesScreen.kt index 148532a1b3..e487be61b7 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/buzz/BuzzWorkspacesScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/buzz/BuzzWorkspacesScreen.kt @@ -160,13 +160,18 @@ fun BuzzWorkspacesScreen( ) { item { BuzzHeroHeader(workspaceCount = workspaces.size, channelCount = totalChannels) } - item { AgentConsoleHeroCard(onClick = { nav.nav(Route.AgentConsole) }) } - - item { DirectMessagesCard(onClick = { nav.nav(Route.BuzzDmList) }) } - if (workspaces.isEmpty()) { + // No workspaces means no relays to query, so the DM inbox and Agent Console + // (both scoped to your joined/dialect workspace relays) would only ever be empty. + // Show just the "join a workspace" prompt until there's at least one. item { EmptyWorkspaces(onBrowse = { nav.nav(Route.RelayGroups) }) } } else { + // These aggregate ACROSS your workspaces (a unified DM inbox + fleet console), so + // they belong above the per-workspace list — but only once you actually have one. + item { AgentConsoleHeroCard(onClick = { nav.nav(Route.AgentConsole) }) } + + item { DirectMessagesCard(onClick = { nav.nav(Route.BuzzDmList) }) } + item { Text( text = stringRes(R.string.buzz_workspaces_section),