Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
401b800
docs: add GPUI migration plan for core user journey
claude Nov 24, 2025
dad2d87
feat: implement GPUI desktop foundation (Phase 1)
claude Nov 24, 2025
555ec28
feat: implement business logic layer (Phase 1, Week 2)
claude Nov 24, 2025
8617bad
refactor(gpui): leverage existing terraphim APIs, remove duplicate code
claude Nov 24, 2025
e922596
fix: resolve all compilation errors, achieve 24 passing tests
claude Nov 24, 2025
f891c90
docs: add comprehensive implementation status
claude Nov 24, 2025
acdc5cc
feat: implement business logic layer (Phase 1, Week 2)
claude Nov 24, 2025
ec2937e
feat(gpui): complete all UI components and comprehensive E2E tests
claude Nov 24, 2025
81f8498
fix(gpui): resolve dependency versions and add compatibility document…
AlexMikhalev Nov 24, 2025
a5c5ae1
feat(desktop-gpui): Complete GPUI 0.2.2 migration with functional UI
AlexMikhalev Nov 24, 2025
820cf02
feat(desktop-gpui): Add interactive navigation with working click han…
AlexMikhalev Nov 24, 2025
cf5d955
feat(desktop-gpui): Integrate ConfigState and backend services
AlexMikhalev Nov 24, 2025
451ee1d
feat(desktop-gpui): Wire search backend to SearchState
AlexMikhalev Nov 24, 2025
d7c3ec9
feat(desktop-gpui): Complete search with autocomplete and results dis…
AlexMikhalev Nov 24, 2025
29ccbb1
feat(desktop-gpui): Add role selector with backend integration
AlexMikhalev Nov 24, 2025
de7a374
test(desktop-gpui): Add comprehensive backend integration tests
AlexMikhalev Nov 24, 2025
46c89e8
feat(desktop-gpui): Integrate real ContextManager from terraphim_service
AlexMikhalev Nov 24, 2025
25c7983
feat(desktop-gpui): Add context backend tests and plan tracking
AlexMikhalev Nov 24, 2025
be8bfcc
docs(desktop-gpui): Update plan.md with 19/19 backend tests passing
AlexMikhalev Nov 24, 2025
a79a1fa
docs(desktop-gpui): Add comprehensive status report and cross-check
AlexMikhalev Nov 24, 2025
6da35d1
feat(desktop-gpui): Add interactive role selector with Button component
AlexMikhalev Nov 24, 2025
4b38a3d
feat(desktop-gpui): Complete chat with LLM integration using Tauri pa…
AlexMikhalev Nov 24, 2025
cbf6b45
docs(desktop-gpui): Update plan to 85% - major user journey complete
AlexMikhalev Nov 24, 2025
0edfddd
fix(desktop-gpui): Keep tokio runtime alive to prevent search crashes
AlexMikhalev Nov 25, 2025
32506b9
test(desktop-gpui): Add end-to-end flow tests - 23/23 total passing
AlexMikhalev Nov 25, 2025
8a44465
feat(desktop-gpui): Make role dropdown items fully clickable
AlexMikhalev Nov 25, 2025
5ab25f5
feat(desktop-gpui): Add 5 roles with lucide icons
AlexMikhalev Nov 25, 2025
230e00b
docs: Update specs to reflect 90% completion - major user journey com…
AlexMikhalev Nov 25, 2025
09357dd
feat(desktop-gpui): Complete interactive UI - autocomplete click, con…
AlexMikhalev Nov 25, 2025
0f756b0
docs(desktop-gpui): Update plan.md to 95% complete - all features wor…
AlexMikhalev Nov 25, 2025
fb0ad52
test(desktop-gpui): Add complete user journey validation tests
AlexMikhalev Nov 25, 2025
d9feede
feat: Fix role loading to show all 5 roles + add GrepApp haystacks
AlexMikhalev Nov 25, 2025
fbe5b3a
fix: Prevent tokio runtime crash by loading roles in async context
AlexMikhalev Nov 25, 2025
36612bb
fix: Enter tokio runtime context for entire app lifetime
AlexMikhalev Nov 25, 2025
872e3a0
fix: Wire role changes to search + document outstanding actions
AlexMikhalev Nov 25, 2025
4b8ed1e
feat: Add action buttons to search results matching Tauri desktop
AlexMikhalev Nov 25, 2025
7d55b92
feat: Complete Add to Context flow from search results
Nov 25, 2025
d510cb5
docs: Update OUTSTANDING_ACTIONS - action buttons complete
AlexMikhalev Nov 25, 2025
1fc14f1
feat: Implement article modal for full document view
AlexMikhalev Nov 25, 2025
f2ac533
test: Prove UI functionality with comprehensive tests - ALL 6 PASSING
AlexMikhalev Nov 25, 2025
c0e204b
feat: Wire article modal to result title clicks
AlexMikhalev Nov 25, 2025
8fba85f
feat: Implement Open URL in Browser functionality for GPUI desktop app
AlexMikhalev Nov 25, 2025
7896293
feat: Implement production-grade platform-specific desktop features
AlexMikhalev Nov 25, 2025
340228e
docs: Update platform features status - all implementations complete
AlexMikhalev Nov 25, 2025
9b7e15f
docs: Update OUTSTANDING_ACTIONS to reflect completed platform features
AlexMikhalev Nov 25, 2025
cff7e67
feat: Fix non-functional platform features and add autocomplete debug…
AlexMikhalev Nov 26, 2025
3dd933e
fix: Align GPUI platform features with Tauri implementation
AlexMikhalev Nov 26, 2025
02e4606
fix: Autocomplete fallback to role with rolegraph when selected role …
AlexMikhalev Nov 26, 2025
7b41f04
fix: Update ConfigState.selected_role when falling back to role with …
AlexMikhalev Nov 26, 2025
35cc29e
fix: Resolve hotkey ID mismatch and autocomplete search trigger
AlexMikhalev Nov 26, 2025
4692cc1
fix: Implement tray menu actions, autocomplete dropdown hide, and key…
AlexMikhalev Nov 26, 2025
91448aa
fix: Resolve tray event handler timing race condition and add menu up…
AlexMikhalev Nov 27, 2025
fda45eb
Kind of good progress
AlexMikhalev Nov 27, 2025
29cf799
fix: Autocomplete selection now updates search input field
AlexMikhalev Nov 28, 2025
262b8b8
fix: resolve dropdown overlap and autocomplete selection issues
AlexMikhalev Dec 3, 2025
1f86ba6
feat: implement theme system and term chips component
AlexMikhalev Dec 3, 2025
1952552
feat: implement context edit modal for adding/editing context items
AlexMikhalev Dec 3, 2025
8b4a59c
refactor: fix context management flow - modal triggered from Chat view
AlexMikhalev Dec 3, 2025
8655abf
fix: auto-create conversation when adding context without active conv…
AlexMikhalev Dec 3, 2025
5a892f2
fix: increase context length limit and improve error messages
AlexMikhalev Dec 3, 2025
6705496
feat: add Editor scope to slash command system
AlexMikhalev Dec 23, 2025
152fe73
fix: simplify let-else patterns with ? operator in markdown parser
AlexMikhalev Jan 20, 2026
b978268
docs: add GPUI desktop implementation documentation and research arti…
AlexMikhalev Jan 20, 2026
a4ac094
test: add benchmark suite, test utilities, and visual tests
AlexMikhalev Jan 20, 2026
791c1de
chore: remove backup files
AlexMikhalev Jan 20, 2026
359519f
feat: enhance context service with async support and streaming types
AlexMikhalev Jan 20, 2026
b88c81f
refactor: improve code formatting in markdown-parser and automata_py
AlexMikhalev Jan 20, 2026
cc67fac
refactor: improve grep_app string formatting
AlexMikhalev Jan 20, 2026
ea07ce0
feat: add markdown-parser and LSP dependencies to desktop GPUI
AlexMikhalev Jan 20, 2026
d282923
feat: enhance slash command registry with autocomplete index
AlexMikhalev Jan 20, 2026
67bc38a
test: add comprehensive context manager unit tests
AlexMikhalev Jan 20, 2026
0177fbe
feat: add pagination support to SearchState
AlexMikhalev Jan 20, 2026
eddbba4
refactor: format and enhance view modules
AlexMikhalev Jan 20, 2026
b053e2b
refactor: format and enhance component modules
AlexMikhalev Jan 20, 2026
6939e73
refactor: format and enhance core desktop modules
AlexMikhalev Jan 20, 2026
a898d16
chore: update dependencies and examples
AlexMikhalev Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ linker = "riscv64-linux-gnu-gcc"
# Build configuration
[build]
# Default target for builds
target = "x86_64-unknown-linux-gnu"
# target = "x86_64-unknown-linux-gnu"

