Skip to content

Commit 3b75a60

Browse files
committed
fix(desktop): restore KG autocomplete input on role switch
- Update ThemeSwitcher to detect KG using new type structure (knowledge_graph_local.path, automata_path) - Fix typeahead store toggling on both initial config load and role change - Update KGSearchInput placeholder to 'Search knowledge graph items' - Add unit tests for typeahead rendering behavior - Add E2E test for role switch autocomplete functionality - Fix clippy warnings (regex in loops, unused field) - Update biome config to include test files Note: Pre-existing cargo check errors in examples/benches (test_utils imports) do not affect this fix
1 parent a19a258 commit 3b75a60

65 files changed

Lines changed: 1565 additions & 331 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.reports/ACCOMPLISHMENTS_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
---
139139

140-
**Summary**: Release v1.0.0 is 75% complete with all infrastructure in place.
140+
**Summary**: Release v1.0.0 is 75% complete with all infrastructure in place.
141141
Waiting for CI to pass, then ready to publish!
142142

143143
**Kudos**: Excellent progress on first major release with signed Tauri updates! 🎊

.reports/CI_FIX_APPLIED.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
## ✅ Quick Fixes Completed
44

55
### Fix 1: Created .cargo/config.toml
6-
**Issue**: Package Release workflow failed with `sed: can't read .cargo/config.toml`
7-
**Solution**: Created `.cargo/config.toml` with release profile configuration
6+
**Issue**: Package Release workflow failed with `sed: can't read .cargo/config.toml`
7+
**Solution**: Created `.cargo/config.toml` with release profile configuration
88
**Status**: ✅ Committed and pushed
99

1010
### Fix 2: Cleaned package.json Dependencies
11-
**Issue**: 8 duplicate dependencies in optionalDependencies vs devDependencies
12-
**Solution**: Removed all conflicting entries from optionalDependencies
11+
**Issue**: 8 duplicate dependencies in optionalDependencies vs devDependencies
12+
**Solution**: Removed all conflicting entries from optionalDependencies
1313
**Status**: ✅ Committed and pushed
1414

1515
### Git Changes
@@ -26,7 +26,7 @@
2626
### Will Retrigger:
2727
- New push to `release/v1.0.0` will trigger:
2828
- Package Release workflow
29-
- Tauri Publish workflow
29+
- Tauri Publish workflow
3030
- CI workflows
3131

3232
## ⏳ Remaining Issues (Non-Blocking)
@@ -37,7 +37,7 @@ These are **warnings**, not errors, and should not block the build:
3737
1. `ConfigWizard.svelte:642` - Label without for attribute
3838
2. `ConfigWizard.svelte:901` - Self-closing textarea
3939
3. `SessionList.svelte:219` - Button missing aria-label
40-
4. `ContextEditModal.svelte:187` - Label without associated control
40+
4. `ContextEditModal.svelte:187` - Label without associated control
4141
5. `KGSearchModal.svelte:708` - Div with keydown needs ARIA role
4242

4343
**Action**: Monitor if build treats these as errors. If so, apply manual fixes from plan.
@@ -96,6 +96,6 @@ gh run watch --repo terraphim/terraphim-ai
9696
9797
---
9898
99-
**Status**: Fixes pushed, monitoring CI
100-
**Next Check**: 19:45 UTC
99+
**Status**: Fixes pushed, monitoring CI
100+
**Next Check**: 19:45 UTC
101101
**Owner**: @AlexMikhalev

.reports/DEAD_CODE_INVESTIGATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Issue Summary
44
The public `terraphim-ai` repository has dead code warnings for several methods in `crates/terraphim_middleware/src/haystack/query_rs.rs`:
55
- `should_fetch_url()` - line 48
6-
- `get_fetched_count()` - line 72
6+
- `get_fetched_count()` - line 72
77
- `normalize_document_id()` - line 201
88
- `fetch_and_scrape_content()` - line 336
99
- `scrape_content()` - line 417
@@ -44,7 +44,7 @@ The public repository has a **SIMPLIFIED** version that:
4444

