diff --git a/.claude/ralph-loop.local.md b/.claude/ralph-loop.local.md index a205858..eba1795 100644 --- a/.claude/ralph-loop.local.md +++ b/.claude/ralph-loop.local.md @@ -1,6 +1,6 @@ --- active: true -iteration: 47 +iteration: 48 max_iterations: 0 completion_promise: null started_at: "2026-01-20T18:56:19Z" diff --git a/src/components/features/python-runner/PythonOutput.tsx b/src/components/features/python-runner/PythonOutput.tsx index db8f656..aac117c 100644 --- a/src/components/features/python-runner/PythonOutput.tsx +++ b/src/components/features/python-runner/PythonOutput.tsx @@ -1,3 +1,5 @@ +'use client' + import { useState, useEffect, useCallback } from 'react' import { motion } from 'framer-motion' import { Play, CircleNotch, ArrowClockwise, Warning } from '@phosphor-icons/react' diff --git a/src/components/features/python-runner/PythonTerminal.tsx b/src/components/features/python-runner/PythonTerminal.tsx index 4e0e5a4..36a600d 100644 --- a/src/components/features/python-runner/PythonTerminal.tsx +++ b/src/components/features/python-runner/PythonTerminal.tsx @@ -1,3 +1,5 @@ +'use client' + import { useRef, useEffect } from 'react' import { usePythonTerminal } from '@/hooks/usePythonTerminal' import { TerminalHeader } from '@/components/features/python-runner/TerminalHeader' diff --git a/src/components/features/snippet-editor/CodeEditorSection.tsx b/src/components/features/snippet-editor/CodeEditorSection.tsx index 05a05c3..1cb0b5b 100644 --- a/src/components/features/snippet-editor/CodeEditorSection.tsx +++ b/src/components/features/snippet-editor/CodeEditorSection.tsx @@ -1,3 +1,5 @@ +'use client' + import { Label } from '@/components/ui/label' import { Checkbox } from '@/components/ui/checkbox' import { MonacoEditor } from '@/components/features/snippet-editor/MonacoEditor' diff --git a/src/components/features/snippet-editor/SplitScreenEditor.tsx b/src/components/features/snippet-editor/SplitScreenEditor.tsx index 66a9d3e..503976d 100644 --- a/src/components/features/snippet-editor/SplitScreenEditor.tsx +++ b/src/components/features/snippet-editor/SplitScreenEditor.tsx @@ -1,3 +1,5 @@ +'use client' + import { useState } from 'react' import { MonacoEditor } from '@/components/features/snippet-editor/MonacoEditor' import { ReactPreview } from '@/components/features/snippet-editor/ReactPreview' diff --git a/src/components/ui/badge.test.tsx b/src/components/ui/badge.test.tsx index c84506e..5716317 100644 --- a/src/components/ui/badge.test.tsx +++ b/src/components/ui/badge.test.tsx @@ -33,7 +33,7 @@ describe('Badge Component', () => { it('applies secondary variant', () => { const { container } = render(Secondary) - const badge = container.firstChild + const badge = container.firstChild as HTMLElement | null expect(badge?.className).toBeTruthy() }) diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index cfe014e..18f02bc 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -1,6 +1,23 @@ import { ComponentProps, forwardRef } from "react" import { cn } from "@/lib/utils" +const buttonVariants = (props?: { variant?: string; size?: string }) => { + const variant = props?.variant || "filled" + const variantClass = { + filled: "mat-mdc-unelevated-button", + outlined: "mat-mdc-outlined-button", + outline: "mat-mdc-outlined-button", + text: "mat-mdc-button", + elevated: "mat-mdc-raised-button", + tonal: "mat-tonal-button", + secondary: "mat-mdc-button", + destructive: "mat-mdc-unelevated-button", + ghost: "mat-mdc-button", + link: "mat-mdc-button", + }[variant] || "mat-mdc-button" + return variantClass +} + interface ButtonProps extends ComponentProps<"button"> { variant?: "filled" | "outlined" | "outline" | "text" | "elevated" | "tonal" | "secondary" | "destructive" | "ghost" | "link" size?: "default" | "sm" | "lg" | "icon" @@ -36,3 +53,5 @@ export const Button = forwardRef( } ) Button.displayName = "Button" + +export { buttonVariants } diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx index 0a7230e..91fbf3b 100644 --- a/src/components/ui/chart.tsx +++ b/src/components/ui/chart.tsx @@ -199,13 +199,10 @@ function ChartTooltipContent({
{ +interface CollapsibleProps extends Omit, "children"> { open?: boolean onOpenChange?: (open: boolean) => void defaultOpen?: boolean + children?: ReactNode | ((state: { open: boolean; onOpenChange: (open: boolean) => void }) => ReactNode) } function Collapsible({ diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index 9147b80..42edb41 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -27,8 +27,8 @@ function DialogTrigger({ children, onClick, asChild = false, ...props }: DialogT return ( {children} diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx index 08205b2..2774c50 100644 --- a/src/components/ui/popover.tsx +++ b/src/components/ui/popover.tsx @@ -1,6 +1,6 @@ "use client" -import { ComponentProps, useState, useRef, useEffect } from "react" +import React, { ComponentProps, useState, useRef, useEffect, createContext, useContext, isValidElement, cloneElement } from "react" import { createPortal } from "react-dom" import { cn } from "@/lib/utils" @@ -9,7 +9,7 @@ interface PopoverContextValue { setOpen: (open: boolean) => void } -const PopoverContext = React.createContext(null) +const PopoverContext = createContext(null) function Popover({ children }: { children: React.ReactNode }) { const [open, setOpen] = useState(false) @@ -21,14 +21,14 @@ function Popover({ children }: { children: React.ReactNode }) { } function PopoverTrigger({ children, asChild, ...props }: ComponentProps<"button"> & { asChild?: boolean }) { - const context = React.useContext(PopoverContext) + const context = useContext(PopoverContext) const handleClick = () => { context?.setOpen(!context.open) } - if (asChild && React.isValidElement(children)) { - return React.cloneElement(children as React.ReactElement, { + if (asChild && isValidElement(children)) { + return cloneElement(children as React.ReactElement, { onClick: handleClick, ...props, }) @@ -49,7 +49,7 @@ function PopoverContent({ align?: "start" | "center" | "end" sideOffset?: number }) { - const context = React.useContext(PopoverContext) + const context = useContext(PopoverContext) const contentRef = useRef(null) const [mounted, setMounted] = useState(false) @@ -107,7 +107,7 @@ function PopoverAnchor({ children }: { children: React.ReactNode }) { } function PopoverClose({ children, className, ...props }: ComponentProps<"button">) { - const context = React.useContext(PopoverContext) + const context = useContext(PopoverContext) return (