Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(soup): derive tab keyboard nav order from visual tab list (#2204)
Evan Hutnikaf5d7f14b9ee
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsxindex 78b9605a0e..adab5db714 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx@@ -27,7 +27,7 @@ import ChevronDownIcon from '@icon/regular/caret-down.svg';type TabItem = { value: string; label: string };/** Views that have tab definitions. Shared between VIEW_TAB_LISTS and VIEW_TAB_PRESETS. */-type TabbedListView = Extract<+export type TabbedListView = Extract<ListView,'inbox' | 'agents' | 'mail' | 'documents' | 'tasks' | 'channels' | 'folders'>;diff --git a/js/app/packages/app/component/next-soup/soup-view/use-soup-view-hotkeys.ts b/js/app/packages/app/component/next-soup/soup-view/use-soup-view-hotkeys.tsindex ae7b02d18d..fefe22893e 100644--- a/js/app/packages/app/component/next-soup/soup-view/use-soup-view-hotkeys.ts+++ b/js/app/packages/app/component/next-soup/soup-view/use-soup-view-hotkeys.ts@@ -17,6 +17,7 @@ import type { SoupState } from '../create-soup-state';import { openEntityInSplitFromUnifiedList } from '@app/component/next-soup/utils';import { isListViewID, type ListView } from '@app/constants/list-views';import { VIEW_TAB_PRESETS } from '@app/component/app-sidebar/soup-filter-presets';+import { VIEW_TAB_LISTS, type TabbedListView } from './soup-view-tabs';import { useAnalytics } from '@app/component/analytics-context';type UseSoupViewHotkeysOptions = {@@ -303,12 +304,12 @@ export const useSoupViewHotkeys = (options: UseSoupViewHotkeysOptions) => {hide: true,}).withGroup(group);+ const isTabbedView = (v: string): v is TabbedListView => v in VIEW_TAB_LISTS;+const getTabKeys = () => {const view = currentView();- if (!view) return [];- const config = VIEW_TAB_PRESETS[view];- if (!config) return [];- return Object.keys(config.tabs);+ if (!view || !isTabbedView(view)) return [];+ return VIEW_TAB_LISTS[view].map((t) => t.value);};const switchToTabIndex = (index: number) => {