4545
The private repository has:
4646
- `FetchStats` struct (lines 14-25) - tracks fetch success/failure
47-
- `PersistenceStats` struct (lines 28-41) - tracks cache hits/misses
47+
- `PersistenceStats` struct (lines 28-41) - tracks cache hits/misses
4848
- Full content enhancement logic with `disable_content_enhancement` flag
4949
- Active usage of all the "dead" methods
5050

.reports/FINAL_COMPREHENSIVE_STATUS.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
-**Fix 4**: Installed postcss dependencies
2121
-**Fix 5**: Suppressed accessibility warnings in vite config
2222

23-
**Commits**:
23+
**Commits**:
2424
- `b03f48f0` - CI workflow fixes
2525
- `ab6a8540` - Build improvements (SCSS + warnings)
2626

@@ -36,17 +36,17 @@
3636
### GitHub Actions Status
3737
**Workflows Running**: 3 workflows still executing from earlier push (53+ minutes)
3838
- Earthly CI/CD
39-
- CI Native
39+
- CI Native
4040
- CI Optimized
4141

4242
**Not Yet Retriggered**: Latest fixes (commits b03f48f0, ab6a8540) not pushed yet
4343

4444
### Build Issues Discovered
4545

4646
#### Critical: svelte-jsoneditor Invalid HTML
47-
**Error**: `<tr>` cannot be direct child of `<table>` in `TransformWizard.svelte:94`
48-
**Impact**: Build fails with compilation error
49-
**Cause**: Dependency (svelte-jsoneditor) has invalid HTML structure
47+
**Error**: `<tr>` cannot be direct child of `<table>` in `TransformWizard.svelte:94`
48+
**Impact**: Build fails with compilation error
49+
**Cause**: Dependency (svelte-jsoneditor) has invalid HTML structure
5050
**Status**: ⚠️ **BLOCKING LOCAL BUILD**
5151

5252
**Potential Solutions**:
@@ -58,8 +58,8 @@
5858
## 📋 Remaining TODOs (3)
5959

6060
### 1. ⚠️ Fix svelte-jsoneditor Build Error (CRITICAL)
61-
**Priority**: HIGH - Blocks local testing
62-
**Estimated Time**: 30 min
61+
**Priority**: HIGH - Blocks local testing
62+
**Estimated Time**: 30 min
6363
**Options**:
6464
```bash
6565
# Option A: Downgrade
@@ -76,7 +76,7 @@ yarn remove svelte-jsoneditor
7676
```
7777

7878
### 2. Build and Test Tauri Locally
79-
**Status**: Blocked by svelte-jsoneditor error
79+
**Status**: Blocked by svelte-jsoneditor error
8080
**After Fix**:
8181
```bash
8282
cd desktop
@@ -85,8 +85,8 @@ yarn tauri build # Generate .dmg/.app
8585
```
8686

8787
### 3. Review/Merge PRs #277 & #268
88-
**Status**: Deferred until v1.0.0 published
89-
**Reason**: Both have failing CI, focus on release first
88+
**Status**: Deferred until v1.0.0 published
89+
**Reason**: Both have failing CI, focus on release first
9090
**Action**: Merge to main after v1.0.0 ships
9191

9292
## 🚀 Next Actions (Priority Order)
@@ -231,5 +231,5 @@ Breakdown:
231231

232232
**Confidence**: 80% can release today if jsoneditor issue resolved quickly.
233233

234-
**Owner**: @AlexMikhalev
234+
**Owner**: @AlexMikhalev
235235
**Last Updated**: 2025-11-04 19:20 UTC

.reports/FINAL_VALIDATION_STATUS.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Terraphim AI v1.0.0 - Final Validation Status
2-
**Date:** 2025-11-05
3-
**Time:** 14:07 GMT
2+
**Date:** 2025-11-05
3+
**Time:** 14:07 GMT
44
**Build Completion:** SUCCESSFUL (Core Components)
55

