Finalize assistant and dashboard health updates
This commit is contained in:
@@ -2,35 +2,33 @@
|
||||
|
||||
> High-level module structure for AI Context. Generated automatically.
|
||||
|
||||
**Generated:** 2026-03-10T20:52:01.801581
|
||||
**Generated:** 2026-03-14T09:20:50.362415
|
||||
|
||||
## Summary
|
||||
|
||||
- **Total Modules:** 103
|
||||
- **Total Entities:** 3088
|
||||
- **Total Entities:** 3134
|
||||
|
||||
## Module Hierarchy
|
||||
|
||||
### 📁 `backend/`
|
||||
|
||||
- 🏗️ **Layers:** Unknown, Utility
|
||||
- 📊 **Tiers:** STANDARD: 2, TRIVIAL: 2
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 4
|
||||
- 🏗️ **Layers:** Utility
|
||||
- 📊 **Tiers:** STANDARD: 2
|
||||
- 📄 **Files:** 1
|
||||
- 📦 **Entities:** 2
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
- 📦 **backend.delete_running_tasks** (Module)
|
||||
- Script to delete tasks with RUNNING status from the database...
|
||||
- 📦 **test_auth_debug** (Module) `[TRIVIAL]`
|
||||
- Auto-generated module for backend/test_auth_debug.py
|
||||
|
||||
### 📁 `src/`
|
||||
|
||||
- 🏗️ **Layers:** API, Core, UI (API)
|
||||
- 📊 **Tiers:** CRITICAL: 2, STANDARD: 21, TRIVIAL: 2
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 25
|
||||
- 📊 **Tiers:** CRITICAL: 2, STANDARD: 22, TRIVIAL: 2
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 26
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -42,9 +40,9 @@
|
||||
### 📁 `api/`
|
||||
|
||||
- 🏗️ **Layers:** API
|
||||
- 📊 **Tiers:** CRITICAL: 7
|
||||
- 📄 **Files:** 1
|
||||
- 📦 **Entities:** 7
|
||||
- 📊 **Tiers:** CRITICAL: 7, STANDARD: 1
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 8
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -127,9 +125,9 @@
|
||||
### 📁 `core/`
|
||||
|
||||
- 🏗️ **Layers:** Core, Domain
|
||||
- 📊 **Tiers:** CRITICAL: 52, STANDARD: 102, TRIVIAL: 9
|
||||
- 📄 **Files:** 12
|
||||
- 📦 **Entities:** 163
|
||||
- 📊 **Tiers:** CRITICAL: 55, STANDARD: 103, TRIVIAL: 9
|
||||
- 📄 **Files:** 13
|
||||
- 📦 **Entities:** 167
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -165,14 +163,16 @@
|
||||
### 📁 `__tests__/`
|
||||
|
||||
- 🏗️ **Layers:** Domain
|
||||
- 📊 **Tiers:** STANDARD: 8, TRIVIAL: 6
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 14
|
||||
- 📊 **Tiers:** STANDARD: 11, TRIVIAL: 7
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 18
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
- ℂ **_RecordingNetworkClient** (Class)
|
||||
- Records request payloads and returns scripted responses for ...
|
||||
- 📦 **backend.src.core.__tests__.test_config_manager_compat** (Module)
|
||||
- Verifies ConfigManager compatibility wrappers preserve legac...
|
||||
- 📦 **backend.src.core.__tests__.test_superset_profile_lookup** (Module)
|
||||
- Verifies Superset profile lookup adapter payload normalizati...
|
||||
- 📦 **test_throttled_scheduler** (Module)
|
||||
@@ -181,9 +181,9 @@
|
||||
### 📁 `auth/`
|
||||
|
||||
- 🏗️ **Layers:** Core, Domain
|
||||
- 📊 **Tiers:** CRITICAL: 28
|
||||
- 📄 **Files:** 6
|
||||
- 📦 **Entities:** 28
|
||||
- 📊 **Tiers:** CRITICAL: 29
|
||||
- 📄 **Files:** 7
|
||||
- 📦 **Entities:** 29
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -317,9 +317,9 @@
|
||||
### 📁 `utils/`
|
||||
|
||||
- 🏗️ **Layers:** Core, Domain, Infra
|
||||
- 📊 **Tiers:** CRITICAL: 1, STANDARD: 62, TRIVIAL: 5
|
||||
- 📄 **Files:** 5
|
||||
- 📦 **Entities:** 68
|
||||
- 📊 **Tiers:** CRITICAL: 1, STANDARD: 63, TRIVIAL: 5
|
||||
- 📄 **Files:** 6
|
||||
- 📦 **Entities:** 69
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -355,9 +355,9 @@
|
||||
### 📁 `models/`
|
||||
|
||||
- 🏗️ **Layers:** Domain, Model
|
||||
- 📊 **Tiers:** CRITICAL: 21, STANDARD: 40, TRIVIAL: 29
|
||||
- 📄 **Files:** 13
|
||||
- 📦 **Entities:** 90
|
||||
- 📊 **Tiers:** CRITICAL: 21, STANDARD: 41, TRIVIAL: 29
|
||||
- 📄 **Files:** 14
|
||||
- 📦 **Entities:** 91
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -409,9 +409,9 @@
|
||||
### 📁 `plugins/`
|
||||
|
||||
- 🏗️ **Layers:** App, Plugin, Plugins
|
||||
- 📊 **Tiers:** CRITICAL: 10, STANDARD: 53
|
||||
- 📄 **Files:** 6
|
||||
- 📦 **Entities:** 63
|
||||
- 📊 **Tiers:** CRITICAL: 10, STANDARD: 54
|
||||
- 📄 **Files:** 7
|
||||
- 📦 **Entities:** 64
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -445,9 +445,9 @@
|
||||
### 📁 `git/`
|
||||
|
||||
- 🏗️ **Layers:** Unknown
|
||||
- 📊 **Tiers:** STANDARD: 2, TRIVIAL: 2
|
||||
- 📄 **Files:** 1
|
||||
- 📦 **Entities:** 4
|
||||
- 📊 **Tiers:** STANDARD: 3, TRIVIAL: 2
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 5
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -512,9 +512,9 @@
|
||||
### 📁 `schemas/`
|
||||
|
||||
- 🏗️ **Layers:** API, Domain
|
||||
- 📊 **Tiers:** CRITICAL: 10, STANDARD: 18, TRIVIAL: 3
|
||||
- 📄 **Files:** 4
|
||||
- 📦 **Entities:** 31
|
||||
- 📊 **Tiers:** CRITICAL: 10, STANDARD: 19, TRIVIAL: 3
|
||||
- 📄 **Files:** 5
|
||||
- 📦 **Entities:** 32
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -557,9 +557,9 @@
|
||||
### 📁 `scripts/`
|
||||
|
||||
- 🏗️ **Layers:** Scripts, UI, Unknown
|
||||
- 📊 **Tiers:** CRITICAL: 2, STANDARD: 43, TRIVIAL: 30
|
||||
- 📄 **Files:** 8
|
||||
- 📦 **Entities:** 75
|
||||
- 📊 **Tiers:** CRITICAL: 3, STANDARD: 44, TRIVIAL: 30
|
||||
- 📄 **Files:** 9
|
||||
- 📦 **Entities:** 77
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -592,9 +592,9 @@
|
||||
### 📁 `services/`
|
||||
|
||||
- 🏗️ **Layers:** Core, Domain, Domain/Service, Service
|
||||
- 📊 **Tiers:** CRITICAL: 9, STANDARD: 120, TRIVIAL: 17
|
||||
- 📊 **Tiers:** CRITICAL: 10, STANDARD: 120, TRIVIAL: 17
|
||||
- 📄 **Files:** 10
|
||||
- 📦 **Entities:** 146
|
||||
- 📦 **Entities:** 147
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -630,9 +630,9 @@
|
||||
### 📁 `__tests__/`
|
||||
|
||||
- 🏗️ **Layers:** Domain, Domain Tests, Service, Service Tests, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 36, TRIVIAL: 40
|
||||
- 📊 **Tiers:** STANDARD: 37, TRIVIAL: 40
|
||||
- 📄 **Files:** 7
|
||||
- 📦 **Entities:** 76
|
||||
- 📦 **Entities:** 77
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -664,9 +664,9 @@
|
||||
### 📁 `clean_release/`
|
||||
|
||||
- 🏗️ **Layers:** Application, Domain, Infra
|
||||
- 📊 **Tiers:** CRITICAL: 9, STANDARD: 46, TRIVIAL: 50
|
||||
- 📄 **Files:** 21
|
||||
- 📦 **Entities:** 105
|
||||
- 📊 **Tiers:** CRITICAL: 9, STANDARD: 48, TRIVIAL: 50
|
||||
- 📄 **Files:** 22
|
||||
- 📦 **Entities:** 107
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -681,22 +681,22 @@
|
||||
- Execute clean-release compliance lifecycle over trusted snap...
|
||||
- 📦 **backend.src.services.clean_release.approval_service** (Module) `[CRITICAL]`
|
||||
- Enforce approval/rejection gates over immutable compliance r...
|
||||
- 📦 **backend.src.services.clean_release.artifact_catalog_loader** (Module)
|
||||
- Load bootstrap artifact catalogs for clean release real-mode...
|
||||
- 📦 **backend.src.services.clean_release.audit_service** (Module)
|
||||
- Provide lightweight audit hooks for clean release preparatio...
|
||||
- 📦 **backend.src.services.clean_release.candidate_service** (Module) `[CRITICAL]`
|
||||
- Register release candidates with validated artifacts and adv...
|
||||
- 📦 **backend.src.services.clean_release.compliance_execution_service** (Module) `[CRITICAL]`
|
||||
- Create and execute compliance runs with trusted snapshots, d...
|
||||
- 📦 **backend.src.services.clean_release.compliance_orchestrator** (Module) `[CRITICAL]`
|
||||
- Execute mandatory clean compliance stages and produce final ...
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
- 🔗 DEPENDS_ON -> backend.src.core.config_manager
|
||||
- 🔗 DEPENDS_ON -> backend.src.core.logger
|
||||
- 🔗 DEPENDS_ON -> backend.src.models.clean_release
|
||||
- 🔗 DEPENDS_ON -> backend.src.models.clean_release.CandidateArtifact
|
||||
- 🔗 DEPENDS_ON -> backend.src.models.clean_release.CleanProfilePolicy
|
||||
- 🔗 DEPENDS_ON -> backend.src.models.clean_release.ResourceSourceRegistry
|
||||
|
||||
### 📁 `__tests__/`
|
||||
|
||||
@@ -797,9 +797,9 @@
|
||||
### 📁 `notifications/`
|
||||
|
||||
- 🏗️ **Layers:** Domain, Infra
|
||||
- 📊 **Tiers:** CRITICAL: 2, STANDARD: 5, TRIVIAL: 14
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 21
|
||||
- 📊 **Tiers:** CRITICAL: 2, STANDARD: 6, TRIVIAL: 14
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 22
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -838,9 +838,9 @@
|
||||
### 📁 `reports/`
|
||||
|
||||
- 🏗️ **Layers:** Domain
|
||||
- 📊 **Tiers:** CRITICAL: 5, STANDARD: 15
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 20
|
||||
- 📊 **Tiers:** CRITICAL: 5, STANDARD: 16
|
||||
- 📄 **Files:** 4
|
||||
- 📦 **Entities:** 21
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -880,9 +880,9 @@
|
||||
### 📁 `tests/`
|
||||
|
||||
- 🏗️ **Layers:** Core, Domain (Tests), Logging (Tests), Test, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 87, TRIVIAL: 85
|
||||
- 📊 **Tiers:** STANDARD: 87, TRIVIAL: 91
|
||||
- 📄 **Files:** 10
|
||||
- 📦 **Entities:** 172
|
||||
- 📦 **Entities:** 178
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -942,9 +942,9 @@
|
||||
### 📁 `scripts/`
|
||||
|
||||
- 🏗️ **Layers:** Domain, Scripts
|
||||
- 📊 **Tiers:** STANDARD: 3, TRIVIAL: 17
|
||||
- 📊 **Tiers:** STANDARD: 3, TRIVIAL: 18
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 20
|
||||
- 📦 **Entities:** 21
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -995,9 +995,9 @@
|
||||
### 📁 `components/`
|
||||
|
||||
- 🏗️ **Layers:** Component, Feature, UI, UI -->, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 73, TRIVIAL: 4
|
||||
- 📄 **Files:** 14
|
||||
- 📦 **Entities:** 77
|
||||
- 📊 **Tiers:** STANDARD: 74, TRIVIAL: 13
|
||||
- 📄 **Files:** 15
|
||||
- 📦 **Entities:** 87
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1019,8 +1019,8 @@
|
||||
- Main navigation bar for the application.
|
||||
- 🧩 **PasswordPrompt** (Component)
|
||||
- A modal component to prompt the user for database passwords ...
|
||||
- 🧩 **TaskHistory** (Component)
|
||||
- Displays a list of recent tasks with their status and allows...
|
||||
- 🧩 **StartupEnvironmentWizard** (Component)
|
||||
- Blocking startup wizard for creating the first Superset envi...
|
||||
|
||||
### 📁 `__tests__/`
|
||||
|
||||
@@ -1087,9 +1087,9 @@
|
||||
### 📁 `llm/`
|
||||
|
||||
- 🏗️ **Layers:** UI, Unknown
|
||||
- 📊 **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 11
|
||||
- 📊 **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 12
|
||||
- 📄 **Files:** 3
|
||||
- 📦 **Entities:** 13
|
||||
- 📦 **Entities:** 14
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1114,7 +1114,7 @@
|
||||
**Key Entities:**
|
||||
|
||||
- 📦 **frontend.src.components.llm.__tests__.provider_config_integration** (Module)
|
||||
- Protect edit-button interaction contract in LLM provider set...
|
||||
- Protect edit and delete interaction contracts in LLM provide...
|
||||
|
||||
### 📁 `storage/`
|
||||
|
||||
@@ -1284,9 +1284,9 @@
|
||||
### 📁 `health/`
|
||||
|
||||
- 🏗️ **Layers:** UI/Component, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 2, TRIVIAL: 3
|
||||
- 📊 **Tiers:** STANDARD: 2, TRIVIAL: 6
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 5
|
||||
- 📦 **Entities:** 8
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1300,9 +1300,9 @@
|
||||
### 📁 `layout/`
|
||||
|
||||
- 🏗️ **Layers:** UI, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 11, TRIVIAL: 48
|
||||
- 📊 **Tiers:** STANDARD: 11, TRIVIAL: 50
|
||||
- 📄 **Files:** 5
|
||||
- 📦 **Entities:** 59
|
||||
- 📦 **Entities:** 61
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1621,9 +1621,9 @@
|
||||
### 📁 `dashboards/`
|
||||
|
||||
- 🏗️ **Layers:** UI, Unknown
|
||||
- 📊 **Tiers:** STANDARD: 26, TRIVIAL: 63
|
||||
- 📊 **Tiers:** STANDARD: 26, TRIVIAL: 66
|
||||
- 📄 **Files:** 1
|
||||
- 📦 **Entities:** 89
|
||||
- 📦 **Entities:** 92
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1971,10 +1971,10 @@
|
||||
|
||||
### 📁 `root/`
|
||||
|
||||
- 🏗️ **Layers:** DevOps/Tooling, Unknown
|
||||
- 📊 **Tiers:** CRITICAL: 11, STANDARD: 18, TRIVIAL: 10
|
||||
- 📄 **Files:** 2
|
||||
- 📦 **Entities:** 39
|
||||
- 🏗️ **Layers:** DevOps/Tooling
|
||||
- 📊 **Tiers:** CRITICAL: 11, STANDARD: 18, TRIVIAL: 8
|
||||
- 📄 **Files:** 1
|
||||
- 📦 **Entities:** 37
|
||||
|
||||
**Key Entities:**
|
||||
|
||||
@@ -1988,8 +1988,6 @@
|
||||
- Severity levels for compliance issues.
|
||||
- ℂ **Tier** (Class) `[TRIVIAL]`
|
||||
- Enumeration of semantic tiers defining validation strictness...
|
||||
- 📦 **check_test_data** (Module) `[TRIVIAL]`
|
||||
- Auto-generated module for check_test_data.py
|
||||
- 📦 **generate_semantic_map** (Module)
|
||||
- Scans the codebase to generate a Semantic Map, Module Map, a...
|
||||
|
||||
@@ -2157,6 +2155,7 @@ graph TD
|
||||
clean_release-->|DEPENDS_ON|backend
|
||||
clean_release-->|DEPENDS_ON|backend
|
||||
clean_release-->|DEPENDS_ON|backend
|
||||
clean_release-->|DEPENDS_ON|backend
|
||||
__tests__-->|TESTS|backend
|
||||
__tests__-->|TESTS|backend
|
||||
__tests__-->|TESTS|backend
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
> Compressed view for AI Context. Generated automatically.
|
||||
|
||||
- 📦 **check_test_data** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for check_test_data.py
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **check_file** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **generate_semantic_map** (`Module`)
|
||||
- 📝 Scans the codebase to generate a Semantic Map, Module Map, and Compliance Report based on the System Standard.
|
||||
- 🏗️ Layer: DevOps/Tooling
|
||||
@@ -419,7 +414,7 @@
|
||||
- 🔒 Invariant: Risky operations are executed only through explicit confirm action.
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ⬅️ READS_FROM `assistantChatStore`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ƒ **loadHistory** (`Function`)
|
||||
- 📝 Load current conversation history when panel becomes visible.
|
||||
- ƒ **loadConversations** (`Function`)
|
||||
@@ -470,7 +465,7 @@
|
||||
- 🏗️ Layer: UI/Component
|
||||
- ⬅️ READS_FROM `state`
|
||||
- ⬅️ READS_FROM `derived`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- 🧩 **PolicyForm** (`Component`)
|
||||
- 📝 Form for creating and editing validation policies.
|
||||
- 🏗️ Layer: UI/Component
|
||||
@@ -480,6 +475,12 @@
|
||||
- 📦 **PolicyForm** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/lib/components/health/PolicyForm.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **getSafePolicy** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **getSafeEnvironments** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **buildFormData** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleSubmit** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **toggleDay** (`Function`) `[TRIVIAL]`
|
||||
@@ -488,7 +489,6 @@
|
||||
- 📝 Render one report with explicit textual type label and profile-driven visual variant.
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Unknown task type always uses fallback profile.
|
||||
- ⚡ Events: select
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
@@ -577,10 +577,14 @@
|
||||
- 🔒 Invariant: Always shows active category and item
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ⬅️ READS_FROM `sidebarStore`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
- 📦 **Sidebar** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/lib/components/layout/Sidebar.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **withExpandedCategory** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **toggleExpandedCategory** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleItemClick** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleCategoryToggle** (`Function`) `[TRIVIAL]`
|
||||
@@ -595,10 +599,9 @@
|
||||
- 📝 Unified top navigation bar with Logo, Search, Activity, and User menu
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Always visible on non-login pages
|
||||
- ⚡ Events: activityClick
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ⬅️ READS_FROM `sidebarStore`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- 📦 **TopNavbar** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/lib/components/layout/TopNavbar.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
@@ -655,8 +658,8 @@
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Drawer shows logs for active task or remains closed
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ⬅️ READS_FROM `taskDrawerStore`
|
||||
- ➡️ WRITES_TO `taskDrawerStore`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
- ƒ **disconnectWebSocket** (`Function`)
|
||||
- 📝 Disconnects the active WebSocket connection
|
||||
- ƒ **loadRecentTasks** (`Function`)
|
||||
@@ -956,6 +959,10 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **updateSelectionState** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **replaceSelectedIds** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **clearSelectedIds** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleCheckboxChange** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleSelectAll** (`Function`) `[TRIVIAL]`
|
||||
@@ -1054,6 +1061,8 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **getPaginationRange** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleEnvironmentCreated** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **frontend.src.routes.dashboards.__tests__.dashboard_profile_override_integration** (`Module`)
|
||||
- 📝 Verifies temporary show-all override and restore-on-return behavior for profile-default dashboard filtering.
|
||||
- 🏗️ Layer: UI (Tests)
|
||||
@@ -1203,8 +1212,8 @@
|
||||
- 🧩 **MigrationDashboard** (`Component`) `[CRITICAL]`
|
||||
- 📝 Orchestrate migration UI workflow and route user actions to backend APIs and task store.
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ⬅️ READS_FROM `selectedTask`
|
||||
- ➡️ WRITES_TO `selectedTask`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `effect`
|
||||
- ƒ **fetchEnvironments** (`Function`) `[CRITICAL]`
|
||||
- 📝 Fetches the list of environments from the API.
|
||||
- ƒ **fetchDashboards** (`Function`) `[CRITICAL]`
|
||||
@@ -1301,8 +1310,8 @@
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Always displays a unified storage view without category tabs.
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- ➡️ WRITES_TO `page`
|
||||
- ƒ **loadFiles** (`Function`)
|
||||
- 📝 Fetches the list of files from the server.
|
||||
- ƒ **resolveStorageQueryFromPath** (`Function`)
|
||||
@@ -1407,8 +1416,8 @@
|
||||
- 🏗️ Layer: Page
|
||||
- 🔒 Invariant: All configurations must be validated via connection test.
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ƒ **loadConfigs** (`Function`)
|
||||
- 📝 Fetches existing git configurations.
|
||||
- ƒ **handleTest** (`Function`)
|
||||
@@ -1454,8 +1463,8 @@
|
||||
- 📝 Dashboard management page for Git integration.
|
||||
- 🏗️ Layer: Page
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `environmentContextStore`
|
||||
- ⬅️ READS_FROM `environmentContextStore`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
- ƒ **fetchEnvironments** (`Function`)
|
||||
- 📝 Fetches the list of deployment environments from the API.
|
||||
- ƒ **fetchDashboards** (`Function`)
|
||||
@@ -1571,7 +1580,6 @@
|
||||
- 📝 Displays a grid of dashboards with selection and pagination.
|
||||
- 🏗️ Layer: Component
|
||||
- 🔒 Invariant: Selected IDs must be a subset of available dashboards.
|
||||
- ⚡ Events: selectionChanged
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
@@ -1618,19 +1626,17 @@
|
||||
- 🧩 **PasswordPrompt** (`Component`)
|
||||
- 📝 A modal component to prompt the user for database passwords when a migration task is paused.
|
||||
- 🏗️ Layer: UI
|
||||
- ⚡ Events: cancel, resume
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `effect`
|
||||
- ƒ **handleSubmit** (`Function`)
|
||||
- 📝 Validates and dispatches the passwords to resume the task.
|
||||
- 📝 Validates and forwards passwords to resume the task.
|
||||
- ƒ **handleCancel** (`Function`)
|
||||
- 📝 Cancels the password prompt.
|
||||
- 🧩 **MappingTable** (`Component`)
|
||||
- 📝 Displays and allows editing of database mappings.
|
||||
- 🏗️ Layer: Feature
|
||||
- 🔒 Invariant: Each source database can be mapped to one target database.
|
||||
- ⚡ Events: update
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `t`
|
||||
@@ -1642,7 +1648,6 @@
|
||||
- 📝 Displays detailed logs for a specific task inline or in a modal using TaskLogPanel.
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Real-time logs are always appended without duplicates.
|
||||
- ⚡ Events: close
|
||||
- ➡️ WRITES_TO `bindable`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
@@ -1667,18 +1672,16 @@
|
||||
- 📝 Prompts the user to provide a database mapping when one is missing during migration.
|
||||
- 🏗️ Layer: Feature
|
||||
- 🔒 Invariant: Modal blocks migration progress until resolved or cancelled.
|
||||
- ⚡ Events: cancel, resolve
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ƒ **resolve** (`Function`)
|
||||
- 📝 Dispatches the resolution event with the selected mapping.
|
||||
- 📝 Resolves the missing mapping via callback prop.
|
||||
- ƒ **cancel** (`Function`)
|
||||
- 📝 Cancels the mapping resolution modal.
|
||||
- 🧩 **DashboardGrid** (`Component`)
|
||||
- 📝 Displays a grid of dashboards with selection and pagination.
|
||||
- 🏗️ Layer: Component
|
||||
- 🔒 Invariant: Selected IDs must be a subset of available dashboards.
|
||||
- ⚡ Events: selectionChanged
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ➡️ WRITES_TO `derived`
|
||||
@@ -1699,7 +1702,7 @@
|
||||
- 🏗️ Layer: UI
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `page`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- 📦 **Navbar** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/components/Navbar.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
@@ -1753,7 +1756,6 @@
|
||||
- 🧩 **TaskList** (`Component`)
|
||||
- 📝 Displays a list of tasks with their status and execution details.
|
||||
- 🏗️ Layer: Component
|
||||
- ⚡ Events: select
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ⬅️ READS_FROM `t`
|
||||
@@ -1762,25 +1764,49 @@
|
||||
- ƒ **formatTime** (`Function`)
|
||||
- 📝 Formats a date string using date-fns.
|
||||
- ƒ **handleTaskClick** (`Function`)
|
||||
- 📝 Dispatches a select event when a task is clicked.
|
||||
- 📝 Forwards the selected task through a callback prop.
|
||||
- 🧩 **DynamicForm** (`Component`)
|
||||
- 📝 Generates a form dynamically based on a JSON schema.
|
||||
- 🏗️ Layer: UI
|
||||
- ⚡ Events: submit
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ƒ **handleSubmit** (`Function`)
|
||||
- 📝 Dispatches the submit event with the form data.
|
||||
- 📝 Emits submitted form data via callback prop.
|
||||
- ƒ **initializeForm** (`Function`)
|
||||
- 📝 Initialize form data with default values from the schema.
|
||||
- 🧩 **EnvSelector** (`Component`)
|
||||
- 📝 Provides a UI component for selecting source and target environments.
|
||||
- 🏗️ Layer: Feature
|
||||
- 🔒 Invariant: Source and target environments must be selectable from the list of configured environments.
|
||||
- ⚡ Events: change
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ƒ **handleSelect** (`Function`)
|
||||
- 📝 Dispatches the selection change event.
|
||||
- 📝 Propagates the selection change through a callback prop.
|
||||
- 🧩 **StartupEnvironmentWizard** (`Component`)
|
||||
- 📝 Blocking startup wizard for creating the first Superset environment from zero-state screens.
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: When open, wizard keeps user on an actionable setup path until the first environment exists.
|
||||
- ⬅️ READS_FROM `app`
|
||||
- ⬅️ READS_FROM `lib`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- 📦 **StartupEnvironmentWizard** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/components/StartupEnvironmentWizard.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **createInitialForm** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **slugifyEnvironmentId** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **normalizeSupersetBaseUrl** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **resetWizard** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleNameInput** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleIdInput** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **openAdvancedSettings** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleCreateEnvironment** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **ProtectedRoute.svelte** (`Module`)
|
||||
- 📝 Enforces authenticated and authorized access before protected route content is rendered.
|
||||
- 🏗️ Layer: UI
|
||||
@@ -1793,7 +1819,6 @@
|
||||
- 📝 Combines log filtering and display into a single cohesive dark-themed panel.
|
||||
- 🏗️ Layer: UI
|
||||
- 🔒 Invariant: Must always display logs in chronological order and respect auto-scroll preference.
|
||||
- ⚡ Events: filterChange
|
||||
- ➡️ WRITES_TO `bindable`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
@@ -1844,7 +1869,6 @@
|
||||
- 🧩 **FileList** (`Component`)
|
||||
- 📝 Displays a table of files with metadata and actions.
|
||||
- 🏗️ Layer: UI
|
||||
- ⚡ Events: delete, navigate
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ⬅️ READS_FROM `t`
|
||||
@@ -1859,7 +1883,6 @@
|
||||
- 🧩 **FileUpload** (`Component`)
|
||||
- 📝 Provides a form for uploading files to a specific category.
|
||||
- 🏗️ Layer: UI
|
||||
- ⚡ Events: uploaded
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
@@ -1870,9 +1893,9 @@
|
||||
- 🧩 **ConnectionForm** (`Component`)
|
||||
- 📝 UI component for creating a new database connection configuration.
|
||||
- 🏗️ Layer: UI
|
||||
- ⚡ Events: success
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ƒ **handleSubmit** (`Function`)
|
||||
- 📝 Submits the connection form to the backend.
|
||||
- ƒ **resetForm** (`Function`)
|
||||
@@ -1880,6 +1903,7 @@
|
||||
- 🧩 **ConnectionList** (`Component`)
|
||||
- 📝 UI component for listing and deleting saved database connection configurations.
|
||||
- 🏗️ Layer: UI
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ƒ **fetchConnections** (`Function`)
|
||||
@@ -1927,7 +1951,6 @@
|
||||
- 📝 Modal for deploying a dashboard to a target environment.
|
||||
- 🏗️ Layer: Component
|
||||
- 🔒 Invariant: Cannot deploy without a selected environment.
|
||||
- ⚡ Events: deploy
|
||||
- ➡️ WRITES_TO `bindable`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
@@ -1944,7 +1967,6 @@
|
||||
- 📝 UI for resolving merge conflicts (Keep Mine / Keep Theirs).
|
||||
- 🏗️ Layer: Component
|
||||
- 🔒 Invariant: User must resolve all conflicts before saving.
|
||||
- ⚡ Events: resolve
|
||||
- ➡️ WRITES_TO `bindable`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
@@ -1955,7 +1977,6 @@
|
||||
- 🧩 **CommitModal** (`Component`)
|
||||
- 📝 Модальное окно для создания коммита с просмотром изменений (diff).
|
||||
- 🏗️ Layer: Component
|
||||
- ⚡ Events: commit
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ⬅️ READS_FROM `t`
|
||||
@@ -1968,7 +1989,6 @@
|
||||
- 🧩 **BranchSelector** (`Component`)
|
||||
- 📝 UI для выбора и создания веток Git.
|
||||
- 🏗️ Layer: Component
|
||||
- ⚡ Events: change
|
||||
- ➡️ WRITES_TO `bindable`
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
@@ -2078,9 +2098,9 @@
|
||||
- 🧩 **ProviderConfig** (`Component`) `[CRITICAL]`
|
||||
- 📝 UI form for managing LLM provider configurations.
|
||||
- 🏗️ Layer: UI
|
||||
- 📥 Props: providers: any, onSave: any
|
||||
- ➡️ WRITES_TO `props`
|
||||
- ➡️ WRITES_TO `state`
|
||||
- ➡️ WRITES_TO `t`
|
||||
- ⬅️ READS_FROM `t`
|
||||
- 📦 **ProviderConfig** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
@@ -2096,22 +2116,19 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **toggleActive** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **handleDelete** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **ValidationReport** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for frontend/src/components/llm/ValidationReport.svelte
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **getStatusColor** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **frontend.src.components.llm.__tests__.provider_config_integration** (`Module`)
|
||||
- 📝 Protect edit-button interaction contract in LLM provider settings UI.
|
||||
- 📝 Protect edit and delete interaction contracts in LLM provider settings UI.
|
||||
- 🏗️ Layer: UI Tests
|
||||
- 🔒 Invariant: Edit action keeps explicit click handler and opens normalized edit form.
|
||||
- ƒ **provider_config_edit_contract_tests** (`Function`)
|
||||
- 📝 Validate edit button handler wiring and normalized edit form state mapping.
|
||||
- 📦 **test_auth_debug** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for backend/test_auth_debug.py
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **main** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📝 Validate edit and delete handler wiring plus normalized edit form state mapping.
|
||||
- 📦 **backend.delete_running_tasks** (`Module`)
|
||||
- 📝 Script to delete tasks with RUNNING status from the database.
|
||||
- 🏗️ Layer: Utility
|
||||
@@ -2171,6 +2188,8 @@
|
||||
- 📝 Dependency for checking if the current user has a specific permission.
|
||||
- ƒ **permission_checker** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **src** (`Package`)
|
||||
- 📝 Canonical backend package root for application, scripts, and tests.
|
||||
- 📦 **backend.src.scripts.seed_superset_load_test** (`Module`)
|
||||
- 📝 Creates randomized load-test data in Superset by cloning chart configurations and creating dashboards in target environments.
|
||||
- 🏗️ Layer: Scripts
|
||||
@@ -2328,6 +2347,8 @@
|
||||
- 🏗️ Layer: Scripts
|
||||
- 🔒 Invariant: Safe to run multiple times (idempotent).
|
||||
- 🔗 CALLS -> `backend.src.core.database.init_db`
|
||||
- ƒ **ensure_encryption_key** (`Function`) `[CRITICAL]`
|
||||
- 📝 Ensure backend runtime has a persistent Fernet encryption key during first-time installation.
|
||||
- ƒ **run_init** (`Function`) `[CRITICAL]`
|
||||
- 📝 Main entry point for the initialization script.
|
||||
- 📦 **backend.src.scripts.create_admin** (`Module`)
|
||||
@@ -2336,6 +2357,8 @@
|
||||
- 🔒 Invariant: Admin user must have the "Admin" role.
|
||||
- ƒ **create_admin** (`Function`)
|
||||
- 📝 Creates an admin user and necessary roles/permissions.
|
||||
- 📦 **src.scripts** (`Package`)
|
||||
- 📝 Script entrypoint package root.
|
||||
- 📦 **backend.src.schemas.health** (`Module`)
|
||||
- 📝 Pydantic schemas for dashboard health summary.
|
||||
- 🏗️ Layer: Domain
|
||||
@@ -2406,6 +2429,8 @@
|
||||
- 📝 Canonical account candidate projected from Superset users payload.
|
||||
- ℂ **SupersetAccountLookupResponse** (`Class`)
|
||||
- 📝 Response envelope for Superset account lookup (success or degraded mode).
|
||||
- 📦 **src.schemas** (`Package`)
|
||||
- 📝 API schema package root.
|
||||
- 📦 **backend.src.schemas.__tests__.test_settings_and_health_schemas** (`Module`)
|
||||
- 📝 Regression tests for settings and health schema contracts updated in 026 fix batch.
|
||||
- ƒ **test_validation_policy_create_accepts_structured_custom_channels** (`Function`)
|
||||
@@ -2532,6 +2557,8 @@
|
||||
- 📝 Initialize manager state from persisted or migrated configuration.
|
||||
- ƒ **_default_config** (`Function`) `[CRITICAL]`
|
||||
- 📝 Build default application configuration fallback.
|
||||
- ƒ **_sync_raw_payload_from_config** (`Function`) `[CRITICAL]`
|
||||
- 📝 Merge typed AppConfig state into raw payload while preserving unsupported legacy sections.
|
||||
- ƒ **_load_from_legacy_file** (`Function`) `[CRITICAL]`
|
||||
- 📝 Load legacy JSON configuration for migration fallback path.
|
||||
- ƒ **_get_record** (`Function`) `[CRITICAL]`
|
||||
@@ -2544,6 +2571,10 @@
|
||||
- 📝 Persist current in-memory configuration state.
|
||||
- ƒ **get_config** (`Function`) `[CRITICAL]`
|
||||
- 📝 Return current in-memory configuration snapshot.
|
||||
- ƒ **get_payload** (`Function`) `[CRITICAL]`
|
||||
- 📝 Return full persisted payload including sections outside typed AppConfig schema.
|
||||
- ƒ **save_config** (`Function`) `[CRITICAL]`
|
||||
- 📝 Persist configuration provided either as typed AppConfig or raw payload dict.
|
||||
- ƒ **update_global_settings** (`Function`) `[CRITICAL]`
|
||||
- 📝 Replace global settings and persist the resulting configuration.
|
||||
- ƒ **validate_path** (`Function`) `[CRITICAL]`
|
||||
@@ -2761,6 +2792,8 @@
|
||||
- ℂ **PluginConfig** (`Class`)
|
||||
- 📝 A Pydantic model used to represent the validated configuration and metadata of a loaded plugin. This object is what gets exposed to the API layer.
|
||||
- 🏗️ Layer: Core
|
||||
- 📦 **src.core** (`Package`)
|
||||
- 📝 Backend core services and infrastructure package root.
|
||||
- 📦 **backend.src.core.mapping_service** (`Module`) `[CRITICAL]`
|
||||
- 📝 Service for tracking and synchronizing Superset Resource IDs (UUID <-> Integer ID)
|
||||
- 🏗️ Layer: Core
|
||||
@@ -2858,6 +2891,8 @@
|
||||
- 📝 Persist dashboard preference entity and return refreshed persistent row.
|
||||
- ƒ **list_permissions** (`Function`) `[CRITICAL]`
|
||||
- 📝 List all permission entities available in storage.
|
||||
- 📦 **src.core.auth** (`Package`) `[CRITICAL]`
|
||||
- 📝 Authentication and authorization package root.
|
||||
- 📦 **test_auth** (`Module`)
|
||||
- 📝 Unit tests for authentication module
|
||||
- 🏗️ Layer: Domain
|
||||
@@ -3048,6 +3083,8 @@
|
||||
- 🔗 CALLS -> `self.load_excel_mappings`
|
||||
- 🔗 CALLS -> `superset_client.get_dataset`
|
||||
- 🔗 CALLS -> `superset_client.update_dataset`
|
||||
- 📦 **src.core.utils** (`Package`)
|
||||
- 📝 Shared utility package root.
|
||||
- 📦 **backend.src.core.__tests__.test_superset_profile_lookup** (`Module`)
|
||||
- 📝 Verifies Superset profile lookup adapter payload normalization and fallback error precedence.
|
||||
- 🏗️ Layer: Domain
|
||||
@@ -3077,6 +3114,15 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_calculate_schedule_very_small_window** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **backend.src.core.__tests__.test_config_manager_compat** (`Module`)
|
||||
- 📝 Verifies ConfigManager compatibility wrappers preserve legacy payload sections.
|
||||
- 🏗️ Layer: Domain
|
||||
- ƒ **test_get_payload_preserves_legacy_sections** (`Function`)
|
||||
- 📝 Ensure get_payload merges typed config into raw payload without dropping legacy sections.
|
||||
- ƒ **test_save_config_accepts_raw_payload_and_keeps_extras** (`Function`)
|
||||
- 📝 Ensure save_config accepts raw dict payload, refreshes typed config, and preserves extra sections.
|
||||
- ƒ **_capture_save** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **test_logger** (`Module`)
|
||||
- 📝 Unit tests for logger module
|
||||
- 🏗️ Layer: Infra
|
||||
@@ -3372,6 +3418,8 @@
|
||||
- 📝 Initiates the ADFS OIDC login flow.
|
||||
- ƒ **auth_callback_adfs** (`Function`) `[CRITICAL]`
|
||||
- 📝 Handles the callback from ADFS after successful authentication.
|
||||
- 📦 **src.api** (`Package`)
|
||||
- 📝 Backend API package root.
|
||||
- 📦 **router** (`Global`)
|
||||
- 📝 APIRouter instance for LLM routes.
|
||||
- ƒ **_is_valid_runtime_api_key** (`Function`)
|
||||
@@ -4826,6 +4874,8 @@
|
||||
- 🔗 DEPENDS_ON -> `backend.src.models.auth`
|
||||
- ℂ **UserDashboardPreference** (`Class`)
|
||||
- 📝 Stores Superset username binding and default "my dashboards" toggle for one authenticated user.
|
||||
- 📦 **src.models** (`Package`)
|
||||
- 📝 Domain model package root.
|
||||
- 📦 **test_models** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Unit tests for data models
|
||||
- 🏗️ Layer: Domain
|
||||
@@ -5048,9 +5098,11 @@
|
||||
- 🏗️ Layer: Domain
|
||||
- 🔗 DEPENDS_ON -> `backend.src.core.database`
|
||||
- 🔗 DEPENDS_ON -> `backend.src.models.llm`
|
||||
- ƒ **_require_fernet_key** (`Function`) `[CRITICAL]`
|
||||
- 📝 Load and validate the Fernet key used for secret encryption.
|
||||
- ℂ **EncryptionManager** (`Class`) `[CRITICAL]`
|
||||
- 📝 Handles encryption and decryption of sensitive data like API keys.
|
||||
- 🔒 Invariant: Uses a secret key from environment or a default one (fallback only for dev).
|
||||
- 🔒 Invariant: Uses only a validated secret key from environment.
|
||||
- ƒ **EncryptionManager.__init__** (`Function`)
|
||||
- 📝 Initialize the encryption manager with a Fernet key.
|
||||
- ƒ **EncryptionManager.encrypt** (`Function`)
|
||||
@@ -5266,6 +5318,8 @@
|
||||
- 📝 Decrypting invalid data raises InvalidToken.
|
||||
- ƒ **test_encrypt_empty_string** (`Function`)
|
||||
- 📝 Encrypting and decrypting an empty string works.
|
||||
- ƒ **test_missing_key_fails_fast** (`Function`)
|
||||
- 📝 Missing ENCRYPTION_KEY must abort initialization instead of using a fallback secret.
|
||||
- ƒ **test_custom_key_roundtrip** (`Function`)
|
||||
- 📝 Custom Fernet key produces valid roundtrip.
|
||||
- ƒ **_make_manager** (`Function`) `[TRIVIAL]`
|
||||
@@ -5452,6 +5506,8 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **_build_body** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **src.services.notifications** (`Package`)
|
||||
- 📝 Notification service package root.
|
||||
- 📦 **backend.src.services.notifications.__tests__.test_notification_service** (`Module`)
|
||||
- 📝 Unit tests for NotificationService routing and dispatch logic.
|
||||
- ƒ **mock_db** (`Function`) `[TRIVIAL]`
|
||||
@@ -5577,6 +5633,13 @@
|
||||
- 📝 Create immutable publication record for approved candidate.
|
||||
- ƒ **revoke_publication** (`Function`)
|
||||
- 📝 Revoke existing publication record without deleting history.
|
||||
- 📦 **backend.src.services.clean_release.artifact_catalog_loader** (`Module`)
|
||||
- 📝 Load bootstrap artifact catalogs for clean release real-mode flows.
|
||||
- 🏗️ Layer: Domain
|
||||
- 🔒 Invariant: Artifact catalog must produce deterministic CandidateArtifact entries with required identity and checksum fields.
|
||||
- 🔗 DEPENDS_ON -> `backend.src.models.clean_release.CandidateArtifact`
|
||||
- ƒ **load_bootstrap_artifacts** (`Function`)
|
||||
- 📝 Parse artifact catalog JSON into CandidateArtifact models for TUI/bootstrap flows.
|
||||
- 📦 **backend.src.services.clean_release.audit_service** (`Module`)
|
||||
- 📝 Provide lightweight audit hooks for clean release preparation/check/report lifecycle.
|
||||
- 🏗️ Layer: Infra
|
||||
@@ -6116,6 +6179,8 @@
|
||||
- 📝 Return filtered, sorted, paginated report collection.
|
||||
- ƒ **get_report_detail** (`Function`)
|
||||
- 📝 Return one normalized report with timeline/diagnostics/next actions.
|
||||
- 📦 **src.services.reports** (`Package`)
|
||||
- 📝 Report service package root.
|
||||
- 📦 **test_type_profiles** (`Module`) `[TRIVIAL]`
|
||||
- 📝 Auto-generated module for backend/src/services/reports/__tests__/test_type_profiles.py
|
||||
- 🏗️ Layer: Unknown
|
||||
@@ -6318,6 +6383,8 @@
|
||||
- 📝 Executes the dashboard migration logic with TaskContext support.
|
||||
- 📦 **MigrationPlugin.execute** (`Action`) `[CRITICAL]`
|
||||
- 📝 Execute the migration logic with proper task logging.
|
||||
- 📦 **src.plugins** (`Package`)
|
||||
- 📝 Plugin package root for dynamic discovery and runtime imports.
|
||||
- ƒ **schedule_dashboard_validation** (`Function`)
|
||||
- 📝 Schedules a recurring dashboard validation task.
|
||||
- ƒ **_parse_cron** (`Function`)
|
||||
@@ -6462,6 +6529,8 @@
|
||||
- 🏗️ Layer: Unknown
|
||||
- ƒ **__init__** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **src.plugins.git** (`Package`)
|
||||
- 📝 Git plugin extension package root.
|
||||
- 📦 **test_task_persistence** (`Module`)
|
||||
- 📝 Unit tests for TaskPersistenceService.
|
||||
- 🏗️ Layer: Test
|
||||
@@ -6780,6 +6849,18 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_ad_group_mapping** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_create_admin_creates_user_with_optional_email** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_create_admin_is_idempotent_for_existing_user** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_ensure_encryption_key_generates_backend_env_file** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_ensure_encryption_key_reuses_existing_env_file_value** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_ensure_encryption_key_prefers_process_environment** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **verify_fernet_key** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **test_log_persistence** (`Module`)
|
||||
- 📝 Unit tests for TaskLogPersistenceService.
|
||||
- 🏗️ Layer: Test
|
||||
@@ -6846,6 +6927,8 @@
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_tui_clear_history_f7** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- ƒ **test_tui_real_mode_bootstrap_imports_artifacts_catalog** (`Function`) `[TRIVIAL]`
|
||||
- 📝 Auto-detected function (orphan)
|
||||
- 📦 **test_clean_release_tui_v2** (`Module`)
|
||||
- 📝 Smoke tests for thin-client TUI action dispatch and blocked transition behavior.
|
||||
- 🏗️ Layer: Domain
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
if (isOpen && initialized && conversationId) {
|
||||
if (isOpen && initialized && conversationId && !loading) {
|
||||
const currentFirstConversationId = messages.length
|
||||
? messages[0].conversation_id
|
||||
: conversationId;
|
||||
@@ -276,7 +276,7 @@
|
||||
* @PRE: text is non-empty command text.
|
||||
* @POST: user message appears at the end of messages list.
|
||||
*/
|
||||
function appendLocalUserMessage(text) {
|
||||
function appendLocalUserMessage(text, targetConversationId = conversationId) {
|
||||
console.log("[AssistantChatPanel][message][appendLocalUserMessage][START]");
|
||||
messages = [
|
||||
...messages,
|
||||
@@ -285,6 +285,7 @@
|
||||
role: "user",
|
||||
text,
|
||||
created_at: new Date().toISOString(),
|
||||
conversation_id: targetConversationId || null,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -296,7 +297,10 @@
|
||||
* @PRE: response follows assistant message response contract.
|
||||
* @POST: assistant message appended with state/task/actions metadata.
|
||||
*/
|
||||
function appendAssistantResponse(response) {
|
||||
function appendAssistantResponse(
|
||||
response,
|
||||
targetConversationId = conversationId,
|
||||
) {
|
||||
// prettier-ignore
|
||||
console.log("[AssistantChatPanel][message][appendAssistantResponse][START]");
|
||||
messages = [
|
||||
@@ -310,6 +314,7 @@
|
||||
confirmation_id: response.confirmation_id || null,
|
||||
actions: response.actions || [],
|
||||
created_at: response.created_at,
|
||||
conversation_id: response.conversation_id || targetConversationId || null,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -349,14 +354,15 @@
|
||||
console.log("[AssistantChatPanel][message][handleSend][START]");
|
||||
const text = input.trim();
|
||||
if (!text || loading) return;
|
||||
const requestConversationId = conversationId;
|
||||
|
||||
appendLocalUserMessage(text);
|
||||
appendLocalUserMessage(text, requestConversationId);
|
||||
input = "";
|
||||
loading = true;
|
||||
|
||||
try {
|
||||
const response = await sendAssistantMessage({
|
||||
conversation_id: conversationId,
|
||||
conversation_id: requestConversationId,
|
||||
message: text,
|
||||
});
|
||||
|
||||
@@ -364,7 +370,10 @@
|
||||
setAssistantConversationId(response.conversation_id);
|
||||
}
|
||||
|
||||
appendAssistantResponse(response);
|
||||
appendAssistantResponse(
|
||||
response,
|
||||
response.conversation_id || requestConversationId,
|
||||
);
|
||||
await loadConversations(true);
|
||||
} catch (err) {
|
||||
appendAssistantResponse({
|
||||
@@ -414,6 +423,7 @@
|
||||
typeof crypto !== "undefined" && typeof crypto.randomUUID === "function"
|
||||
? crypto.randomUUID()
|
||||
: `conv-${Date.now()}`;
|
||||
historyLoadVersion += 1;
|
||||
setAssistantConversationId(newId);
|
||||
messages = [];
|
||||
historyPage = 1;
|
||||
|
||||
@@ -67,6 +67,15 @@ describe('AssistantChatPanel integration contract', () => {
|
||||
expect(source).toContain('goto("/reports")');
|
||||
});
|
||||
|
||||
it('guards first-message optimistic flow from premature history overwrite', () => {
|
||||
const source = fs.readFileSync(COMPONENT_PATH, 'utf-8');
|
||||
|
||||
expect(source).toContain('if (isOpen && initialized && conversationId && !loading)');
|
||||
expect(source).toContain('function appendLocalUserMessage(text, targetConversationId = conversationId)');
|
||||
expect(source).toContain('conversation_id: targetConversationId || null');
|
||||
expect(source).toContain('historyLoadVersion += 1;');
|
||||
});
|
||||
|
||||
it('uses i18n bindings for assistant UI labels', () => {
|
||||
const source = fs.readFileSync(COMPONENT_PATH, 'utf-8');
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
// [DEF:frontend.src.lib.components.assistant.__tests__.assistant_first_message_integration:Module]
|
||||
// @TIER: STANDARD
|
||||
// @SEMANTICS: assistant, integration-test, optimistic-message, conversation-race
|
||||
// @PURPOSE: Verify first optimistic user message stays visible while a new conversation request is pending.
|
||||
// @LAYER: UI Tests
|
||||
// @RELATION: VERIFIES -> frontend/src/lib/components/assistant/AssistantChatPanel.svelte
|
||||
// @INVARIANT: Starting a new conversation must not trigger history reload that overwrites the first local user message.
|
||||
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
import AssistantChatPanel from '../AssistantChatPanel.svelte';
|
||||
import * as assistantApi from '$lib/api/assistant';
|
||||
|
||||
const { assistantState } = vi.hoisted(() => ({
|
||||
assistantState: (() => {
|
||||
let value = { isOpen: true, conversationId: null };
|
||||
const subscribers = new Set();
|
||||
return {
|
||||
subscribe(fn) {
|
||||
subscribers.add(fn);
|
||||
fn(value);
|
||||
return () => subscribers.delete(fn);
|
||||
},
|
||||
set(next) {
|
||||
value = next;
|
||||
subscribers.forEach((fn) => fn(value));
|
||||
},
|
||||
update(updater) {
|
||||
value = updater(value);
|
||||
subscribers.forEach((fn) => fn(value));
|
||||
},
|
||||
};
|
||||
})(),
|
||||
}));
|
||||
|
||||
vi.mock('$lib/api/assistant', () => ({
|
||||
getAssistantHistory: vi.fn(() =>
|
||||
Promise.resolve({ items: [], total: 0, has_next: false }),
|
||||
),
|
||||
getAssistantConversations: vi.fn(() =>
|
||||
Promise.resolve({
|
||||
items: [],
|
||||
total: 0,
|
||||
has_next: false,
|
||||
active_total: 0,
|
||||
archived_total: 0,
|
||||
}),
|
||||
),
|
||||
deleteAssistantConversation: vi.fn(),
|
||||
confirmAssistantOperation: vi.fn(),
|
||||
cancelAssistantOperation: vi.fn(),
|
||||
sendAssistantMessage: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('$lib/api', () => ({
|
||||
api: {
|
||||
getLlmStatus: vi.fn(() => Promise.resolve({ configured: true, reason: 'ok' })),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock('$lib/stores/assistantChat', () => ({
|
||||
assistantChatStore: {
|
||||
subscribe: assistantState.subscribe,
|
||||
},
|
||||
closeAssistantChat: vi.fn(),
|
||||
setAssistantConversationId: vi.fn((conversationId) => {
|
||||
assistantState.update((state) => ({ ...state, conversationId }));
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('$lib/stores/taskDrawer.js', () => ({
|
||||
openDrawerForTask: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('$app/navigation', () => ({
|
||||
goto: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('../../../../services/gitService.js', () => ({
|
||||
gitService: {
|
||||
getDiff: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock('$lib/i18n', () => ({
|
||||
t: {
|
||||
subscribe: (fn) => {
|
||||
fn({
|
||||
assistant: {
|
||||
title: 'Assistant',
|
||||
close: 'Close',
|
||||
conversations: 'Conversations',
|
||||
new: 'New',
|
||||
active: 'Active',
|
||||
archived: 'Archived',
|
||||
more: 'More',
|
||||
loading_history: 'Loading history',
|
||||
loading_older: 'Loading older',
|
||||
try_commands: 'Try commands',
|
||||
sample_command_branch: 'branch',
|
||||
sample_command_migration: 'migration',
|
||||
sample_command_status: 'status',
|
||||
you: 'You',
|
||||
assistant: 'Assistant',
|
||||
thinking: 'Thinking',
|
||||
input_placeholder: 'Type command',
|
||||
send: 'Send',
|
||||
conversation: 'Conversation',
|
||||
states: {
|
||||
success: 'Success',
|
||||
failed: 'Failed',
|
||||
started: 'Started',
|
||||
},
|
||||
open_task_drawer: 'Open task drawer',
|
||||
},
|
||||
dashboard: {},
|
||||
});
|
||||
return () => {};
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
// [DEF:assistant_first_message_tests:Function]
|
||||
// @TIER: STANDARD
|
||||
// @PURPOSE: Guard optimistic first-message UX against history reload race in new conversation flow.
|
||||
// @PRE: Assistant panel renders with open state and mocked network dependencies.
|
||||
// @POST: First user message remains visible before pending send request resolves.
|
||||
describe('AssistantChatPanel first message flow', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
assistantState.set({ isOpen: true, conversationId: null });
|
||||
});
|
||||
|
||||
it('keeps the first optimistic user message visible during pending send in a new conversation', async () => {
|
||||
let resolveSend;
|
||||
assistantApi.sendAssistantMessage.mockImplementation(
|
||||
(payload) =>
|
||||
new Promise((resolve) => {
|
||||
resolveSend = () =>
|
||||
resolve({
|
||||
response_id: 'resp-1',
|
||||
conversation_id: payload.conversation_id,
|
||||
text: 'Started',
|
||||
state: 'success',
|
||||
created_at: new Date().toISOString(),
|
||||
actions: [],
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
render(AssistantChatPanel);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(assistantApi.getAssistantHistory).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
await fireEvent.click(screen.getByText('New'));
|
||||
|
||||
const input = screen.getByPlaceholderText('Type command');
|
||||
await fireEvent.input(input, { target: { value: 'first prompt' } });
|
||||
await fireEvent.click(screen.getByText('Send'));
|
||||
|
||||
expect(screen.getByText('first prompt')).toBeTruthy();
|
||||
expect(assistantApi.sendAssistantMessage).toHaveBeenCalledTimes(1);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(assistantApi.getAssistantHistory).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
resolveSend();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Started')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
// [/DEF:assistant_first_message_tests:Function]
|
||||
// [/DEF:frontend.src.lib.components.assistant.__tests__.assistant_first_message_integration:Module]
|
||||
@@ -79,7 +79,7 @@
|
||||
"environment_label": "Environment:",
|
||||
"all_environments": "All Environments",
|
||||
"validation_details": "Validation Details",
|
||||
"table_dashboard": "Dashboard",
|
||||
"table_dashboard": "Slug",
|
||||
"table_environment": "Environment",
|
||||
"table_status": "Status",
|
||||
"table_last_check": "Last Check",
|
||||
@@ -87,6 +87,9 @@
|
||||
"no_records": "No validation records found.",
|
||||
"no_records_for_environment": "No validation records found for this environment.",
|
||||
"view_report": "View Report",
|
||||
"delete_confirm": "Delete report for dashboard \"{slug}\"?",
|
||||
"delete_success": "Report for dashboard \"{slug}\" deleted.",
|
||||
"delete_failed": "Failed to delete report: {error}",
|
||||
"load_failed": "Failed to load health summary",
|
||||
"status_pass": "Pass",
|
||||
"status_warn": "Warn",
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"environment_label": "Окружение:",
|
||||
"all_environments": "Все окружения",
|
||||
"validation_details": "Детали валидации",
|
||||
"table_dashboard": "Дашборд",
|
||||
"table_dashboard": "Slug",
|
||||
"table_environment": "Окружение",
|
||||
"table_status": "Статус",
|
||||
"table_last_check": "Последняя проверка",
|
||||
@@ -87,6 +87,9 @@
|
||||
"no_records": "Записи валидации не найдены.",
|
||||
"no_records_for_environment": "Для этого окружения записи валидации не найдены.",
|
||||
"view_report": "Открыть отчет",
|
||||
"delete_confirm": "Удалить отчет для дашборда \"{slug}\"?",
|
||||
"delete_success": "Отчет для дашборда \"{slug}\" удалён.",
|
||||
"delete_failed": "Не удалось удалить отчет: {error}",
|
||||
"load_failed": "Не удалось загрузить сводку здоровья",
|
||||
"status_pass": "Успех",
|
||||
"status_warn": "Предупреждение",
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
@TIER: STANDARD
|
||||
@PURPOSE: Main page for the Dashboard Health Center.
|
||||
@LAYER: UI/Page
|
||||
@RELATION: DEPENDS_ON -> frontend.src.lib.components.health.HealthMatrix
|
||||
@RELATION: CALLS -> frontend.src.lib.api.api_module
|
||||
@UX_STATE: Idle -> Displays the Health Center with HealthMatrix.
|
||||
@UX_STATE: Loading -> Displays a skeleton or spinner.
|
||||
@UX_STATE: Error -> Displays an error message.
|
||||
@UX_REATIVITY: State: $state, Derived: $derived.
|
||||
@UX_REACTIVITY: State: $state, Derived: $derived.
|
||||
-->
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import HealthMatrix from '$lib/components/health/HealthMatrix.svelte';
|
||||
import { getHealthSummary, getEnvironments } from '$lib/api.js';
|
||||
import { getHealthSummary, getEnvironments, requestApi } from '$lib/api.js';
|
||||
import { t } from '$lib/i18n';
|
||||
import { addToast } from '$lib/toasts.js';
|
||||
import { formatDistanceToNow } from 'date-fns';
|
||||
|
||||
let healthData = $state({
|
||||
@@ -26,7 +29,13 @@
|
||||
let selectedEnvId = $state('');
|
||||
let loading = $state(true);
|
||||
let error = $state(null);
|
||||
let deletingReportIds = $state(new Set());
|
||||
|
||||
// [DEF:loadData:Function]
|
||||
// @PURPOSE: Load health summary rows and environment options for the current filter.
|
||||
// @PRE: Page is mounted or environment selection changed.
|
||||
// @POST: `healthData` and `environments` reflect latest backend response.
|
||||
// @SIDE_EFFECT: Calls backend API endpoints for health summary and environments.
|
||||
async function loadData() {
|
||||
loading = true;
|
||||
error = null;
|
||||
@@ -46,15 +55,49 @@
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
// [/DEF:loadData:Function]
|
||||
|
||||
onMount(() => {
|
||||
loadData();
|
||||
});
|
||||
|
||||
// [DEF:handleEnvChange:Function]
|
||||
// @PURPOSE: Apply environment filter and trigger health summary reload.
|
||||
// @PRE: DOM change event carries target value.
|
||||
// @POST: selectedEnvId is updated and new data load starts.
|
||||
function handleEnvChange(e) {
|
||||
selectedEnvId = e.target.value;
|
||||
loadData();
|
||||
}
|
||||
// [/DEF:handleEnvChange:Function]
|
||||
|
||||
// [DEF:handleDeleteReport:Function]
|
||||
// @PURPOSE: Delete one health report row with confirmation and optimistic button lock.
|
||||
// @PRE: item contains `record_id` from health summary payload.
|
||||
// @POST: Row is removed from backend and page data is reloaded on success.
|
||||
// @SIDE_EFFECT: Calls DELETE health API and emits toast notifications.
|
||||
async function handleDeleteReport(item) {
|
||||
if (!item?.record_id || deletingReportIds.has(item.record_id)) return;
|
||||
if (!confirm($t.health?.delete_confirm.replace('{slug}', item.dashboard_slug || item.dashboard_id))) return;
|
||||
|
||||
deletingReportIds.add(item.record_id);
|
||||
deletingReportIds = new Set(deletingReportIds);
|
||||
|
||||
try {
|
||||
await requestApi(`/health/summary/${item.record_id}`, 'DELETE');
|
||||
addToast($t.health?.delete_success.replace('{slug}', item.dashboard_slug || item.dashboard_id), 'success');
|
||||
await loadData();
|
||||
} catch (e) {
|
||||
addToast(
|
||||
$t.health?.delete_failed.replace('{error}', e?.message || $t.common?.error),
|
||||
'error',
|
||||
);
|
||||
} finally {
|
||||
deletingReportIds.delete(item.record_id);
|
||||
deletingReportIds = new Set(deletingReportIds);
|
||||
}
|
||||
}
|
||||
// [/DEF:handleDeleteReport:Function]
|
||||
</script>
|
||||
|
||||
<div class="container mx-auto p-6">
|
||||
@@ -136,8 +179,13 @@
|
||||
{:else}
|
||||
{#each healthData.items as item}
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
|
||||
{item.dashboard_title || item.dashboard_id}
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
||||
<a
|
||||
href={`/dashboards/${encodeURIComponent(String(item.dashboard_slug || item.dashboard_id))}?env_id=${encodeURIComponent(item.environment_id)}`}
|
||||
class="text-indigo-600 hover:text-indigo-900 hover:underline"
|
||||
>
|
||||
{item.dashboard_slug || item.dashboard_id}
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
<span class="px-2 py-1 bg-gray-100 rounded text-xs font-mono">{item.environment_id}</span>
|
||||
@@ -161,6 +209,14 @@
|
||||
{#if item.task_id}
|
||||
<a href="/reports/llm/{item.task_id}" class="text-indigo-600 hover:text-indigo-900">{$t.health?.view_report}</a>
|
||||
{/if}
|
||||
<button
|
||||
type="button"
|
||||
class="ml-3 text-red-600 hover:text-red-900"
|
||||
onclick={() => handleDeleteReport(item)}
|
||||
disabled={deletingReportIds.has(item.record_id)}
|
||||
>
|
||||
{deletingReportIds.has(item.record_id) ? '...' : $t.common?.delete}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// [DEF:frontend.src.routes.dashboards.health.__tests__.health_page_integration:Module]
|
||||
// @TIER: STANDARD
|
||||
// @SEMANTICS: health-page, integration-test, slug-link, delete-flow
|
||||
// @PURPOSE: Lock dashboard health page contract for slug navigation and report deletion.
|
||||
// @LAYER: UI Tests
|
||||
// @RELATION: VERIFIES -> frontend/src/routes/dashboards/health/+page.svelte
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
const PAGE_PATH = path.resolve(
|
||||
process.cwd(),
|
||||
'src/routes/dashboards/health/+page.svelte',
|
||||
);
|
||||
|
||||
describe('Dashboard health page contract', () => {
|
||||
it('renders slug-first dashboard link bound to environment route context', () => {
|
||||
const source = fs.readFileSync(PAGE_PATH, 'utf-8');
|
||||
|
||||
expect(source).toContain("{$t.health?.table_dashboard}");
|
||||
expect(source).toContain("item.dashboard_slug || item.dashboard_id");
|
||||
expect(source).toContain("href={`/dashboards/${encodeURIComponent(String(item.dashboard_slug || item.dashboard_id))}?env_id=${encodeURIComponent(item.environment_id)}`}");
|
||||
});
|
||||
|
||||
it('keeps explicit delete report flow with confirm and DELETE request', () => {
|
||||
const source = fs.readFileSync(PAGE_PATH, 'utf-8');
|
||||
|
||||
expect(source).toContain('async function handleDeleteReport(item)');
|
||||
expect(source).toContain("requestApi(`/health/summary/${item.record_id}`, 'DELETE')");
|
||||
expect(source).toContain("$t.health?.delete_confirm.replace('{slug}', item.dashboard_slug || item.dashboard_id)");
|
||||
expect(source).toContain("$t.common?.delete");
|
||||
});
|
||||
});
|
||||
// [/DEF:frontend.src.routes.dashboards.health.__tests__.health_page_integration:Module]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -114,4 +114,6 @@ Goal: Finalize styling, error handling, and end-to-end flow.
|
||||
- [x] R002 Align policy channel schema contract: `custom_channels` migrated to structured objects `{type,target}` in settings schemas.
|
||||
- [x] R003 Tighten health status regex to strict grouped anchors `^(PASS|WARN|FAIL|UNKNOWN)$`.
|
||||
- [x] R004 Resolve weekday convention drift to `0=Sunday ... 6=Saturday` consistently across backend schema description and policy form UI.
|
||||
- [x] R005 Add regression tests for schema contracts and plugin persistence context fields.
|
||||
- [x] R005 Add regression tests for schema contracts and plugin persistence context fields.
|
||||
- [x] R006 Make health report deletion resilient to linked task/log cleanup failures and cover the fallback with unit tests.
|
||||
- [x] R007 Align Health Center delete action with latest-record aggregation by deleting all validation reports for the selected dashboard/environment scope.
|
||||
Reference in New Issue
Block a user