waaraawa_ByteGrid/roadmap.md
waaraawa cbba30bb72 feat(core): improve legendColumns with row-major order
- Change legend layout from column-major to row-major order
  - Fields now fill left-to-right, then top-to-bottom
  - More intuitive for users (e.g., 4 fields + 3 cols = 3-1 layout)
  - Fix bottom position width calculation for multi-column legends
  - totalWidth now accounts for legend width (200px per column)
  - Add tests for 3-column layout with 6 fields
2025-10-14 13:16:36 +09:00

6.9 KiB

ByteGrid Development Roadmap

Last Updated: 2025-10-14 Current Phase: Phase 2 (Core Features)


Phase 1: MVP COMPLETED

Goal: Basic structure visualization with manual field definition

Completed Features

  • Project structure setup (monorepo with core + plugin)
  • Basic type definitions (ByteGridConfig, Field, LayoutBlock)
  • YAML parser with js-yaml
  • Field validation (overlap detection, range checking)
  • Simple layout engine (single row)
  • Basic SVG renderer
  • Obsidian plugin integration
  • Test infrastructure (Jest)

Status: All core functionality implemented


Phase 2: Core Features 🚧 IN PROGRESS

Goal: Robust visualization with advanced layout options

Completed Features

  • Multi-row layout support
  • Grid lines rendering
  • Color system (9 predefined colors)
  • Bitfield visualization (sub-byte fields)
  • Bit-unit layout mode (layoutUnit: bit)
  • Suffix notation (32b, 4B)
  • Legend position control (legendPosition: right/left/bottom/none)
  • Footer visibility control (showFooter: true/false)
  • Comprehensive test coverage (114 tests)

In Progress 🔄

  • Color schemes (dark, light modes)
  • Row/column labels customization
  • Cell padding/spacing options

Planned Features 📋

  • Hex dump display (showHexDump: true)
  • Field description tooltips
  • Value display formatting (hex, decimal, binary)
  • Endianness indicators

Target Completion: Q4 2025


Phase 3: Interactive Features 📅 PLANNED

Goal: Rich user interaction and real-time visualization

Features

  • Interactive tooltips on hover
    • Field name, type, offset
    • Description and value
    • Bit range for bitfields
  • Field highlighting
    • Click to highlight field
    • Show all related blocks
    • Copy field info to clipboard
  • Zoom controls
    • Zoom in/out
    • Pan/scroll for large structures
  • Search/filter fields
    • Search by name or type
    • Filter by color or category
  • Export options
    • Export as SVG file
    • Export as PNG image
    • Export as C struct definition
    • Copy as Markdown table

Target Start: Q1 2026


Phase 4: Advanced Features 📅 FUTURE

Goal: Binary file integration and advanced analysis

Binary File Support

  • Binary file parser (binaryParser.ts)
    • Read binary files
    • Auto-populate field values
    • Endianness handling
    • Generate hex dump
  • File format templates
    • WAV_HEADER (audio files)
    • ELF_HEADER (executables)
    • TCP_HEADER (network packets)
    • PNG_HEADER (image files)
    • Custom template system

Structure Analysis

  • Structure comparison (comparison.ts)
    • Side-by-side view
    • Overlay view
    • Diff highlighting
  • Padding analysis
    • Auto-detect padding bytes
    • Show memory waste
    • Suggest optimizations
  • Alignment visualization
    • Show alignment boundaries
    • Detect misaligned fields
    • Platform-specific rules

Target Start: Q2 2026


Phase 5: Performance & Scale 📅 FUTURE

Goal: Handle large structures and optimize rendering

Performance Optimization

  • Rendering cache (cache.ts)
    • Hash-based cache keys
    • TTL-based expiration
    • localStorage persistence
  • Virtual scrolling
    • Lazy render large structures
    • Only render visible rows
    • Smooth scrolling
  • Pagination
    • Break large structures (>1000 bytes)
    • Page navigation controls
    • Jump to offset

Large Structure Support

  • Performance benchmarks
    • 1KB: < 100ms
    • 10KB: < 500ms
    • 100KB: < 2s (with pagination)
  • Memory optimization
    • Efficient data structures
    • DOM node recycling
    • Progressive rendering

Target Start: Q3 2026


Phase 6: Extensibility 📅 FUTURE

Goal: Plugin system and customization

Custom Extensions

  • Type system extensions
    • Custom type definitions
    • Type aliases
    • Nested structures
    • Union types
  • Custom color schemes
    • User-defined palettes
    • Theme import/export
    • Dark/light mode auto-switch
  • Render hooks
    • Pre-render processing
    • Post-render modifications
    • Custom SVG elements
  • Plugin API
    • Register custom parsers
    • Add custom validators
    • Extend layout engine

Developer Tools

  • Debug mode
    • Show internal state
    • Performance metrics
    • Error details
  • Documentation generator
    • Auto-generate type docs
    • Example templates
    • Interactive playground

Target Start: Q4 2026


Current Sprint (October 2024)

Completed This Sprint

  • Bit-unit layout implementation
  • Legend position options (right, left, bottom, none)
  • Footer visibility control
  • Fix legend overlapping issues
  • Add comprehensive tests for new features
  • Documentation updates

Next Sprint Goals (November 2024)

  1. Color Schemes (Priority: High)

    • Implement dark and light color schemes
    • Add colorScheme option to config
    • Update color constants
    • Add tests
  2. Hex Dump Display (Priority: Medium)

    • Add showHexDump option
    • Render hex values below grid
    • Format with proper spacing
    • Handle large structures
  3. Documentation (Priority: High)

    • Update CLAUDE.md with new options
    • Create user guide in docs/
    • Add more examples
    • API reference cleanup

Known Limitations & Future Improvements

Current Limitations

  1. YAML Line Numbers

    • Error messages show field index, not line number
    • Improvement: Custom YAML parser with position tracking
  2. Cache Persistence

    • Cache cleared on session end
    • Improvement: localStorage persistence (Phase 5)
  3. Type System

    • No custom type definitions
    • No nested structures
    • Improvement: Type alias system (Phase 6)
  4. Bit Ordering

    • Assumes MSB-first
    • Improvement: Add bitOrder: msb/lsb option
  5. Layout Constraints

    • Fixed cell sizes per visualization
    • Improvement: Responsive cell sizing

Contributing

See CONTRIBUTING.md for guidelines on:

  • Proposing new features
  • Submitting pull requests
  • Testing requirements
  • Code style guidelines

Versioning Strategy

Following Semantic Versioning (MAJOR.MINOR.PATCH):

  • MAJOR: Breaking changes to public API
  • MINOR: New features, backward compatible
  • PATCH: Bug fixes, performance improvements

Planned Releases

  • v0.2.0 - Phase 2 completion (Color schemes, hex dump)
  • v0.3.0 - Phase 3 start (Interactive features)
  • v1.0.0 - Production ready (All core features stable)
  • v2.0.0 - Phase 4-5 (Binary files, performance)

Feedback & Priorities

Feature priorities may change based on:

  • User feedback and requests
  • Community contributions
  • Technical dependencies
  • Performance considerations

To suggest features or vote on priorities:

  • Open an issue on GitHub
  • Join discussions in the community
  • Contribute code or documentation

Document Version: 1.0 Next Review: December 2024