# Cross-compilation settings (commented out - let cross-rs handle Docker images)
# The cross-rs tool automatically manages Docker images for cross-compilation
Expand Down
59 changes: 59 additions & 0 deletions .claude/commands/scaffold-crate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
description: Generate Rust crate scaffold with tests, types, and docs
argument-hint: <crate-name>
---
# Scaffold Crate: $ARGUMENTS

1. Create crate directory: `crates/terraphim_$ARGUMENTS/`

2. **Generate Core Files:**

```
crates/terraphim_$ARGUMENTS/
├── Cargo.toml # Crate manifest
├── src/
│ ├── lib.rs # Main library entry
│ ├── error.rs # Error types (thiserror)
│ ├── types.rs # Type definitions
│ └── tests.rs # Unit tests module
└── README.md # Crate documentation
```

3. **Cargo.toml Template:**
- Edition 2024
- Workspace dependencies inheritance
- Feature flags for optional functionality
- Dev dependencies for testing

4. **Library Template (lib.rs):**
- Module declarations with rustdoc
- Public API exports
- Error type re-exports
- `#[cfg(test)]` test module

5. **Error Handling (error.rs):**
- Custom error enum with `thiserror`
- `Result<T>` type alias
- Error conversion traits

6. **Test Template (tests.rs):**
- `#[tokio::test]` for async tests
- Integration test structure
- No mocks - real implementations only
- Feature-gated live tests with `#[ignore]`