66
---
@@ -12,7 +12,7 @@
1212
**Test Execution Complete:**
1313
```
1414
terraphim_middleware: 5/5 tests ✅
15-
terraphim_service: 112/112 tests ✅
15+
terraphim_service: 112/112 tests ✅
1616
terraphim_automata: 13/13 tests ✅
1717
terraphim_rolegraph: 7/7 tests ✅
1818
terraphim_persistence: 25/25 tests ✅
@@ -56,7 +56,7 @@ Features:
5656

5757
**Binary Functionality:**
5858
- ✅ CLI argument parsing working
59-
- ✅ Help system operational
59+
- ✅ Help system operational
6060
- ✅ Version detection working
6161
- ✅ Ready for server startup testing
6262

@@ -108,7 +108,7 @@ cargo build -p terraphim_tui --lib --features repl-full
108108

109109
**Binary Build:**
110110
```bash
111-
cargo build -p terraphim_tui --features repl-full
111+
cargo build -p terraphim_tui --features repl-full
112112
❌ FAILED - 24 compilation errors
113113
```
114114

@@ -279,7 +279,7 @@ Overall Release Readiness: 🟡 80%
279279
**Rationale:**
280280
- Core functionality is PROVEN (162/162 tests)
281281
- Server binary is WORKING
282-
- QueryRs sync is COMPLETE
282+
- QueryRs sync is COMPLETE
283283
- All critical features validated
284284

285285
**Known Limitations:**
@@ -324,10 +324,10 @@ Overall Release Readiness: 🟡 80%
324324

325325
**The core of Terraphim AI is SOLID and OPERATIONAL.**
326326

327-
**162 unit tests passing**
328-
**Server binary built and functional**
329-
**QueryRs sync complete with all features active**
330-
**All critical algorithms validated**
327+
**162 unit tests passing**
328+
**Server binary built and functional**
329+
**QueryRs sync complete with all features active**
330+
**All critical algorithms validated**
331331
**Clean code quality metrics**
332332

333333
The issues that remain are:

.reports/FUNCTIONAL_VALIDATION_REPORT.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Terraphim AI v1.0.0 - Functional Validation Report
2-
**Date:** 2025-11-05
3-
**Branch:** release/v1.0.0
2+
**Date:** 2025-11-05
3+
**Branch:** release/v1.0.0
44
**Test Duration:** ~30 minutes
55

66
## Executive Summary
77

8-
**CORE FUNCTIONALITY: FULLY OPERATIONAL**
9-
⚠️ **BUILD SYSTEM: Dependency issue in html2md (external)**
10-
**UNIT TESTS: 162+ tests passing**
8+
**CORE FUNCTIONALITY: FULLY OPERATIONAL**
9+
⚠️ **BUILD SYSTEM: Dependency issue in html2md (external)**
10+
**UNIT TESTS: 162+ tests passing**
1111
**CODE QUALITY: All formatting and core clippy checks pass**
1212

1313
## Test Results by Component
@@ -17,7 +17,7 @@
1717
#### terraphim_middleware (5/5 tests passed)
1818
```
1919
✓ test_cache_key_generation
20-
✓ test_normalize_query_for_id
20+
✓ test_normalize_query_for_id
2121
✓ test_perplexity_config_parsing
2222
✓ test_generate_title_from_query
2323
✓ test_extract_stub
@@ -77,7 +77,7 @@ cargo fmt --all -- --check
7777
```
7878
**Result:** ✅ All code properly formatted
7979

80-
#### Core Library Compilation
80+
#### Core Library Compilation
8181
```bash
8282
cargo build --workspace --lib
8383
```
@@ -106,9 +106,9 @@ cargo clippy --workspace --lib --all-features
106106
### 4. Known Issues
107107

108108
#### External Dependency Issue ⚠️
109-
**Package:** html2md (external crate)
110-
**Impact:** Blocks release binary builds for terraphim_server and terraphim_tui
111-
**Severity:** Medium - does not affect core functionality or library code
109+
**Package:** html2md (external crate)
110+
**Impact:** Blocks release binary builds for terraphim_server and terraphim_tui
111+
**Severity:** Medium - does not affect core functionality or library code
112112
**Workaround Options:**
113113
1. Update html2md dependency version
114114
2. Fork and patch html2md
@@ -126,7 +126,7 @@ This appears to be a Rust edition 2024 compatibility issue with the html2md crat
126126

127127
**All Core Libraries**
128128
- Search and indexing
129-
- Knowledge graph construction
129+
- Knowledge graph construction
130130
- Autocomplete and fuzzy search
131131
- Document persistence
132132
- Configuration management
@@ -192,5 +192,5 @@ The core functionality of Terraphim AI is **fully validated and operational**. A
192192

193193
The blocking issue is an **external dependency (html2md)** that prevents binary compilation. This does not affect the core library functionality but does block end-to-end testing of complete applications.
194194

195-
**Confidence Level: HIGH** for core libraries
195+
**Confidence Level: HIGH** for core libraries
196196
**Confidence Level: MEDIUM** for full release (pending html2md fix)

.reports/GITHUB_ACTIONS_FIX_PLAN.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
## Root Causes Identified
1616

1717
### Issue 1: Missing .cargo/config.toml
18-
**Workflow**: Package Release
19-
**Error**: `sed: can't read .cargo/config.toml: No such file or directory`
20-
**Line**: Step "Temporarily disable panic abort for building"
18+
**Workflow**: Package Release
19+
**Error**: `sed: can't read .cargo/config.toml: No such file or directory`
20+
**Line**: Step "Temporarily disable panic abort for building"
2121
**Impact**: Workflow fails at line 52 before building
2222

