Skip to content

Commit 3afacfa

Browse files
committed
tweaks
1 parent 465be2e commit 3afacfa

File tree

3 files changed

+209
-147
lines changed

3 files changed

+209
-147
lines changed

.claude/CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
- Use `Kbd` for key hints. Fallback to Tailwind CSS when Radix lacks props.
55
- Use zustand for state management.
66
- Prefer creating separate, reusable components over large monolithic components.
7-
- When using Phosphor Icons, use the Icon name suffixed by `Icon` for the component name. For example, `<ArrowsDownUpIcon>`, not `<ArrowsDownUpIcon>`. Also import them like so: `import { ArrowsDownUpIcon } from "@phosphor-icons/react";`
8-
7+
- When using Phosphor Icons, use the Icon name suffixed by `Icon` for the component name. For example, `<ArrowsDownUpIcon>`, not `<ArrowsDownUp>`. Also import them like so: `import { ArrowsDownUpIcon } from "@phosphor-icons/react";` Don't import the icon name without the `Icon` suffix. Also don't cast it like so during the import `import { ArrowsDownUp as ArrowsDownUpIcon } from "@phosphor-icons/react";`
8+
- Always "Sentence case" stuff. For example, "Task list", not "Task List".
99
## Layout Components
1010

1111
- **Box**: Fundamental layout component for spacing, sizing, and responsive display

src/renderer/components/ShellTerminal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export function ShellTerminal({ cwd }: ShellTerminalProps) {
2828
// Auto-focus terminal when switching to shell mode
2929
useEffect(() => {
3030
if (cliMode === "shell" && terminal.current) {
31-
terminal.current.focus();
31+
// Use requestAnimationFrame to ensure the component is visible before focusing
32+
requestAnimationFrame(() => {
33+
terminal.current?.focus();
34+
});
3235
}
3336
}, [cliMode]);
3437

0 commit comments

Comments
 (0)