Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix: empty state drawer (#723)

gbirmancc0f4b37f892
diff --git a/js/app/packages/app/component/UnifiedListEmptyState.tsx b/js/app/packages/app/component/UnifiedListEmptyState.tsx
index c693433ead..50bb0d878f 100644
--- a/js/app/packages/app/component/UnifiedListEmptyState.tsx
+++ b/js/app/packages/app/component/UnifiedListEmptyState.tsx
@@ -13,7 +13,7 @@ import { useSplitPanelOrThrow } from './split-layout/layoutUtils';
false && fileSelector;
false && folderSelector;
-const EMPTY_STATE_HELP_DRAWER_TIMEOUT_MS = 2000;
+const EMPTY_STATE_HELP_DRAWER_TIMEOUT_MS = 0;
const DEFAULT_EMPTY_MESSAGE = 'No items to show.';
diff --git a/js/app/packages/app/component/dock/Dock.tsx b/js/app/packages/app/component/dock/Dock.tsx
index 35cf2e17c1..79e9b45198 100644
--- a/js/app/packages/app/component/dock/Dock.tsx
+++ b/js/app/packages/app/component/dock/Dock.tsx
@@ -29,9 +29,6 @@ import { TOKENS } from '@core/hotkey/tokens';
import { playSound } from '@app/util/sound';
import { QuickAccess } from './QuickAccess';
-// import { Debug } from './Debug';
-// import Hints from './Hints';
-
export function Dock() {
const activeSplitId = createMemo(() => globalSplitManager()?.activeSplitId());
const [showGlitchEffect, setShowGlitchEffect] = createSignal(false);
@@ -300,6 +297,7 @@ export function Dock() {
<Show when={isSoupActive()}>
<IconButton
onClick={() => {
+ globalSplitManager()?.returnFocus();
const showHelp = activeSoupDrawerCommand();
if (!showHelp) { return };
runCommand(showHelp);
diff --git a/js/app/packages/core/component/Toast/Toast.tsx b/js/app/packages/core/component/Toast/Toast.tsx
index cb5d5747f7..445f89c9c3 100644
--- a/js/app/packages/core/component/Toast/Toast.tsx
+++ b/js/app/packages/core/component/Toast/Toast.tsx
@@ -106,17 +106,18 @@ function wasRecentlyShown(message: string, type: ToastType): boolean {
function success(
message: string,
subtext?: string,
- action?: { text: string; onClick: () => void }
+ action?: { text: string; onClick: () => void },
+ duration?: number
) {
if (!wasRecentlyShown(message, ToastType.SUCCESS)) {
- createToast(message, ToastType.SUCCESS, subtext, action);
+ createToast(message, ToastType.SUCCESS, subtext, action, duration);
}
}
// Tell users that an action has failed, because of us
-function failure(message: string, subtext?: string) {
+function failure(message: string, subtext?: string, duration?: number) {
if (!wasRecentlyShown(message, ToastType.FAILURE)) {
- createToast(message, ToastType.FAILURE, subtext);
+ createToast(message, ToastType.FAILURE, subtext, undefined, duration);
}
}
@@ -282,7 +283,7 @@ function createToast(
message={message}
subtext={subtext}
action={action}
- duration={duration}
+ duration={duration ?? THROTTLE_DURATION + 100}
/>
),
{ region: 'toast-region' }