mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
fix(buzz): hide DM + Console cards until there is a workspace
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8KBSw6smQRyXLiWHeDsZ8
This commit is contained in:
+9
-4
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user