Description
Building on the FileViewer architecture established in the recent refactoring, add support for viewing additional file formats beyond JSON/NDJSON.
Background
The codebase has been refactored to separate generic file viewing logic (FileViewer) from format-specific rendering (JsonTreeViewer). This architecture makes it straightforward to add new file format viewers.
Proposed File Formats
Priority 1 - High Value
- CSV/TSV - Tabular data display with column headers, sorting, filtering
- XML - Tree-based viewer similar to JSON, with attribute support
- YAML - Tree viewer with YAML-specific syntax handling
Priority 2 - Nice to Have
- TOML - Config file support
- Plain Text - Basic text viewer with syntax highlighting
- Markdown - Rendered preview
Implementation Plan
Each format viewer should:
- Implement a dedicated viewer (e.g.,
CsvTableViewer, XmlTreeViewer)
- Integrate with
FileViewer via format detection
- Support common operations: search, copy, export
- Maintain consistent UI/UX with existing JSON viewer
Technical Notes
Current architecture:
FileViewer (generic parent) - handles loading, caching, selection
JsonTreeViewer (JSON-specific) - renders JSON tree structure
ViewerState (shared) - common state across viewers
New viewers should follow this pattern and reuse the existing infrastructure.
Related Issues
Acceptance Criteria
Description
Building on the FileViewer architecture established in the recent refactoring, add support for viewing additional file formats beyond JSON/NDJSON.
Background
The codebase has been refactored to separate generic file viewing logic (FileViewer) from format-specific rendering (JsonTreeViewer). This architecture makes it straightforward to add new file format viewers.
Proposed File Formats
Priority 1 - High Value
Priority 2 - Nice to Have
Implementation Plan
Each format viewer should:
CsvTableViewer,XmlTreeViewer)FileViewervia format detectionTechnical Notes
Current architecture:
FileViewer(generic parent) - handles loading, caching, selectionJsonTreeViewer(JSON-specific) - renders JSON tree structureViewerState(shared) - common state across viewersNew viewers should follow this pattern and reuse the existing infrastructure.
Related Issues
Acceptance Criteria