Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

fix: editor menu colors and search focus

ogsamrat6a5b94575ecd
diff --git a/apps/app/src/react-app/domains/session/editor/editor-surface.tsx b/apps/app/src/react-app/domains/session/editor/editor-surface.tsx
index 34111827..29ece32b 100644
--- a/apps/app/src/react-app/domains/session/editor/editor-surface.tsx
+++ b/apps/app/src/react-app/domains/session/editor/editor-surface.tsx
@@ -361,8 +361,8 @@ export function EditorSurface({ monaco, surface, onSave, onCursor, onHunks, navi
return (
<div className="relative min-h-0 flex-1" data-editor-surface={mode ?? "empty"}>
{/* display:none, not visibility: Monaco's layers set their own visibility and would show through. */}
- <div ref={codeHostRef} className="absolute inset-0" style={{ display: mode === "file" ? "block" : "none" }} />
- <div ref={diffHostRef} className="absolute inset-0" style={{ display: mode === "diff" ? "block" : "none" }} />
+ <div ref={codeHostRef} className="monaco-component absolute inset-0" style={{ display: mode === "file" ? "block" : "none" }} />
+ <div ref={diffHostRef} className="monaco-component absolute inset-0" style={{ display: mode === "diff" ? "block" : "none" }} />
</div>
);
}
diff --git a/apps/app/src/react-app/domains/session/editor/search-view.tsx b/apps/app/src/react-app/domains/session/editor/search-view.tsx
index f5d43783..7b9faf73 100644
--- a/apps/app/src/react-app/domains/session/editor/search-view.tsx
+++ b/apps/app/src/react-app/domains/session/editor/search-view.tsx
@@ -62,9 +62,13 @@ export function SearchView(props: {
const inputRef = useRef<HTMLInputElement | null>(null);
const abortRef = useRef<AbortController | null>(null);
+ // Next frame: the shortcut's keydown is still reaching the editor, which would take focus back.
useEffect(() => {
- inputRef.current?.focus();
- inputRef.current?.select();
+ const frame = window.requestAnimationFrame(() => {
+ inputRef.current?.focus();
+ inputRef.current?.select();
+ });
+ return () => window.cancelAnimationFrame(frame);
}, [props.focusNonce]);
// Search as you type (debounced); a new search cancels the one running.