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: focus search input if search is already open (#2431)
gbirman03771627c65d
diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsxindex e6d2815597..36bb6cbbb1 100644--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx@@ -226,6 +226,27 @@ export const registerSidebarHotkeys = ({resetHotkeysState();debounceResetHotkeysState.clear();}++ if (link.id === 'search' && !e?.shiftKey) {+ const activeSplit = globalSplitManager()?.activeSplit();+ const content = activeSplit?.content();+ if (+ activeSplit &&+ content?.type === 'component' &&+ content.id === 'search'+ ) {+ const splitEl = document.querySelector(+ `[data-split-id="${activeSplit.id}"]`+ );+ const searchInput =+ splitEl?.querySelector<HTMLInputElement>('[data-soup-search]');+ if (searchInput) {+ searchInput.focus();+ return true;+ }+ }+ }+openWithSplit({type: 'component',diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsxindex 581b43c032..3505748679 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx@@ -97,6 +97,7 @@ export const SoupSearchbar = (props: SoupSearchbarProps) => {/><inputref={setRef}+ data-soup-searchtype="text"value={searchText()}onInput={(e) => setSearchText(e.currentTarget.value)}