fix(frontend): show empty state placeholders for quality rules and learnings in view mode

- Modify conditional rendering logic to always display section headers in view mode
- Add empty state placeholders when quality_rules/learnings arrays are empty
- Add localization keys for empty state messages in English and Chinese
- Improves UX by making these features visible even when no entries exist

Related files:
- ccw/frontend/src/pages/ProjectOverviewPage.tsx
- ccw/frontend/src/locales/en/project-overview.json
- ccw/frontend/src/locales/zh/project-overview.json
This commit is contained in:
catlog22
2026-02-01 23:11:46 +08:00
parent 76967a7350
commit b76424feef
3 changed files with 575 additions and 128 deletions

View File

@@ -45,7 +45,54 @@
"constraints": "Constraints",
"qualityRules": "Quality Rules",
"learnings": "Session Learnings",
"scope": "Scope"
"scope": "Scope",
"noQualityRules": "No quality rules defined yet. Switch to edit mode to add rules.",
"noLearnings": "No learning summaries yet. Switch to edit mode to add learnings.",
"edit": "Edit",
"save": "Save",
"cancel": "Cancel",
"saving": "Saving...",
"saveSuccess": "Guidelines saved successfully",
"saveError": "Failed to save guidelines",
"conventionCategories": {
"codingStyle": "Coding Style",
"namingPatterns": "Naming Patterns",
"fileStructure": "File Structure",
"documentation": "Documentation"
},
"constraintCategories": {
"architecture": "Architecture",
"techStack": "Tech Stack",
"performance": "Performance",
"security": "Security"
},
"qualityRuleFields": {
"rule": "Rule",
"scope": "Scope",
"enforcedBy": "Enforced By",
"addRule": "Add Quality Rule",
"removeRule": "Remove"
},
"learningFields": {
"insight": "Insight",
"category": "Category",
"sessionId": "Session ID",
"context": "Context",
"date": "Date",
"addLearning": "Add Learning",
"removeLearning": "Remove"
},
"placeholders": {
"addItem": "Press Enter to add item",
"rule": "Enter quality rule",
"scope": "Enter scope",
"enforcedBy": "Enter enforcement method",
"insight": "Enter insight",
"category": "Enter category",
"sessionId": "Enter session ID",
"context": "Enter context",
"selectDate": "Select date"
}
},
"stats": {
"title": "Statistics",