mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
1.4 KiB
1.4 KiB
Frontend Workflow
- Refer to the
./docs/test.mdand./docs/lint.mdfor detailed frontend workflow instructions.
Overlay Components (Mandatory)
../packages/dify-ui/README.mdis the permanent contract for overlay primitives, portals, rootisolation: isolate, and thez-1002/z-1003layering../docs/overlay-migration.mdis the source of truth for the ongoing migration (deprecated import paths and coexistence rules).- In new or modified code, use only overlay primitives from
@langgenius/dify-ui/*. - Do not introduce deprecated overlay imports from
@/app/components/base/*; when touching legacy callers, prefer migrating them.
Query & Mutation (Mandatory)
frontend-query-mutationis the source of truth for Dify frontend contracts, query and mutation call-site patterns, conditional queries, invalidation, and mutation error handling.
Design Token Mapping
- When translating Figma designs to code, read
../packages/dify-ui/AGENTS.mdfor the Figma--radius/*token to Tailwindrounded-*class mapping. The two scales are offset by one step.
Automated Test Generation
- Use
./docs/test.mdas the canonical instruction set for generating frontend automated tests. - When proposing or saving tests, re-read that document and follow every requirement.
- All frontend tests MUST also comply with the
frontend-testingskill. Treat the skill as a mandatory constraint, not optional guidance.