Skip to content

Commit ead49ea

Browse files
jonathanlabclaude
andcommitted
fix: resolve type errors and add readOnly prop to RichTextEditor
- Remove onNewTask prop from EmptyTaskPanel (now manages modal internally) - Add readOnly prop to RichTextEditor interface - Remove unused Box import from TaskListContent - Fix all TypeScript type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e32cffd commit ead49ea

34 files changed

+1398
-467
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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";`
78

89
## Layout Components
910

src/api/posthogClient.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,11 @@ export class PostHogAPIClient {
242242
const data = await response.json();
243243
return data.results ?? data ?? [];
244244
}
245+
246+
async getUsers() {
247+
const data = await this.api.get("/api/users/", {
248+
query: { limit: 1000 },
249+
});
250+
return data.results ?? [];
251+
}
245252
}

src/renderer/components/FolderPicker.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Folder, FolderIcon } from "@phosphor-icons/react";
1+
import { Folder as FolderIcon } from "@phosphor-icons/react";
22
import { ChevronDownIcon } from "@radix-ui/react-icons";
33
import {
44
Box,
@@ -187,7 +187,11 @@ export function FolderPicker({
187187
>
188188
<Flex justify="between" align="center" gap="2" width="100%">
189189
<Flex align="center" gap="2" style={{ minWidth: 0, flex: 1 }}>
190-
<Folder size={16} weight="regular" style={{ flexShrink: 0 }} />
190+
<FolderIcon
191+
size={16}
192+
weight="regular"
193+
style={{ flexShrink: 0 }}
194+
/>
191195
<Text
192196
size={size}
193197
style={{

src/renderer/components/LogView.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { CaretDown, CaretUp, Copy, Trash } from "@phosphor-icons/react";
1+
import {
2+
CaretDown as CaretDownIcon,
3+
CaretUp as CaretUpIcon,
4+
Copy as CopyIcon,
5+
Trash as TrashIcon,
6+
} from "@phosphor-icons/react";
27
import type { AgentEvent } from "@posthog/agent";
38
import {
49
Box,
@@ -268,7 +273,7 @@ export function LogView({ logs, isRunning, onClearLogs }: LogViewProps) {
268273
color="gray"
269274
onClick={() => setExpandAll(false)}
270275
>
271-
<CaretUp size={16} />
276+
<CaretUpIcon size={16} />
272277
</IconButton>
273278
</Tooltip>
274279
<Tooltip content="Expand all">
@@ -278,7 +283,7 @@ export function LogView({ logs, isRunning, onClearLogs }: LogViewProps) {
278283
color="gray"
279284
onClick={() => setExpandAll(true)}
280285
>
281-
<CaretDown size={16} />
286+
<CaretDownIcon size={16} />
282287
</IconButton>
283288
</Tooltip>
284289
</>
@@ -290,7 +295,7 @@ export function LogView({ logs, isRunning, onClearLogs }: LogViewProps) {
290295
color="gray"
291296
onClick={handleCopyLogs}
292297
>
293-
<Copy size={16} />
298+
<CopyIcon size={16} />
294299
</IconButton>
295300
</Tooltip>
296301
{onClearLogs && (
@@ -301,7 +306,7 @@ export function LogView({ logs, isRunning, onClearLogs }: LogViewProps) {
301306
color="red"
302307
onClick={onClearLogs}
303308
>
304-
<Trash size={16} />
309+
<TrashIcon size={16} />
305310
</IconButton>
306311
</Tooltip>
307312
)}

src/renderer/components/MainLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { CommandMenu } from "./command";
99
import { SettingsView } from "./SettingsView";
1010
import { StatusBar } from "./StatusBar";
1111
import { TabBar } from "./TabBar";
12-
import { TaskCreate } from "./TaskCreate";
13-
import { TaskDetail } from "./TaskDetail";
14-
import { TaskList } from "./TaskList";
12+
import { TaskCreate } from "./tasks/TaskCreate";
13+
import { TaskDetail } from "./tasks/TaskDetail";
14+
import { TaskList } from "./tasks/TaskList";
1515

1616
export function MainLayout() {
1717
const { activeTabId, tabs, createTab, setActiveTab, closeTab } =

src/renderer/components/RichTextEditor.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ interface RichTextEditorProps {
3030
style?: React.CSSProperties;
3131
showToolbar?: boolean;
3232
minHeight?: string;
33+
readOnly?: boolean;
3334
}
3435

3536
export function RichTextEditor({
@@ -43,6 +44,7 @@ export function RichTextEditor({
4344
style,
4445
showToolbar = true,
4546
minHeight = "100px",
47+
readOnly = false,
4648
}: RichTextEditorProps) {
4749
const [mentionItems, setMentionItems] = useState<MentionItem[]>([]);
4850
const mentionItemsRef = useRef(mentionItems);
@@ -63,6 +65,7 @@ export function RichTextEditor({
6365
}, [repoPath]);
6466

6567
const editor = useEditor({
68+
editable: !readOnly,
6669
extensions: [
6770
StarterKit.configure({
6871
// Disable default keyboard shortcuts to override them

0 commit comments

Comments
 (0)