fix(tui): only show org switch affordances when useful (#21054)

This commit is contained in:
Kit Langton
2026-04-04 19:25:37 -04:00
committed by GitHub
parent 985663620f
commit c6ebc7ff7c
5 changed files with 33 additions and 15 deletions
+17 -13
View File
@@ -630,19 +630,23 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
},
category: "Provider",
},
{
title: "Switch org",
value: "console.org.switch",
suggested: Boolean(sync.data.console_state.activeOrgName),
slash: {
name: "org",
aliases: ["orgs", "switch-org"],
},
onSelect: () => {
dialog.replace(() => <DialogConsoleOrg />)
},
category: "Provider",
},
...(sync.data.console_state.switchableOrgCount > 1
? [
{
title: "Switch org",
value: "console.org.switch",
suggested: Boolean(sync.data.console_state.activeOrgName),
slash: {
name: "org",
aliases: ["orgs", "switch-org"],
},
onSelect: () => {
dialog.replace(() => <DialogConsoleOrg />)
},
category: "Provider",
},
]
: []),
{
title: "View status",
keybind: "status_view",