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
+1
View File
@@ -1469,6 +1469,7 @@ export namespace Config {
consoleState: {
consoleManagedProviders: Array.from(consoleManagedProviders),
activeOrgName,
switchableOrgCount: 0,
},
}
})
@@ -3,6 +3,7 @@ import z from "zod"
export const ConsoleState = z.object({
consoleManagedProviders: z.array(z.string()),
activeOrgName: z.string().optional(),
switchableOrgCount: z.number().int().nonnegative(),
})
export type ConsoleState = z.infer<typeof ConsoleState>
@@ -10,4 +11,5 @@ export type ConsoleState = z.infer<typeof ConsoleState>
export const emptyConsoleState: ConsoleState = {
consoleManagedProviders: [],
activeOrgName: undefined,
switchableOrgCount: 0,
}