feat(web): implement schedule editor in MaintenancePoliciesTab
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 31s
CI / go (push) Successful in 51s
CI / bird2 (push) Successful in 15s
CI / release (push) Successful in 3m48s

Enhanced the MaintenancePoliciesTab by integrating a schedule editor for maintenance policies. Users can now select schedule modes, input custom cron expressions, and dynamically update the schedule preview. This update improves the user interface and experience for managing maintenance schedules.
This commit is contained in:
Denozordec
2026-06-12 18:40:22 +07:00
parent 132559cb8e
commit de64374c91
71 changed files with 15643 additions and 4 deletions
@@ -0,0 +1,205 @@
---
description: Optimized Level 1 workflow for quick bug fixes with token efficiency
globs: "**/level1*/**", "**/quick*/**", "**/bugfix*/**"
alwaysApply: false
---
# OPTIMIZED LEVEL 1 WORKFLOW
> **TL;DR:** This streamlined workflow for Level 1 tasks (quick bug fixes) optimizes for speed and token efficiency while maintaining quality.
## 🔧 LEVEL 1 PROCESS FLOW
```mermaid
graph TD
Start["START LEVEL 1<br>QUICK FIX"] --> Analyze["1️⃣ ANALYZE<br>Understand issue"]
Analyze --> Build["2️⃣ BUILD<br>Fix the issue"]
Build --> Verify["3️⃣ VERIFY<br>Test the fix"]
Verify --> Document["4️⃣ DOCUMENT<br>Record solution"]
style Start fill:#4da6ff,stroke:#0066cc,color:white
style Analyze fill:#ffa64d,stroke:#cc7a30,color:white
style Build fill:#4dbb5f,stroke:#36873f,color:white
style Verify fill:#d94dbb,stroke:#a3378a,color:white
style Document fill:#4dbbbb,stroke:#368787,color:white
```
## 📝 CONSOLIDATED DOCUMENTATION
Level 1 tasks use a single-file approach to minimize context switching:
```markdown
# QUICK FIX: [Issue Name]
## Issue Summary
- Type: [Bug/Hotfix/Quick Enhancement]
- Priority: [Low/Medium/High/Critical]
- Reported by: [Name/System]
- Affected area: [Component/Feature]
## Analysis
- Root cause: [Brief description]
- Affected files: [List of files]
- Impact: [Scope of impact]
## Solution
- Approach: [Brief description]
- Changes made: [List of changes]
- Commands executed: [Key commands]
## Verification
- Testing: [How the fix was tested]
- Results: [Test results]
- Additional checks: [Any other verification]
## Status
- [x] Fix implemented
- [x] Tests passed
- [x] Documentation updated
```
## 🔄 MEMORY BANK UPDATE
Level 1 tasks use a simplified Memory Bank update with minimal overhead:
```markdown
## tasks.md Update (Level 1)
### Task: [Task Name]
- Status: Complete
- Implementation: [One-line summary]
- Link to fix: [File/line reference]
```
## ⚡ TOKEN-OPTIMIZED TEMPLATE
For maximum efficiency, Level 1 tasks can use this ultra-compact template:
```markdown
## 🔧 FIX: [Issue]
📌 Problem: [Brief description]
🔍 Cause: [Root cause]
🛠️ Solution: [Implemented fix]
✅ Tested: [Verification method]
```
## 🔄 AUTO-DOCUMENTATION HELPERS
Use these helpers to automatically generate documentation:
```javascript
function generateLevel1Documentation(issue, rootCause, solution, verification) {
return `## 🔧 FIX: ${issue}
📌 Problem: ${issue}
🔍 Cause: ${rootCause}
🛠️ Solution: ${solution}
✅ Tested: ${verification}`;
}
```
## 📊 QUICK TEMPLATES FOR COMMON ISSUES
### Performance Fix
```markdown
## 🔧 FIX: Performance issue in [component]
📌 Problem: Slow response times in [component]
🔍 Cause: Inefficient query/algorithm
🛠️ Solution: Optimized [specific optimization]
✅ Tested: Response time improved from [X]ms to [Y]ms
```
### Bug Fix
```markdown
## 🔧 FIX: Bug in [component]
📌 Problem: [Specific behavior] not working correctly
🔍 Cause: [Root cause analysis]
🛠️ Solution: Fixed by [implementation details]
✅ Tested: Verified with [test approach]
```
### Quick Enhancement
```markdown
## 🔧 ENHANCEMENT: [Feature]
📌 Request: Add [specific capability]
🛠️ Implementation: Added by [implementation details]
✅ Tested: Verified with [test approach]
```
## ✅ STREAMLINED VERIFICATION
Level 1 tasks use a minimal verification process:
```markdown
VERIFICATION:
[x] Fix implemented and tested
[x] No regressions introduced
[x] Documentation updated
```
## 🚀 CONSOLIDATED MEMORY BANK UPDATE
Optimize Memory Bank updates for Level 1 tasks by using a single operation:
```javascript
// Pseudocode for optimized Level 1 Memory Bank update
function updateLevel1MemoryBank(taskInfo) {
// Read current tasks.md
const tasksContent = readFile("tasks.md");
// Create minimal update
const updateBlock = `
### Task: ${taskInfo.name}
- Status: Complete
- Implementation: ${taskInfo.solution}
- Link to fix: ${taskInfo.fileReference}
`;
// Add update to tasks.md
const updatedContent = appendToSection(tasksContent, "Completed Tasks", updateBlock);
// Write in single operation
writeFile("tasks.md", updatedContent);
return "Memory Bank updated";
}
```
## 🔄 OPTIMIZED LEVEL 1 WORKFLOW EXAMPLE
```markdown
## 🔧 FIX: Login button not working on mobile devices
📌 Problem:
Users unable to log in on mobile devices, button appears but doesn't trigger authentication
🔍 Cause:
Event listener using desktop-specific event (mousedown instead of handling touch events)
🛠️ Solution:
Updated event handling to use event delegation and support both mouse and touch events:
```js
// Before:
loginButton.addEventListener('mousedown', handleLogin);
// After:
loginButton.addEventListener('mousedown', handleLogin);
loginButton.addEventListener('touchstart', handleLogin);
```
✅ Tested:
- Verified on iOS Safari and Android Chrome
- Login now works on all tested mobile devices
- No regression on desktop browsers
```
## ⚡ TOKEN EFFICIENCY BENEFITS
This optimized Level 1 workflow provides:
1. Reduced documentation overhead (70% reduction)
2. Consolidated Memory Bank updates (single operation vs. multiple)
3. Focused verification process (essential checks only)
4. Template-based approach for common scenarios
5. Streamlined workflow with fewer steps
The updated approach maintains all critical information while significantly reducing token usage.
@@ -0,0 +1,225 @@
---
description: Quick documentation approach for Level 1 Quick Bug Fix tasks
globs: "**/level1/**", "**/documentation/**"
alwaysApply: false
---
# QUICK DOCUMENTATION FOR LEVEL 1 TASKS
> **TL;DR:** This document outlines a quick documentation approach for Level 1 (Quick Bug Fix) tasks, ensuring that essential information is captured with minimal overhead.
## 🔍 QUICK DOCUMENTATION OVERVIEW
```mermaid
graph TD
FixComplete["Bug Fix<br>Complete"] --> Document["Document<br>Solution"]
Document --> UpdateTasks["Update<br>tasks.md"]
UpdateTasks --> MinimalUpdates["Make Minimal<br>Memory Bank Updates"]
MinimalUpdates --> CrossReference["Create Simple<br>Cross-References"]
CrossReference --> Complete["Documentation<br>Complete"]
```
Level 1 tasks require efficient documentation that captures essential information without unnecessary detail. This approach ensures that critical knowledge is preserved while maintaining speed and efficiency.
## 📋 DOCUMENTATION PRINCIPLES
1. **Conciseness**: Keep documentation brief but complete
2. **Focus**: Document only what's necessary to understand the fix
3. **Context**: Provide sufficient context to understand the issue
4. **Solution**: Clearly describe what was changed and why
5. **Findability**: Ensure the fix can be easily found later
## 📋 QUICK FIX DOCUMENTATION TEMPLATE
```markdown
# Quick Fix: [Issue Title]
## Issue
[Brief description of the problem - 1-2 sentences]
## Root Cause
[Concise description of what caused the issue - 1-2 sentences]
## Solution
[Brief description of the fix implemented - 2-3 sentences]
## Files Changed
- [File path 1]
- [File path 2]
## Verification
[How the fix was tested/verified - 1-2 sentences]
## Notes
[Any additional information that might be helpful - optional]
```
## 📋 TASKS.MD UPDATES
For Level 1 tasks, update tasks.md with this format:
```markdown
## Completed Bug Fixes
- [X] [Level 1] Fixed: [Issue title] (Completed: YYYY-MM-DD)
- Issue: [One-line description]
- Root Cause: [One-line description]
- Solution: [One-line description]
- Files: [File paths]
```
For in-progress tasks:
```markdown
## Bug Fixes in Progress
- [ ] [Level 1] Fix: [Issue title] (Est: XX mins)
- Issue: [One-line description]
- Location: [Component/file]
```
## 📋 MEMORY BANK UPDATES
For Level 1 tasks, make these minimal Memory Bank updates:
1. **tasks.md**:
- Update with fix details as shown above
- Mark task as complete
2. **activeContext.md** (only if relevant):
```markdown
## Recent Fixes
- [YYYY-MM-DD] Fixed [issue] in [component/file]. [One-line description of fix]
```
3. **progress.md** (only if significant):
```markdown
## Bug Fixes
- [YYYY-MM-DD] Fixed [issue] in [component/file].
```
Other Memory Bank files typically do not need updates for Level 1 tasks unless the fix reveals important system information.
## 📋 COMMON BUG CATEGORIES
Categorize bugs to improve documentation consistency:
1. **Logic Error**:
- Example: "Fixed incorrect conditional logic in user validation"
2. **UI/Display Issue**:
- Example: "Fixed misaligned button in mobile view"
3. **Performance Issue**:
- Example: "Fixed slow loading of user profile data"
4. **Data Handling Error**:
- Example: "Fixed incorrect parsing of date format"
5. **Configuration Issue**:
- Example: "Fixed incorrect environment variable setting"
## 📋 QUICK DOCUMENTATION PROCESS
Follow these steps for efficient documentation:
1. **Immediately After Fix**:
- Document while the fix is fresh in your mind
- Focus on what, why, and how
- Be specific about changes made
2. **Update Task Tracking**:
- Update tasks.md with fix details
- Use consistent format for easy reference
3. **Minimal Cross-References**:
- Create only essential cross-references
- Ensure fix can be found in the future
4. **Check Completeness**:
- Verify all essential information is captured
- Ensure another developer could understand the fix
## 📋 EXAMPLES: GOOD VS. INSUFFICIENT DOCUMENTATION
### ❌ Insufficient Documentation
```markdown
Fixed the login bug.
```
### ✅ Good Documentation
```markdown
# Quick Fix: User Login Failure with Special Characters
## Issue
Users with special characters in email addresses (e.g., +, %) couldn't log in.
## Root Cause
The email validation regex was incorrectly escaping special characters.
## Solution
Updated the email validation regex in AuthValidator.js to properly handle special characters according to RFC 5322.
## Files Changed
- src/utils/AuthValidator.js
## Verification
Tested login with various special characters in email addresses ([email protected], user%[email protected]).
```
## 📋 DOCUMENTATION VERIFICATION CHECKLIST
```
✓ DOCUMENTATION VERIFICATION
- Issue clearly described? [YES/NO]
- Root cause identified? [YES/NO]
- Solution explained? [YES/NO]
- Files changed listed? [YES/NO]
- Verification method described? [YES/NO]
- tasks.md updated? [YES/NO]
- Memory Bank minimally updated? [YES/NO]
→ If all YES: Documentation complete
→ If any NO: Complete missing information
```
## 📋 MINIMAL MODE DOCUMENTATION
For minimal mode, use this ultra-compact format:
```
✓ FIX: [Issue title]
✓ CAUSE: [One-line root cause]
✓ SOLUTION: [One-line fix description]
✓ FILES: [File paths]
✓ VERIFIED: [How verified]
```
## 🔄 DOCUMENTATION INTEGRATION
Quick documentation integrates with other systems:
```mermaid
graph TD
QuickDoc["Quick Fix<br>Documentation"] --> TasksMD["tasks.md<br>Update"]
QuickDoc --> FixDetails["Fix Details<br>Documentation"]
TasksMD --> Tracking["Task<br>Tracking"]
FixDetails --> Knowledge["Knowledge<br>Preservation"]
Tracking & Knowledge --> Future["Future<br>Reference"]
```
## 🚨 DOCUMENTATION EFFICIENCY PRINCIPLE
Remember:
```
┌─────────────────────────────────────────────────────┐
│ Document ONLY what's needed to understand the fix. │
│ Focus on ESSENTIAL information that would help │
│ someone who encounters the same issue in the future.│
└─────────────────────────────────────────────────────┘
```
This ensures that Level 1 tasks are documented efficiently without unnecessary overhead while preserving critical knowledge.
@@ -0,0 +1,190 @@
---
description: Streamlined workflow for Level 1 Quick Bug Fix tasks
globs: "**/level1/**", "**/workflow/**"
alwaysApply: false
---
# STREAMLINED WORKFLOW FOR LEVEL 1 TASKS
> **TL;DR:** This document outlines a streamlined workflow for Level 1 (Quick Bug Fix) tasks, focusing on efficient problem resolution with minimal overhead while maintaining adequate documentation.
## 🔍 LEVEL 1 WORKFLOW OVERVIEW
```mermaid
graph LR
Init["1. INITIALIZATION"] --> Impl["2. IMPLEMENTATION"]
Impl --> Doc["3. DOCUMENTATION"]
%% Document connections for each phase
Init -.-> InitDocs["Quick setup<br>Issue understanding"]
Impl -.-> ImplDocs["Focused fix<br>Verify resolution"]
Doc -.-> DocDocs["Document solution<br>Update tracking"]
```
## 📋 WORKFLOW PHASES
### Phase 1: INITIALIZATION
```mermaid
graph TD
Start["Start Level 1 Task"] --> Identify["Identify<br>Issue"]
Identify --> Understand["Understand<br>Problem"]
Understand --> Setup["Quick<br>Environment Setup"]
Setup --> TaskEntry["Create Quick<br>Task Entry"]
TaskEntry --> InitComplete["Initialization<br>Complete"]
```
**Steps:**
1. Identify the specific issue to fix
2. Understand the problem and its impact
3. Set up environment for quick fix
4. Create minimal task entry in tasks.md
**Milestone Checkpoint:**
```
✓ INITIALIZATION CHECKPOINT
- Issue clearly identified? [YES/NO]
- Problem understood? [YES/NO]
- Environment set up? [YES/NO]
- Task entry created? [YES/NO]
→ If all YES: Proceed to Implementation
→ If any NO: Complete initialization steps
```
### Phase 2: IMPLEMENTATION
```mermaid
graph TD
Start["Begin<br>Implementation"] --> Locate["Locate<br>Issue Source"]
Locate --> Develop["Develop<br>Fix"]
Develop --> Test["Test<br>Solution"]
Test --> Verify["Verify<br>Resolution"]
Verify --> ImplComplete["Implementation<br>Complete"]
```
**Steps:**
1. Locate the source of the issue
2. Develop a targeted fix
3. Test the solution thoroughly
4. Verify that the issue is resolved
**Milestone Checkpoint:**
```
✓ IMPLEMENTATION CHECKPOINT
- Issue source located? [YES/NO]
- Fix developed? [YES/NO]
- Solution tested? [YES/NO]
- Resolution verified? [YES/NO]
→ If all YES: Proceed to Documentation
→ If any NO: Complete implementation steps
```
### Phase 3: DOCUMENTATION
```mermaid
graph TD
Start["Begin<br>Documentation"] --> Update["Update<br>tasks.md"]
Update --> Solution["Document<br>Solution"]
Solution --> References["Create Minimal<br>Cross-References"]
References --> NotifyStakeholders["Notify<br>Stakeholders"]
NotifyStakeholders --> DocComplete["Documentation<br>Complete"]
```
**Steps:**
1. Update tasks.md with fix details
2. Document the solution concisely
3. Create minimal cross-references
4. Notify stakeholders as needed
**Milestone Checkpoint:**
```
✓ DOCUMENTATION CHECKPOINT
- tasks.md updated? [YES/NO]
- Solution documented? [YES/NO]
- Cross-references created? [YES/NO]
- Stakeholders notified? [YES/NO]
→ If all YES: Task Complete
→ If any NO: Complete documentation steps
```
## 📋 TASK STRUCTURE IN TASKS.MD
For Level 1 tasks, use this minimal structure:
```markdown
## Bug Fixes in Progress
- [ ] [Level 1] Fix: [Bug description] (Est: XX mins)
## Completed Bug Fixes
- [X] [Level 1] Fixed: [Bug description] (Completed: YYYY-MM-DD)
- Issue: [Brief issue description]
- Solution: [Brief solution description]
- Files changed: [File paths]
```
## 📋 MEMORY BANK UPDATES
For Level 1 tasks, make minimal Memory Bank updates:
1. **tasks.md**: Update with fix details
2. **activeContext.md**: Brief mention of fix if relevant
3. **progress.md**: Add to list of completed fixes
## 📋 WORKFLOW VERIFICATION CHECKLIST
```
✓ FINAL WORKFLOW VERIFICATION
- Issue identified and understood? [YES/NO]
- Fix implemented and verified? [YES/NO]
- tasks.md updated? [YES/NO]
- Solution documented? [YES/NO]
- Memory Bank minimally updated? [YES/NO]
→ If all YES: Level 1 Task Successfully Completed
→ If any NO: Address outstanding items
```
## 📋 TASK ESCALATION
If during the Level 1 process you discover the task is more complex:
```
⚠️ TASK ESCALATION NEEDED
Current Level: Level 1
Recommended Level: Level [2/3/4]
Reason: [Brief explanation]
Would you like me to escalate this task to Level [2/3/4]?
```
Escalation indicators:
1. Fix requires changes to multiple components
2. Solution requires design decisions
3. Testing reveals broader issues
4. Fix impacts core functionality
## 🔄 INTEGRATION WITH MEMORY BANK
```mermaid
graph TD
Workflow["Level 1<br>Workflow"] --> TM["Update<br>tasks.md"]
Workflow --> AC["Minimal Update<br>activeContext.md"]
Workflow --> PM["Brief Update<br>progress.md"]
TM & AC & PM --> MB["Memory Bank<br>Integration"]
MB --> NextTask["Transition to<br>Next Task"]
```
## 🚨 EFFICIENCY PRINCIPLE
Remember:
```
┌─────────────────────────────────────────────────────┐
│ Level 1 workflow prioritizes SPEED and EFFICIENCY. │
│ Minimize process overhead while ensuring adequate │
│ documentation of the solution. │
└─────────────────────────────────────────────────────┘
```