+
{/* Immutable Goal */}
-
+
{normalizedGoal}
@@ -175,6 +179,7 @@ export const SpaceFocusHudWidget = ({
microStep={microStep ?? null}
isBusy={isSavingIntent}
onUpdate={handleInlineMicrostepUpdate}
+ isHidden={isOverlayOpen}
/>
@@ -184,7 +189,10 @@ export const SpaceFocusHudWidget = ({
diff --git a/src/widgets/space-focus-hud/ui/ThoughtOrb.tsx b/src/widgets/space-focus-hud/ui/ThoughtOrb.tsx
index 17bfd4a..5444fe8 100644
--- a/src/widgets/space-focus-hud/ui/ThoughtOrb.tsx
+++ b/src/widgets/space-focus-hud/ui/ThoughtOrb.tsx
@@ -22,27 +22,32 @@ export const ThoughtOrb = ({ isFocusMode, onCaptureThought }: ThoughtOrbProps) =
}, [isOpen]);
useEffect(() => {
- if (!isOpen) return;
-
- const handleEscape = (e: KeyboardEvent) => {
- if (e.key === 'Escape') {
+ const handleKeyDownGlobal = (e: KeyboardEvent) => {
+ // Escape to close
+ if (e.key === 'Escape' && isOpen) {
setIsOpen(false);
// Slightly delay clearing text to allow fade out animation
setTimeout(() => setDraft(''), 300);
}
+ // Cmd+K (Mac) or Ctrl+K (Windows/Linux) or / to open globally
+ if (!isOpen && (( (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') || e.key === '/')) {
+ // Prevent default browser shortcuts (Find, Search)
+ e.preventDefault();
+ setIsOpen(true);
+ }
};
const handleOutsideClick = (e: MouseEvent) => {
- if (containerRef.current && !containerRef.current.contains(e.target as Node)) {
+ if (isOpen && containerRef.current && !containerRef.current.contains(e.target as Node)) {
setIsOpen(false);
setTimeout(() => setDraft(''), 300);
}
};
- window.addEventListener('keydown', handleEscape);
+ window.addEventListener('keydown', handleKeyDownGlobal);
document.addEventListener('mousedown', handleOutsideClick);
return () => {
- window.removeEventListener('keydown', handleEscape);
+ window.removeEventListener('keydown', handleKeyDownGlobal);
document.removeEventListener('mousedown', handleOutsideClick);
};
}, [isOpen]);
@@ -69,83 +74,54 @@ export const ThoughtOrb = ({ isFocusMode, onCaptureThought }: ThoughtOrbProps) =
};
return (
-
-
- {/* The Magnetic Orb */}
-
-
- {/* Tooltip */}
-
-
- Brain Dump
-
-
-
-
- {/* Input Field */}
-
+ {/* Idle Hint Text (Only visible on hover when closed) */}
+
+
+ Ctrl / ⌘
+ K
+ Brain Dump
+
+
+
+ {/* Morphing Input Field */}
+
setDraft(e.target.value)}
+ disabled={isAbsorbing || !isOpen}
+ placeholder="Empty your mind..."
+ className={cn(
+ "relative w-full h-full bg-transparent px-8 text-[15.5px] font-light tracking-wide text-white outline-none placeholder:text-white/30 drop-shadow-sm transition-all duration-500",
+ isOpen && !isAbsorbing ? "opacity-100 delay-200 z-10" : "opacity-0 w-0 px-0 pointer-events-none -translate-y-2"
+ )}
+ />
+
+
);
};