7. **Documentation:**
- Crate-level rustdoc in `lib.rs`
- README.md with:
- Crate overview
- Usage examples
- Configuration options
- API reference link

8. **Workspace Integration:**
- Add to `Cargo.toml` workspace members
- Update dependent crates if needed

9. **Git Integration:**
- Stage all files: `git add crates/terraphim_$ARGUMENTS/`
- Create feature branch: `git checkout -b feature/$ARGUMENTS`
106 changes: 106 additions & 0 deletions .docs/phase1-research-gpui-desktop-test-health.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Research Document: GPUI Desktop Test/Build Health

## 1. Problem Restatement and Scope
`cargo test -p terraphim_desktop_gpui` currently fails to compile and therefore cannot be used to confirm that the GPUI desktop crate is healthy.

Observed failure modes (from a local `cargo test -p terraphim_desktop_gpui` run):
- The test suite references public API items that do not exist (e.g., `terraphim_desktop_gpui::components`, `terraphim_desktop_gpui::rolegraph`, `views::search::SearchComponent`).
- There is at least one hard syntax error in a test file (`crates/terraphim_desktop_gpui/tests/ui_test_runner.rs`) that prevents compilation.
- Some tests import `ContextManager` from `terraphim_service::context`, but the service module appears to expose `TerraphimContextManager` (or a differently named type), causing unresolved import errors.

IN SCOPE
- Restoring a consistent contract between `crates/terraphim_desktop_gpui` public exports and the tests under `crates/terraphim_desktop_gpui/tests`.
- Fixing compile errors in tests and crate exports so `cargo test -p terraphim_desktop_gpui` compiles and runs.
- Determining which tests are “current” vs “legacy”, and adding clear gating (feature flags or module organization) so the test suite reflects the intended product state.

OUT OF SCOPE
- Implementing new GPUI features unrelated to test/build health.
- Large-scale refactors of GPUI UI/UX.
- Changing behavior of backend services beyond what’s required for API compatibility.

## 2. User & Business Outcomes
- Engineers can run a single command (`cargo test -p terraphim_desktop_gpui`) to verify GPUI desktop health.
- Reduced uncertainty: the test suite reflects the current architecture (GPUI views + state modules), not a previously drafted component framework.
- Faster iteration: fewer “paper tests” that fail due to stale imports and missing exports.

## 3. System Elements and Dependencies
Key elements involved in the failure:

- `crates/terraphim_desktop_gpui/src/lib.rs`
- Defines the crate’s public module surface.
- Currently has `pub mod components;` commented out, which makes `terraphim_desktop_gpui::components` missing at the crate root.

- `crates/terraphim_desktop_gpui/src/components/mod.rs`
- Exists and defines a “reusable components” architecture.
- Many submodules and re-exports are commented out (e.g., `testing`, `knowledge_graph`, `kg_search_modal`, etc.).
- This suggests the components system is intentionally disabled or partially incomplete.

