frontend-portal
React/TanStack Start frontend portal routes, API hooks, runtime configuration, and UI workflows for Open Wearables.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- frontend-portal
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- React/TanStack Start frontend portal routes, API hooks, runtime configuration, and UI workflows for Open Wearables.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-hooks-and-state.md12.3 KB
- 参考文档references/routes-and-components.md11.2 KB
- 参考文档references/troubleshooting.md11.6 KB
- 参考文档references/workflows.md9.9 KB
- 脚本scripts/check_frontend_metadata.py15.6 KB
03 SKILL.md 正文
Frontend Portal
Use this sub-skill for Open Wearables frontend work in the React/TanStack Start portal: routes, protected pages, auth/session behavior, dashboard/users/detail screens, device pairing, provider coverage, sync monitoring, outgoing webhooks, settings tabs, API hooks/services/query keys, runtime API URL configuration, styling/components, and frontend test/lint/build workflows.
Route the task
- For page routing, layout, auth guards, sidebar navigation, settings tabs, user detail panels, coverage matrix, pairing flows, syncs, webhooks, and reusable UI components, read routes-and-components.md.
- For service modules,
apiClient,API_ENDPOINTS, runtimeVITE_API_URLresolution, TanStack Query hooks, query-key invalidation, uploads, OAuth connection helpers, and SSE state, read api-hooks-and-state.md. - For local development commands, Node/pnpm requirements, environment variables, UI change checklists, and frontend verification commands, read workflows.md.
- For symptoms and fixes around auth redirects, stale queries, runtime API URL drift, SSR hydration, provider icons, webhook enablement, sync streams, Tailwind v4, pnpm/Corepack, lint, and build failures, read troubleshooting.md.
- Before or after frontend edits, run the safe metadata/source checker when a checkout is available:
python skills/disco/open-wearables/sub-skills/frontend-portal/scripts/check_frontend_metadata.py --repo-root .. The script only reads package metadata and source text; it does not install packages, call the network, or write application files.
Boundaries
This sub-skill owns the portal-facing frontend contract. Route backend API implementation, database models, migrations, auth/token semantics, outgoing webhook delivery internals, and endpoint docs navigation to backend-core. Route provider OAuth strategy internals, coverage declarations, provider factory changes, import normalization, and provider webhook parsing to provider-integrations. Route MCP assistant tools and API-client behavior to mcp-server.
When a UI task spans boundaries, keep the frontend changes here but hand off server-side endpoint shape, permissions, provider capability truth, and docs/API-reference changes to the owning backend sub-skill.
Non-negotiable frontend rules
- Use TanStack Router file routes and centralized route constants from
ROUTES/DEFAULT_REDIRECTS; do not add ad hoc path strings for new navigation. - Use the shared API layer:
API_ENDPOINTS, service modules underlib/api/services,apiClient, and TanStack Query hooks underhooks/api. - Do not read
import.meta.env.VITE_API_URLdirectly in application code. UseAPI_CONFIG.baseUrl, which is resolved byresolveApiUrl()and the runtime config script. - Use the query-key factory in
queryKeysfor all server state and invalidate or update the exact affected keys after mutations. - Preserve SSR-safe auth guards: browser-only session checks must handle
typeof window === 'undefined'. - Keep Tailwind CSS v4 CSS-first: design tokens live in
styles.css; do not reintroduce a JavaScript Tailwind config. - Prefer existing shadcn/ui primitives, common components, feature components,
sonnertoasts, and React Hook Form + Zod validation before adding one-off patterns.
Fast start for future agents
- Classify the request as a route/component task, an API hook/state task, a workflow/tooling task, or a troubleshooting task.
- Read the linked reference closest to that task; avoid reopening source files unless you are refreshing this generated skill or verifying drift.
- For new UI backed by an endpoint, define the endpoint constant, service method, query key, hook, route/component usage, and mutation invalidation together.
- For user-facing navigation, update
ROUTES, the TanStack route file, and sidebar/settings tab wiring consistently. - Verify with the safe metadata checker, then run
pnpm run test,pnpm run lint,pnpm run format:check, andpnpm run buildwhen dependencies are available and the task warrants it.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).