2323
**Fix**:
@@ -37,8 +37,8 @@ EOF
3737
```
3838

3939
### Issue 2: Svelte Accessibility Warnings (Tauri Build)
40-
**Workflow**: Publish Tauri with Auto-Update
41-
**Errors**: Multiple accessibility warnings in Svelte components
40+
**Workflow**: Publish Tauri with Auto-Update
41+
**Errors**: Multiple accessibility warnings in Svelte components
4242
**Impact**: Build may treat warnings as errors
4343

4444
**Files Needing Fixes**:
@@ -65,7 +65,7 @@ EOF
6565
```
6666

6767
### Issue 3: Package.json Dependency Conflicts
68-
**Warnings**: Multiple collisions between optionalDependencies and devDependencies
68+
**Warnings**: Multiple collisions between optionalDependencies and devDependencies
6969
**Impact**: May cause npm/yarn resolution issues
7070

7171
**Conflicting Packages**:
@@ -142,7 +142,7 @@ sed -i 's/<textarea \([^>]*\)\/>/ <textarea \1><\/textarea>/g' desktop/src/l
142142
```bash
143143
cd desktop
144144
# Remove duplicates from optionalDependencies that are in devDependencies
145-
jq 'del(.optionalDependencies["@tauri-apps/cli"],
145+
jq 'del(.optionalDependencies["@tauri-apps/cli"],
146146
.optionalDependencies["@testing-library/jest-dom"],
147147
.optionalDependencies["@testing-library/svelte"],
148148
.optionalDependencies["dotenv"],

.reports/RELEASE_STATUS_FINAL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- ✅ Updated `tauri.conf.json` with public key for signed updates
88
- ✅ Bumped version to 1.0.0 across all files:
99
- `desktop/src-tauri/Cargo.toml`: 0.1.0 → 1.0.0
10-
- `desktop/src-tauri/tauri.conf.json`: 0.3.0 → 1.0.0
10+
- `desktop/src-tauri/tauri.conf.json`: 0.3.0 → 1.0.0
1111
- `desktop/package.json`: 0.3.0 → 1.0.0
1212

1313
### Git & GitHub
@@ -28,7 +28,7 @@
2828
### GitHub Actions
2929
- ⚙️ CI workflows triggered by v1.0.0 tag:
3030
- Earthly CI/CD: Queued
31-
- CI Native: Queued
31+
- CI Native: Queued
3232
- CI Optimized: Queued
3333
- Package Release: Failed (investigating)
3434
- Publish Tauri: Failed (build issues)
@@ -96,6 +96,6 @@ Once release is published:
9696

9797
---
9898

99-
**Status**: Release prepared but waiting for CI to complete successfully.
100-
**Next Action**: Fix build issues and rerun workflows.
99+
**Status**: Release prepared but waiting for CI to complete successfully.
100+
**Next Action**: Fix build issues and rerun workflows.
101101
**ETA**: Complete once CI passes (likely within 24 hours).

0 commit comments

Comments
 (0)