Image Pipeline Playground
feat(frontend): image-first dark playground shell
Mohammad Rajaei6271899876a2
diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsxindex c56b2ae..c9e3270 100644--- a/frontend/src/app/App.tsx+++ b/frontend/src/app/App.tsx@@ -10,7 +10,6 @@ import {import { PipelineCanvas } from '../features/canvas/PipelineCanvas'import { NodePalette } from '../features/palette/NodePalette'import { NodeInspector } from '../features/inspector/NodeInspector'-import { PreviewGrid } from '../features/preview/PreviewGrid'import { CodePanel } from '../features/code/CodePanel'import { useGraphStore } from '../store/graphStore'import { requestCodegen, useExecutionSocket } from '../hooks/useExecutionSocket'@@ -35,23 +34,22 @@ export default function App() {}return (- <Box sx={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>+ <Box sx={{ display: 'flex', flexDirection: 'column', height: '100vh', bgcolor: '#0f0f0f' }}><AppBarposition="static"elevation={0}- color="transparent"- sx={{ borderBottom: 1, borderColor: 'divider' }}+ sx={{ bgcolor: '#161616', borderBottom: '1px solid rgba(255,255,255,0.08)' }}><Toolbar variant="dense" sx={{ gap: 2 }}><Typographyvariant="h6"component="h1"- sx={{ fontFamily: '"Fraunces", Georgia, serif', fontWeight: 700 }}+ sx={{ fontFamily: '"Fraunces", Georgia, serif', fontWeight: 700, color: '#f4f1ea' }}>Image Pipes</Typography>- <Typography variant="body2" color="text.secondary" sx={{ mr: 'auto' }}>- OpenCV pipeline playground+ <Typography variant="body2" sx={{ mr: 'auto', color: 'rgba(244,241,234,0.55)' }}>+ Image-first OpenCV playground</Typography><TextFieldsize="small"@@ -59,7 +57,12 @@ export default function App() {type="number"value={seed}onChange={(e) => setSeed(Number(e.target.value))}- sx={{ width: 100 }}+ sx={{+ width: 100,+ '& .MuiInputBase-root': { color: '#eee', bgcolor: '#222' },+ '& .MuiInputLabel-root': { color: 'rgba(255,255,255,0.55)' },+ '& .MuiOutlinedInput-notchedOutline': { borderColor: 'rgba(255,255,255,0.12)' },+ }}/><TextFieldsize="small"@@ -67,18 +70,28 @@ export default function App() {type="number"value={sampleCount}onChange={(e) => setSampleCount(Number(e.target.value))}- sx={{ width: 110 }}+ sx={{+ width: 110,+ '& .MuiInputBase-root': { color: '#eee', bgcolor: '#222' },+ '& .MuiInputLabel-root': { color: 'rgba(255,255,255,0.55)' },+ '& .MuiOutlinedInput-notchedOutline': { borderColor: 'rgba(255,255,255,0.12)' },+ }}/><Stack direction="row" spacing={1}>- <Button variant="contained" disabled={isExecuting} onClick={run}>+ <Button variant="contained" color="warning" disabled={isExecuting} onClick={run}>Run</Button>{isExecuting && (- <Button variant="outlined" color="warning" onClick={cancel}>+ <Button variant="outlined" color="inherit" onClick={cancel}>Cancel</Button>)}- <Button variant="outlined" disabled={isExecuting} onClick={() => void onExport()}>+ <Button+ variant="outlined"+ disabled={isExecuting}+ onClick={() => void onExport()}+ sx={{ color: '#eee', borderColor: 'rgba(255,255,255,0.2)' }}+ >Export Python</Button></Stack>@@ -90,24 +103,30 @@ export default function App() {flex: 1,minHeight: 0,display: 'grid',- gridTemplateColumns: '220px 1fr 280px',- gridTemplateRows: '1fr 240px',+ gridTemplateColumns: '200px minmax(0, 1fr) 300px',}}>- <Box sx={{ gridRow: '1 / span 2', borderRight: 1, borderColor: 'divider' }}>+ <Box sx={{ borderRight: '1px solid rgba(255,255,255,0.08)', bgcolor: '#141414', overflow: 'auto' }}><NodePalette /></Box>- <Box sx={{ minHeight: 0 }}>+ <Box sx={{ minHeight: 0, minWidth: 0 }}><PipelineCanvas /></Box>- <Box sx={{ borderLeft: 1, borderColor: 'divider', minHeight: 0 }}>- <NodeInspector />- </Box>- <Box sx={{ borderTop: 1, borderColor: 'divider', minHeight: 0 }}>- <PreviewGrid />- </Box>- <Box sx={{ borderTop: 1, borderLeft: 1, borderColor: 'divider', minHeight: 0 }}>- <CodePanel />+ <Box+ sx={{+ borderLeft: '1px solid rgba(255,255,255,0.08)',+ bgcolor: '#141414',+ display: 'grid',+ gridTemplateRows: '1fr 220px',+ minHeight: 0,+ }}+ >+ <Box sx={{ minHeight: 0, overflow: 'auto' }}>+ <NodeInspector />+ </Box>+ <Box sx={{ borderTop: '1px solid rgba(255,255,255,0.08)', minHeight: 0 }}>+ <CodePanel />+ </Box></Box></Box></Box>diff --git a/frontend/src/features/code/CodePanel.tsx b/frontend/src/features/code/CodePanel.tsxindex 658ad72..9171e69 100644--- a/frontend/src/features/code/CodePanel.tsx+++ b/frontend/src/features/code/CodePanel.tsx@@ -15,6 +15,7 @@ export function CodePanel() {height="100%"defaultLanguage="python"value={code}+ theme="vs-dark"options={{readOnly: true,minimap: { enabled: false },diff --git a/frontend/src/main.tsx b/frontend/src/main.tsxindex 5bbf569..67bc6e9 100644--- a/frontend/src/main.tsx+++ b/frontend/src/main.tsx@@ -7,10 +7,12 @@ import './index.css'const theme = createTheme({palette: {- mode: 'light',- primary: { main: '#1b4d3e' },- secondary: { main: '#c45c26' },- background: { default: '#f3f0e8', paper: '#fffdf8' },+ mode: 'dark',+ primary: { main: '#7dcea0' },+ secondary: { main: '#e67e22' },+ background: { default: '#0f0f0f', paper: '#1a1a1a' },+ text: { primary: '#f4f1ea', secondary: 'rgba(244,241,234,0.65)' },+ divider: 'rgba(255,255,255,0.1)',},typography: {fontFamily: '"IBM Plex Sans", "Segoe UI", sans-serif',