diff options
| author | kboz <kutayboz@gmail.com> | 2026-04-18 20:29:14 +0200 |
|---|---|---|
| committer | kboz <kutayboz@gmail.com> | 2026-04-18 20:29:14 +0200 |
| commit | 8cc70dfee2049772a2da9cfdeb15f64452bc390b (patch) | |
| tree | 539dc2b4a314b45f8a9d024e57e196eab09653b4 /.github/instructions/frontend.instructions.md | |
| parent | 2c5b7da8165e3f8b90748e8ced1de0e3e8d52309 (diff) | |
| download | haul-8cc70dfee2049772a2da9cfdeb15f64452bc390b.tar.gz | |
AI instructions
Diffstat (limited to '.github/instructions/frontend.instructions.md')
| -rw-r--r-- | .github/instructions/frontend.instructions.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.github/instructions/frontend.instructions.md b/.github/instructions/frontend.instructions.md new file mode 100644 index 0000000..7ce27c0 --- /dev/null +++ b/.github/instructions/frontend.instructions.md @@ -0,0 +1,14 @@ +--- +description: "Use when editing the React frontend, polling hooks, SSE hooks, or display components under frontend/src. Covers data flow, backend assumptions, and styling boundaries." +name: "Frontend Data Flow" +applyTo: + - "frontend/src/**/*.js" + - "frontend/src/**/*.css" +--- +# Frontend Data Flow + +- Keep data fetching in hooks or small container components. `Path.js`, `Info.js`, `Log.js`, and `Options.js` wire backend data into display components; `usePolling.js` and `useSSE.js` own subscription cleanup. +- Preserve the current backend contract unless the task explicitly coordinates with backend changes. The frontend is hardcoded to `http://localhost:8000`, not the Rust backend on `:8080`. +- Keep display components render-focused. Formatting, icons, animation, and simple click handlers belong near `DataDisplay.js`, `InfoDisplay.js`, and `LogComponent.js`; reusable network behavior belongs in hooks. +- Stick to the current stack: React function components, Tailwind utility classes, and local CSS files. Do not introduce a new state library, routing layer, or styling system unless asked. +- If you add polling or SSE behavior, always include cleanup and keep the return shape simple for the consuming component.
\ No newline at end of file |