- `crates/terraphim_desktop_gpui/src/views/search/mod.rs`
- Provides GPUI-native view types like `SearchView`, and exports `SearchInput`, `SearchResults`, `TermChips`.
- Does NOT provide `SearchComponent`/`SearchComponentConfig` referenced by tests.

- `crates/terraphim_desktop_gpui/tests/*.rs`
- Many tests reference the disabled “components” and other types that aren’t exported.
- At least one file contains a syntax error (type parameter parsing error) that blocks compilation.

- `crates/terraphim_service/src/context.rs`
- Provides a context manager type named `TerraphimContextManager`.
- Some GPUI desktop tests expect `ContextManager` to exist in this module.

External dependencies impacting build/test:
- `gpui`, `gpui-component`, macOS platform integration crates.

## 4. Constraints and Their Implications
- Must compile and run on macOS (darwin).
- Many GPUI dependencies are platform-specific; tests should avoid requiring a full UI runtime unless explicitly intended.

- “No mocks in tests” constraint.
- Tests that define `MockServiceRegistry` (seen in `crates/terraphim_desktop_gpui/tests/ui_integration_tests.rs`) are likely non-compliant with repository policy.
- We need to clarify whether this policy applies to this crate’s tests, or if these tests should be refactored to use real in-memory implementations.

- Keep scope disciplined.
- The fastest path to “everything works correctly” is to ensure the crate exports and the test suite align with the current architecture, not to resurrect an entire legacy component system.

- Stability vs breadth.
- Re-enabling `components` wholesale may balloon compile surface and introduce more failures.
- Feature-gating legacy components/tests may reduce blast radius while still letting the main crate test suite pass.

## 5. Risks, Unknowns, and Assumptions
UNKNOWNS
- Which test files are authoritative for current GPUI desktop behavior vs experimental/legacy.
- Why `components` was disabled in `src/lib.rs` (performance? compile breakages? ongoing migration?).
- Whether the repository intends `ContextManager` to be a stable alias for `TerraphimContextManager`.
- Whether CI expects these tests to run, or if they are local-only.

ASSUMPTIONS
- Primary health check is `cargo test -p terraphim_desktop_gpui` on macOS.
- The “current” GPUI UI implementation is the `views/*` + `state/*` path, and the “reusable components” subsystem is not yet productized.

RISKS
- Re-enabling the components system could introduce cascading compile failures and slow builds.
- Disabling tests without agreement could reduce coverage and hide regressions.
- Renaming or aliasing service APIs (e.g., `ContextManager`) may affect other crates.

De-risking steps (information gathering, not implementation):
- Categorize tests into: (a) compile + logic tests for current code, (b) legacy components tests, (c) experimental visual/UI runner code.
- Decide “definition of done” for ‘everything works’ (tests pass, build passes, app launches).

## 6. Context Complexity vs. Simplicity Opportunities
Current complexity drivers:
- Two parallel architectures appear present:
- GPUI-aligned `views/*` + `state/*`.
- A legacy/experimental `components/*` system that is partially disabled.
- Tests seem written against both (or against an earlier shape), creating broken contracts.

Simplicity opportunities:
- Establish one explicit public API surface for the crate (current GPUI views + state), and gate legacy components behind a feature flag.
- Make tests mirror that same split:
- Default tests validate current architecture.
- Legacy tests run only under an opt-in feature.

## 7. Questions for Human Reviewer
1. What is the definition of “everything works correctly” here: `cargo test` only, or also `cargo run -p terraphim_desktop_gpui` (manual UI smoke test)?
2. Should the `components/*` subsystem be considered legacy/experimental (feature-gated), or should it be restored as a first-class API?
3. Is it acceptable to move/feature-gate tests that currently rely on `MockServiceRegistry` given the “never use mocks” rule?
4. Do we want to preserve the older `ContextManager` name as an alias in `terraphim_service::context`, or should tests be updated to the new type name?
5. Which subset of tests must pass to declare GPUI desktop “green” (unit/integration only, or also visual runners)?
87 changes: 87 additions & 0 deletions .docs/phase1.5-quality-gpui-desktop-test-health.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Document Quality Evaluation Report

## Metadata
- **Document**: `.docs/phase1-research-gpui-desktop-test-health.md`
- **Type**: Phase 1 Research
- **Evaluated**: 2026-01-19

## Decision: GO

**Average Score**: 4.0 / 5.0
**Blocking Dimensions**: None

## Dimension Scores

