Cross-Viewer Integration
The Git and Wiki viewer systems achieve complete decoupling through shared base classes and IPC boundaries. Viewers communicate through inheritance and events, never direct imports.Base Class Hierarchy
GitBaseViewer.
IPC Command Consistency
IPC Parameter Patterns
Pattern 1: Path Resolution All commands acceptpath: string as first parameter. The Rust backend resolves protocol paths internally via resolve_protocol_path_internal().
Pattern 2: Automatic Case Conversion
TypeScript camelCase automatically converts to Rust snake_case:
Option<T> for optional fields, allowing frontend to omit parameters.
Tab Management Integration
Dependency Graph
Heatmap Color System
The heatmap visualization translates temporal data (commit ages) into immediate visual perception. Humans instantly identify “hot” areas of recent activity vs “cold” stable code.HSL Color Space Architecture
Age-to-Color Pipeline
Visual Perception Mapping
Blame Gutter Modes
The blame viewer supports three distinct gutter display modes with different information densities.Mode Comparison
Mode Implementation
Information Density Matrix
Fresh Diff Computation
Diff viewer always computes fresh diffs via IPC, never using cached commit data. Each view request triggers a new Git computation.Data Flow
Architectural Patterns
Four core patterns enable the cross-viewer system: Pattern 1: Abstract Base Class- Purpose: Share common functionality without coupling
- Implementation:
WikiBaseViewer,GitBaseViewer - Benefits: Single point of change, subclass focus on specific logic
- Purpose: Isolate frontend from backend implementation
- Implementation:
invoke()calls to Rust commands - Benefits: Backend changes don’t require frontend changes
- Purpose: Avoid duplicate tabs for same viewer/context
- Implementation: Unique path patterns per viewer type
- Benefits: Memory efficiency, consistent state
- Purpose: Load viewer code only when needed
- Implementation:
import()in viewerMap/switch statement - Benefits: Faster initial load, reduced memory footprint
THE CENTER
Cross-viewer integration and heatmap systems directly enable the Human ◈ AI feedback loop: TRANSPARENCY Complete Q.E.D proofs make all architectural claims verifiable. Humans can see exactly what was proven vs refuted. VISUALIZATION ASCII diagrams and code graphs present complex relationships in human-understandable form. Color systems translate temporal data into immediate perception. FEEDBACK The gap registry provides actionable items. Humans can direct AI to address specific gaps. Shared patterns allow improvements to propagate across all viewers. Integration is THE CENTER’s infrastructure - the plumbing that makes the Human ◈ AI feedback loop flow smoothly.Verified Claims
- Cross-viewer decoupling through base classes (Q.E.D)
- IPC parameter consistency across all commands (Q.E.D)
- HSL age-based color mapping (Q.E.D)
- Blame gutter three modes implementation (Q.E.D)
- Fresh diff computation without caching (Q.E.D)