Overview
WikiOnitViewer displays ongoing work sessions with simple, chronological organization. Each OnIt session represents active work that’s “on it” - capturing ideas, exploration, and progress in real-time.Architecture
The viewer follows a flat file structure with timestamp-based naming, using a 6-pattern parser for maximum compatibility across historical naming conventions.Data Model
Each session includes parsed timestamp, session name, and inferred status based on modification time. OnitSession Interface:date: YYYY-MM-DD formattime: HH:MM or HH:MM:SS (with seconds)sessionName: Extracted from filenamepattern: Which of 6 patterns matched (1-6)sortKey: Normalized timestamp for sortingstatus: active, completed, or archived
- Active: Modified within last 24 hours (green)
- Completed: In WIP folder, not recently modified (blue)
- Archived: Graduated to wiki folder (gray)
Filename Patterns
The viewer uses an external 6-pattern parser achieving 100% coverage of 1,873 historical files:| Pattern | Format | Coverage |
|---|---|---|
| 1 | YYYY-MM-DD-HH-MM-SS-name.md | 39.1% |
| 2 | YYYY-MM-DD-HH-MM-SS.md | 1.4% |
| 3 | YYYY-MM-DD-HH-MM-name.md | 31.7% |
| 4 | YYYY-MM-DD-name.md | 1.5% |
| 5 | NN-TOPIC-YYYY-MM-DD-HH-MM.md | 0.4% |
| 6 | TOPIC-NAME.md (fallback) | 25.6% |
Rendering System
The render system generates a flat accordion list with status-based color coding. Main Components:- Header: Shows “OnIt (N)” with session count
- Session List: Chronological accordion items (newest first)
- Status Badges: Color-coded status indicators
- Empty State: Contextual help for WIP vs Wiki modes
- Last 24 hours: Show time (e.g., “14:30”)
- Last 48 hours: Show “yesterday”
- Older: Show full date (YYYY-MM-DD)
Interaction Patterns
Two main interaction types:WIP/Wiki Toggle
Switches between work-in-progress sessions and archived sessions by changing the filesystem path.Accordion Expansion
Click session header to load and display markdown content inline. Content is cached after first load for instant re-expansion. Accordion States:- Collapsed (initial): Content hidden
- Loading: Shows “Loading…” message
- Expanded: Renders full markdown with sticky header
- Cached: Preserves loaded content when collapsed
State Management
Minimal state design following SMPC principles: State Properties:sessions: OnitSession[] (only custom state)- Inherited from base: container, projectSlug, category, isWip, settings
- Initialize → Load sessions → Render → Attach listeners
- Toggle → Update isWip → Refresh (reload + re-render)
- Refresh → Replace sessions array → Full DOM re-render
Comparison with Prepare Viewer
| Feature | OnIt | Prepare |
|---|---|---|
| Lines of code | 350 | 789 |
| Data structure | Flat files | Folders + files |
| Status states | 3 | 4 (projects) |
| Display modes | 1 (list) | 2 (cards + list) |
| Filename patterns | 6 | 1 |
| Progress tracking | No | Yes (checkboxes) |
THE CENTER
Visibility enables the Human-AI feedback loop
Technical Credibility
Built on Rust IPC, Tauri commands, and xterm.js rendering. Uses external parser module for filename compatibility. Inherits shared infrastructure from WikiBaseViewer abstract class.