| Dimension | Score | Status |
|-----------|-------|--------|
| Syntactic | 4/5 | Pass |
| Semantic | 4/5 | Pass |
| Pragmatic | 4/5 | Pass |
| Social | 3/5 | Pass |
| Physical | 5/5 | Pass |
| Empirical | 4/5 | Pass |

## Detailed Findings

### Syntactic Quality (4/5)
**Strengths:**
- Clear IN/OUT scope separation (Section 1).
- Consistent referencing of concrete files and symbols (Sections 3, 5).

**Weaknesses:**
- Some terms are used informally (e.g., “legacy”, “experimental”) without a crisp definition of each bucket (Section 6).

**Suggested Revisions:**
- [ ] Add explicit definitions for “current”, “legacy”, and “experimental” tests/modules.

### Semantic Quality (4/5)
**Strengths:**
- Accurately reflects observed errors: missing crate exports, syntax error, service type mismatch (Sections 1, 3).

**Weaknesses:**
- The exact cause of the `ui_test_runner.rs` parse error isn’t described beyond the compiler output.

**Suggested Revisions:**
- [ ] Add a short note in Section 1 naming the likely local cause (broken generics bounds / missing `>` in a where clause) without proposing a fix.

### Pragmatic Quality (4/5)
**Strengths:**
- Provides actionable next investigative steps and reviewer questions (Sections 5, 7).

**Weaknesses:**
- “No mocks in tests” conflict is identified but not scoped into a decision path (Section 4).

**Suggested Revisions:**
- [ ] Add a decision fork stating: either rewrite those tests to use real in-memory services, or feature-gate them as non-conforming until refactored.

### Social Quality (3/5)
**Strengths:**
- Explicit reviewer questions reduce ambiguity (Section 7).

**Weaknesses:**
- Stakeholder intent around the components system is unknown; different readers may infer different priorities (Sections 3, 6).

**Suggested Revisions:**
- [ ] Add a one-line “decision needed” statement: whether `components` is part of the supported API for the next release.

### Physical Quality (5/5)
**Strengths:**
- Follows the expected template and is easy to navigate.

### Empirical Quality (4/5)
**Strengths:**
- Reasonable density; sections are scannable and not overly verbose.

**Weaknesses:**
- Section 3 could be slightly more tabular for readability.

**Suggested Revisions:**
- [ ] Optional: convert Section 3 into a small table.

## Revision Checklist
- [ ] Define “current/legacy/experimental” buckets explicitly.
- [ ] Add a short semantic note about the nature of the `ui_test_runner.rs` parse error.
- [ ] Add an explicit decision fork for the “no mocks” constraint in tests.

## Next Steps
- Proceed to Phase 2 (Design) once you approve the research document’s scope and the decision points in Section 7.
81 changes: 81 additions & 0 deletions .docs/phase2-design-gpui-desktop-test-health.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Design & Implementation Plan: Restore GPUI Desktop Test/Build Health

## 1. Summary of Target Behavior
After this change:
- `cargo test -p terraphim_desktop_gpui` compiles and runs successfully on macOS.
- The default test suite validates the *current* GPUI architecture (`views/*` + `state/*` + `search_service`, etc.).
- Legacy/experimental tests and benchmark code that target the disabled `components/*` subsystem do not block default test runs.

## 2. Key Invariants and Acceptance Criteria
Invariants
- No changes to end-user behavior are required to reach “green tests”; focus is build/test correctness.
- Default test command must be stable: no optional features required, no manual steps.
- Avoid introducing or expanding mock-based testing; tests should use real in-memory types where feasible.

Acceptance Criteria
- `cargo test -p terraphim_desktop_gpui` exits 0.
- `cargo test -p terraphim_desktop_gpui --tests` exits 0.
- `cargo build -p terraphim_desktop_gpui` exits 0.

## 3. High-Level Design and Boundaries
Boundary decision: split the crate/test surface into two explicit layers.

- “Current GPUI App Surface” (default)
- Crate exports: `app`, `views`, `state`, `search_service`, `slash_command`, `markdown`, etc.
- Tests: should import these modules and exercise real behavior.

- “Legacy Reusable Components” (opt-in)
- Crate exports: `components` (and its dependent submodules) behind a feature flag, OR kept internal.
- Tests: any tests that reference `terraphim_desktop_gpui::components::*` are moved behind the same feature, or are rewritten to use the current surface.

We do NOT attempt to fully revive all commented-out submodules in `crates/terraphim_desktop_gpui/src/components/mod.rs` unless explicitly required.

