بنقرة واحدة
frontend-worker
Builds and migrates React dashboard pages with Vite, Tailwind, shadcn/ui, and Zustand
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Builds and migrates React dashboard pages with Vite, Tailwind, shadcn/ui, and Zustand
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | frontend-worker |
| description | Builds and migrates React dashboard pages with Vite, Tailwind, shadcn/ui, and Zustand |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features involving:
Read the feature description, preconditions, expectedBehavior, and verificationSteps carefully. Read mission.md and .factory/library/ for architectural context.
For migration features: Read the original vanilla JS page file in internal/channels/dashboard/ui/src/pages/ to understand every interaction, API call, data flow, and edge case. The React version must be feature-complete — every button, form, toggle, data display, real-time behavior, and keyboard shortcut must be preserved.
For new features: Read the API endpoints the page will consume (check internal/channels/dashboard/handler.go or the backend feature that created them).
Before writing any component code:
internal/channels/dashboard/ui/tests/e2e/qa_scripts.spec.js) to mock backend responsescd internal/channels/dashboard/ui && npx playwright test tests/e2e/<file>.spec.jsIf the feature is resumed with pre-implemented staged UI changes from a prior interrupted run, treat strict red-phase ordering as best-effort: add/adjust regression coverage first where feasible, then run focused validators and explicitly note the ordering deviation in handoff.
Build the feature following these conventions:
Project structure:
internal/channels/dashboard/ui/
├── src/
│ ├── components/ # Shared components (Layout, DataTable, etc.)
│ ├── pages/ # Page components (one per route)
│ ├── stores/ # Zustand stores
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities (API client, helpers)
│ └── App.tsx # Router and top-level layout
├── index.html
├── vite.config.ts
├── tailwind.config.js
├── tsconfig.json
└── package.json
Conventions:
src/lib/api.tsuseSWR or useEffect + Zustand for data fetching patternsFor migrations: Match EVERY interaction from the original vanilla JS. Check the interaction catalog in .factory/library/dashboard-interactions.md if available. Missing interactions = incomplete migration.
cd internal/channels/dashboard/ui && npx tsc --noEmitcd internal/channels/dashboard/ui && npx vite buildgo build -o ./bin/openclawssy ./cmd/openclawssy from repo rootcd internal/channels/dashboard/ui && npx playwright test tests/e2e/<file>.spec.jscd internal/channels/dashboard/ui && npx playwright test
For each key interaction in the feature:
cd internal/channels/dashboard/ui && npx vite --port 5175interactiveChecks entryIf mission guidance explicitly allows non-interactive/manual-skip validation for the current feature, perform equivalent evidence-backed checks (targeted automated flow + logs/screenshots/network artifacts) and document the substitution in interactiveChecks.
go vet ./... if you touched Go files{
"salientSummary": "Migrated the Secrets page to React with shadcn/ui components. Created SecretsPage.tsx with key list (search, copy, delete), write-only secret form, and naming conventions panel. Added Playwright tests covering CRUD operations and form validation. All 6 e2e tests pass; verified manually that key filter, copy-to-clipboard, and delete confirmation work correctly.",
"whatWasImplemented": "SecretsPage.tsx component with SecretKeyList, AddSecretForm, and NamingConventions sub-components. Zustand secretsStore for state management. 6 Playwright e2e tests in secrets.spec.ts. API client methods for GET/POST/DELETE /api/admin/secrets.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cd internal/channels/dashboard/ui && npx tsc --noEmit", "exitCode": 0, "observation": "No type errors" },
{ "command": "cd internal/channels/dashboard/ui && npx vite build", "exitCode": 0, "observation": "Build succeeded, 142KB gzipped" },
{ "command": "cd internal/channels/dashboard/ui && npx playwright test tests/e2e/secrets.spec.ts", "exitCode": 0, "observation": "6 tests passed" },
{ "command": "cd internal/channels/dashboard/ui && npx playwright test", "exitCode": 0, "observation": "All e2e tests pass, no regressions" }
],
"interactiveChecks": [
{ "action": "Opened /dashboard/#/secrets, typed 'DISCORD' in filter", "observed": "Key list filtered to show only DISCORD_BOT_TOKEN" },
{ "action": "Clicked Copy on a key name", "observed": "Clipboard updated, 'Copied' toast appeared" },
{ "action": "Filled add-secret form and clicked Store Secret", "observed": "POST /api/admin/secrets fired, success message shown, key list refreshed" },
{ "action": "Clicked Delete on a key, confirmed dialog", "observed": "DELETE API called, key removed from list" }
]
},
"tests": {
"added": [
{
"file": "internal/channels/dashboard/ui/tests/e2e/secrets.spec.ts",
"cases": [
{ "name": "displays stored secret keys", "verifies": "Key list renders with mocked API data" },
{ "name": "filters keys by search input", "verifies": "Search input filters displayed keys" },
{ "name": "copies key name to clipboard", "verifies": "Copy button puts key name on clipboard" },
{ "name": "stores a new secret", "verifies": "Form submission POSTs to API" },
{ "name": "deletes a secret with confirmation", "verifies": "Delete flow with confirmation dialog" },
{ "name": "shows naming conventions", "verifies": "Conventions panel renders with Use Key buttons" }
]
}
]
},
"discoveredIssues": []
}