feat: 添加视觉设计语言系统并重构认证页面UI
- 新增 visual_design_language.md 设计规范文档 - 新增 auth 设计 tokens (authBackground, authCard, authInput, feedback 系列等) - 重构登录/注册/验证码/重置密码页面为新设计系统 - 新增 AuthHeroHeader, AuthSurfaceCard, AuthSection, AuthField, PasswordField 组件 - 重构 AppBanner 和 Toast 支持多类型配置 (info/success/warning/error) - 后端 AgentScope: 重整 schemas/prompts/tools 作用域, 新增协议文档 - 更新 AGENTS.md 集成视觉设计语言约束
This commit is contained in:
+40
-7
@@ -6,6 +6,7 @@ This document defines **hard constraints** for Flutter mobile development. Treat
|
||||
|
||||
- This file applies to all changes under `apps/**`.
|
||||
- It extends root routing rules in `AGENTS.md` and workspace global runtime rules.
|
||||
- It also incorporates the visual design language from `apps/rules/visual_design_language.md` as a binding constraint.
|
||||
- If rules conflict, apply the stricter requirement.
|
||||
- Keep Flutter-specific constraints in this file; avoid duplicating them in root `AGENTS.md`.
|
||||
|
||||
@@ -15,15 +16,17 @@ This document defines **hard constraints** for Flutter mobile development. Treat
|
||||
- Colors: `AppColors.*`
|
||||
- Spacing: `AppSpacing.*`
|
||||
- Radius: `AppRadius.*`
|
||||
- **MUST NOT** hardcode any visual values, including (but not limited to): colors, font sizes, spacing, padding/margins, widths/heights, radii, shadows, opacity, or “magic numbers”.
|
||||
- Examples that are **NOT allowed**: `Color(0xFF...)`, `SizedBox(height: 12)`, `EdgeInsets.all(16)`, `Radius.circular(8)`.
|
||||
- **MUST NOT** hardcode any visual values.
|
||||
- Design tokens are the single source of truth for all visual values. Any missing visual semantics should be added to tokens, not approximated locally.
|
||||
- This ensures consistency with the visual design language defined in `apps/rules/visual_design_language.md`.
|
||||
|
||||
## 2) Component Reuse (MUST)
|
||||
## 2) Component Architecture (MUST)
|
||||
|
||||
- **MUST** prefer existing components and established page patterns over creating new UI components.
|
||||
- **MUST** use:
|
||||
- Buttons: `AppButton` from `apps/lib/shared/widgets/app_button.dart`
|
||||
- **MUST NOT** introduce parallel UI systems (custom buttons, custom loading systems, custom input wrappers) unless explicitly required and approved.
|
||||
- **SHOULD** extract repeated UI patterns into reusable components.
|
||||
- **SHOULD** prefer existing shared components before creating new ones.
|
||||
- **SHOULD** place reusable components in `apps/lib/shared/widgets/` following existing naming conventions.
|
||||
- **MUST NOT** introduce parallel UI systems (e.g., custom button styles, custom loading indicators) that duplicate existing shared components.
|
||||
- When creating new UI components, ensure they follow the design tokens and visual design language.
|
||||
|
||||
## 3) Layout Mapping & Alignment (MUST)
|
||||
|
||||
@@ -73,3 +76,33 @@ Agent chat functionality **MUST** follow the AG-UI protocol. **Use the `ag-ui` s
|
||||
- **MUST NOT** return non-streaming responses for agent chat.
|
||||
- **MUST NOT** omit required lifecycle events.
|
||||
- **MUST NOT** use non-AG-UI event formats (except where the spec explicitly allows).
|
||||
|
||||
## 8) Visual Design Language (MUST)
|
||||
|
||||
All UI/UX work **MUST** follow the visual design language defined in `apps/rules/visual_design_language.md`.
|
||||
|
||||
- **MUST** ensure screens feel like a premium personal assistant product, not a wireframe, admin console, or document page.
|
||||
- **MUST** apply the surface-based design system (background, primary, secondary, interactive surfaces).
|
||||
- **MUST** follow the motion and interaction feel guidelines (soft, responsive, premium).
|
||||
- **MUST** achieve visual hierarchy through spacing, surface grouping, radius, depth, density, contrast, scale, and motion—not color alone.
|
||||
- **MUST** follow the screen-level decision rules:
|
||||
1. What is the primary focus?
|
||||
2. What is the surface hierarchy?
|
||||
3. What needs strongest emphasis?
|
||||
4. What should be grouped?
|
||||
5. What should be lightweight/secondary?
|
||||
6. Where should motion reinforce understanding?
|
||||
7. How can the result feel more like a premium assistant app and less like a document page?
|
||||
- **MUST NOT** create UIs that match the anti-patterns listed in the visual design language document:
|
||||
- plain document page, white slab with blue buttons, spreadsheet-like admin panel
|
||||
- low-fidelity wireframe, default Flutter demo app, generic template marketplace screen
|
||||
- full-screen flat white blocks, arbitrary shadow usage, inconsistent card treatments
|
||||
- raw container stacking without surface semantics
|
||||
|
||||
Before finalizing any UI, mentally verify:
|
||||
- Does this feel like a product, not a page?
|
||||
- Is there clear hierarchy?
|
||||
- Do surfaces feel intentional?
|
||||
- Does the screen feel calm and premium?
|
||||
- Is the assistant identity visually present?
|
||||
- Would this look plausible in a polished shipping app?
|
||||
|
||||
Reference in New Issue
Block a user