## 4. File/Module-Level Change Plan

| File/Module | Action | Before | After | Dependencies |
|---|---|---|---|---|
| `crates/terraphim_desktop_gpui/src/lib.rs` | Modify | `components` disabled at crate root | Add feature-gated export: `#[cfg(feature = "legacy-components")] pub mod components;` (or keep disabled and gate tests) | Cargo features |
| `crates/terraphim_desktop_gpui/Cargo.toml` | Modify | No explicit test/legacy feature split | Add `legacy-components` feature; optionally add `legacy-benches` feature | Cargo features |
| `crates/terraphim_desktop_gpui/tests/ui_test_runner.rs` | Fix | Syntax error prevents compilation | Fix the generics/where-clause syntax so tests compile | Rust syntax |
| `crates/terraphim_desktop_gpui/tests/*components*_tests.rs` | Modify | Imports `terraphim_desktop_gpui::components` (missing) | Either (A) gate entire file with `#![cfg(feature = "legacy-components")]` or (B) rewrite tests to current surface | Feature gating decision |
| `crates/terraphim_desktop_gpui/tests/*journey*test*.rs` | Modify | Imports `ContextManager` from `terraphim_service::context` (missing) | Update imports to `TerraphimContextManager` OR add a compatibility `pub type ContextManager = TerraphimContextManager;` in `terraphim_service::context` | Cross-crate API |
| `crates/terraphim_desktop_gpui/benches/*` | Modify | Bench files contain compile errors; benches might be built by some workflows | Gate benches behind feature OR fix them; ensure default `cargo test` not impacted | Criterion, types |

## 5. Step-by-Step Implementation Sequence
1. Establish intended “default surface” and “legacy surface” in code via Cargo features.
2. Fix the hard syntax error in `crates/terraphim_desktop_gpui/tests/ui_test_runner.rs` so the test crate can compile.
3. Resolve the `ContextManager` naming mismatch:
- Preferred: add a backward-compatible alias in `crates/terraphim_service/src/context.rs`.
- Alternative: update all tests to the new type name.
4. Make `components` tests non-blocking:
- Option A (fastest, smallest blast radius): gate those tests behind `legacy-components`.
- Option B (more coverage now): re-export `components` from crate root and ensure minimal required submodules compile; gate the rest.
5. Resolve `views::search::SearchComponent` mismatches:
- Either gate tests that reference `SearchComponent`, or update them to use `SearchView` (current API).
6. Run verification commands:
- `cargo build -p terraphim_desktop_gpui`
- `cargo test -p terraphim_desktop_gpui`
- If legacy tests are kept: `cargo test -p terraphim_desktop_gpui --features legacy-components` (optional).

## 6. Testing & Verification Strategy

| Acceptance Criteria | Test Type | Test Location |
|---|---|---|
| `cargo test -p terraphim_desktop_gpui` passes | Build + integration | `crates/terraphim_desktop_gpui/tests/*.rs` (default set) |
| Current search view compiles and links | Build | `crates/terraphim_desktop_gpui/src/views/search/mod.rs` |
| Context flow tests use correct service type | Integration | `crates/terraphim_desktop_gpui/tests/complete_user_journey_test.rs`, `crates/terraphim_desktop_gpui/tests/end_to_end_flow_test.rs` |
| Legacy components tests do not block default run | Build gate | `#![cfg(feature = "legacy-components")]` on legacy files |

## 7. Risk & Complexity Review

| Risk | Mitigation | Residual Risk |
|---|---|---|
| Feature-gating hides tests | Keep an explicit opt-in `legacy-components` test run documented; add CI later if desired | Some drift possible |
| Re-exporting `components` increases compile surface | Prefer gating tests first; only re-export when needed | Potential new compile errors |
| “No mocks in tests” conflict | Refactor mock registry tests to use real in-memory registry implementations OR gate them as legacy | May require more work to keep coverage |
| Cross-crate alias impacts others | Use a type alias only; avoid behavior change | Low |

## 8. Open Questions / Decisions for Human Review
1. Should `components` be restored as a supported API now, or treated as `legacy-components` feature-only?
2. Are we allowed to add `pub type ContextManager = TerraphimContextManager;` for backwards compatibility in `crates/terraphim_service/src/context.rs`?
3. For “everything works”: is passing `cargo test -p terraphim_desktop_gpui` sufficient, or do you also want a manual `cargo run -p terraphim_desktop_gpui` smoke test?
Loading
Loading