Skip to main content

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

All Wiki viewers inherit document loading, graduation workflows, and accordion rendering. The same pattern applies to Git viewers through GitBaseViewer.

IPC Command Consistency

IPC Parameter Patterns

Pattern 1: Path Resolution All commands accept path: 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:
Pattern 3: Optional Parameters Rust uses Option<T> for optional fields, allowing frontend to omit parameters.

Tab Management Integration

Dependency Graph

All viewers are decoupled - they import only their base class and IPC. No viewer imports another viewer directly.

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

Each mode has its own render function with different field selections.

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

This ensures users always see the most current state of the repository without stale data.

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
Pattern 2: IPC Boundary
  • Purpose: Isolate frontend from backend implementation
  • Implementation: invoke() calls to Rust commands
  • Benefits: Backend changes don’t require frontend changes
Pattern 3: Virtual Path Tab Reuse
  • Purpose: Avoid duplicate tabs for same viewer/context
  • Implementation: Unique path patterns per viewer type
  • Benefits: Memory efficiency, consistent state
Pattern 4: Dynamic Import
  • 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)