بنقرة واحدة
ui-page-structure
// Standardize DataConnect route/page layout, logic/JSX separation, tests, and README expectations. Use when organizing pages/routes, refactoring page structure, or discussing file structure conventions.
// Standardize DataConnect route/page layout, logic/JSX separation, tests, and README expectations. Use when organizing pages/routes, refactoring page structure, or discussing file structure conventions.
Debug and repair code using minimal, reviewable patches instead of full-file rewrites. Use this whenever the user is fixing a bug, iterating on failing tests, asks for a surgical code change, wants a minimal diff, or is in a tight debug loop where output size and token cost matter. Prefer this even if the user does not explicitly say "patch."
Build or use a tight automated test-fix loop that repairs one failing test at a time with minimal patches and narrow context. Use whenever the user wants a repair harness, constrained bug-fixing loop, failing-test repair workflow, or a prompt that turns the model into a surgical fix engine instead of a general coding assistant.
Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with a page open in Chrome)
Reduce cognitive load when implementing or refactoring code for readability.
Audit and refactor React UI components to match DataConnect UI implementation rules (Text component, tokens, Tailwind, naming) and Vercel React/composition guidance. Use when the user asks for a UI audit, React audit, composition review, or to fix UI implementation issues in components.
Pragmatic React/Vitest testing workflow for DataConnect. Use when writing or updating React/UI code, deciding what tests to add, running tests for a change, or before commit.
| name | ui-page-structure |
| description | Standardize DataConnect route/page layout, logic/JSX separation, tests, and README expectations. Use when organizing pages/routes, refactoring page structure, or discussing file structure conventions. |
Keep route-level code predictable: entry files, page-only components (and hooks), tests, and helpers live together. Enforce logic/JSX separation, require tests, and document with a README when the structure settles. Shared UI stays in src/components.
src/pages/<route>/index.tsx exports the page component.src/pages/<route>.tsx when the page is small and has no page-local components/hooks/tests/types/utils; once any co-located file is needed, move to src/pages/<route>/.src/pages/<route>/components/* (hooks live with related components; no standalone hooks/ dir).types.ts, utils.ts, etc.).index.tsx has more than one useEffect or includes direct IPC/file-system/network orchestration, extract a single page-local orchestration hook before adding more behavior.src/components (cross-page only).ui-page-readme (can be after-the-fact).vercel-composition-patterns and vercel-react-best-practices when shaping component APIs and hook usage.src/pages/settings/
index.tsx
README.md
types.ts
utils.ts
components/
settings-account.tsx
settings-apps.tsx
settings-storage.tsx
settings-about.tsx
index.test.tsx
src/pages/runs/
index.tsx
README.md
components/
run-item.tsx
use-run-item.ts
utils.ts
index.test.tsx
use-*.ts, *logic.ts, *utils.ts) should not contain JSX or create ReactNodes.src/pages/<route>/).components/<component>/ when a component grows).index.test.tsx covering critical wiring and one or two key UI states.react-testing for test scope, commands, and reporting.@/ path alias over long relative imports.