Commit graph

20 commits

Author SHA1 Message Date
林 駿甫 (Shunsuke Hayashi)
ec1d25887e [文書] Playbook v4: ビジョン全38要素をカバーする完全版
v3 から追加:
  Sprint 3: 記憶アタッチメント (#58) + ドリーミング (#59) + Web ダッシュボード (#63)
  Sprint 4: シータサイクル (#60) + Obsidian (#62)
  Sprint 2: Bus データパス統合 (#65) + ブランチ戦略 (#64)

新規 Issue:
  #64: 並列Codexブランチ戦略 (worktree + PR)
  #65: Bus データパス統合

ビジョン達成度推移:
  現在 32% → Sprint1後 38% → Sprint2後 47% → Sprint3後 72% → Sprint4後 93%

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:54:20 +09:00
Shunsuke Hayashi
6d5b55ad74 fix: TUIウィジェットの表示を修正
- diff表示の修正
- historyリストの修正
- markdown表示の修正

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 05:08:11 +09:00
Shunsuke Hayashi
48dfa915c7 feat: Add hooks, workflow, MCP support and core modules
Phase 2: Hooks System
- Event-driven execution with HookEvent/HookAction types
- HookManager for registration and execution

Phase 3: Multi-Agent Workflow
- Workflow orchestration with dependency graphs
- WorkflowStep with conditions and retry support

Phase 4: MCP (Model Context Protocol) Support
- McpServer for external tool servers
- McpManager for multiple server management

Also includes core modules: cache, error_policy, feature_flags,
git, logger, plugin, retry, rules

662 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:37:14 +09:00
Shunsuke Hayashi
25d358f96e feat: Add config system, agent mode, and session management
- Add comprehensive Config system with TOML support (~/.miyabi/config.toml)
- Add Agent module for autonomous task execution with tool approval
- Add Session management for conversation persistence
- Extend CLI with new commands: init, sessions, agent, version
- Add CLI flags: --model, --max-tokens, --thinking, --config, --session
- Fix all clippy warnings (16 → 0)
- Improve code quality with collapsible pattern matching

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 22:22:11 +09:00
Shunsuke Hayashi
af281f1ed0 feat: Integrate MainView into App for complete TUI support
- Update App to use MainView for rendering and key handling
- Enable all integrated components: ChatComposer, CommandPopup, HelpViewer, etc.
- Add keyboard shortcuts: Ctrl+P (commands), F1 (help), Ctrl+B (sidebar)
- Support streaming mode with proper UI updates
- Add execute_command for command handling

Closes #30

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 19:28:37 +09:00
Shunsuke Hayashi
e0207e8649 feat: Add comprehensive test coverage and fix tests
Sprint 9-10 changes:
- Add 42 tests for help.rs (HelpViewer, CheatSheet, QuickRef)
- Add 55 tests for resume_picker.rs (SessionEntry, ResumePicker, SessionManager)
- Add 73 tests for ui.rs (colors, styles, layout, Modal, Toast, Breadcrumb, etc.)
- Fix markdown_stream tests (proper markdown paragraph separation)
- Add help.rs and ui.rs modules to miyabi-tui

Total: 585 tests passing across all crates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 19:24:05 +09:00
Shunsuke Hayashi
2f6b8ed089 test: Add comprehensive tests for overlay components
Sprint 8 - Test coverage for UI overlays:

Issue #33 - approval_overlay.rs (38 tests):
- RiskLevel (color, label, icon)
- ApprovalRequest (builder pattern)
- ApprovalOverlay (show/hide, key handling, queue)
- ApprovalBuilder (shell_command, file_write, file_edit)
- BatchApproval (approve/reject, mixed approvals)

Issue #34 - command_popup.rs (34 tests):
- Command (creation, builder methods)
- CommandPopup (show/hide, navigation, filtering)
- fuzzy_match algorithm
- CommandCategory and CommandBuilder

Issue #35 - pager_overlay.rs (39 tests):
- PagerContent (Plain, Markdown, Code, Styled)
- PagerOverlay (scrolling, search, key handling)
- PagerBuilder (help, log, code)

Total tests: 331 (111 new tests added)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 19:06:48 +09:00
Shunsuke Hayashi
81027daa4a fix(views): Fix compilation errors and add notification tests
Sprint 7 changes:
- Fixed 25 compilation errors in views.rs:
  - Fixed API mismatches for Spinner, Breadcrumb, StatusBar, StatusItem
  - Fixed PagerOverlay content method usage
  - Fixed render method signatures for overlays
  - Fixed ApprovalAction and ResumePickerAction enum variants
  - Fixed ChatComposer method names (get_input vs get_content)
  - Fixed Layout split return type compatibility
- Added 60 tests for notification.rs covering:
  - NotificationPriority (3 tests)
  - Notification (8 tests)
  - NotificationAction (3 tests)
  - NotificationPanel (15 tests)
  - Banner (5 tests)
  - AlertType, AlertButton (4 tests)
  - Alert (12 tests)
  - NotificationCenter (11 tests)

Total tests: 220

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:58:31 +09:00
Shunsuke Hayashi
2f91bfa8ce test(shimmer): Add comprehensive test suite
Add 34 tests covering shimmer animation components:
- ShimmerState: creation, duration, looping, progress, reset
- SkeletonLoader: creation, widths, effect, colors
- Spinner: creation, style, label, color, frames
- ProgressBar: creation, clamp, label, show_percent, chars
- TypingIndicator: creation, label
- Countdown: creation, label, remaining
- LoadingState: is_loading, is_complete, is_error
- LoadingOverlay: creation, show, show_progress, hide, complete, error
- blend_colors: RGB blending, non-RGB fallback

Note: Tests cannot be run due to pre-existing compilation errors
in views.rs which has API mismatches with other modules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:49:46 +09:00
Shunsuke Hayashi
f1dd7d4164 test(textarea): Add comprehensive test suite and fix bug
Add 29 tests covering TextArea functionality:
- Basic operations: creation, text manipulation, char insertion
- Cursor movement (left/right/up/down, home/end, word navigation)
- Selection and clipboard (copy/cut/paste)
- Undo/redo operations
- Line deletion (word backward, to line start/end)
- Configuration (placeholder, tab width, viewport)
- Unicode support and multiline editing

Fix overflow bug in delete_to_line_start where undo position
was calculated after text modification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:47:52 +09:00
Shunsuke Hayashi
2da467f877 test(chat_composer): Add comprehensive test suite
Add 23 tests covering ChatComposer functionality:
- Basic operations: creation, char insertion, backspace, delete
- Submit and cancel actions
- Multiline input with Shift+Enter
- Cursor movement (left/right, home/end)
- Command history navigation (up/down arrows)
- Command mode (/ prefix)
- Ctrl key shortcuts (u=clear, k=kill, w=delete word)
- Unicode character support
- Placeholder and max_history configuration
- Focus state management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:44:15 +09:00
Shunsuke Hayashi
b3898dc45e feat(diff_viewer): Add scrollable diff view with navigation
Integrate ScrollState for viewport-based diff navigation.
- Add scroll_up, scroll_down, page_up, page_down methods
- Add scroll_to_top, scroll_to_bottom, scroll_to_line methods
- Add visible_lines() for viewport-based rendering
- Add scroll_offset, scroll_percentage, is_at_top, is_at_bottom getters
- Set viewport_height to control scroll behavior
- Update scroll state total_lines on parse
- Add 9 tests for scroll functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:42:44 +09:00
Shunsuke Hayashi
384867632c feat(diff_viewer): Add syntax highlighting for diff content
Integrate SyntaxHighlighter to provide code-aware coloring in diff views.
- Add enable_syntax_highlighting option to DiffViewerOptions
- Extract file extension from diff file paths for language detection
- Apply syntax highlighting to addition/deletion/context lines
- Preserve diff background colors while using syntax colors for text
- Add 7 new tests for syntax highlighting functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:39:27 +09:00
Shunsuke Hayashi
4755023c43 feat(tui): add cursor and scroll position tracking
- Add CursorPosition struct for tracking line/column
- Add ScrollState struct with viewport management:
  - scroll_up/down, page_up/down
  - scroll_to_top/bottom
  - Auto-scroll on new content
  - Scroll percentage calculation
  - Viewport height configuration

- Update MarkdownStream to use new scroll system
- Track cursor position on content push
- Update render() to update total_lines
- Export ScrollState and CursorPosition from lib.rs
- Add 6 tests for scroll and cursor functionality

Closes #13

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:27:48 +09:00
Shunsuke Hayashi
04f7bc897e feat(tui): implement syntax highlighting for code blocks
Add syntax.rs with syntect integration:
- SyntaxHighlighter with configurable themes
- Support for Rust, Python, JavaScript, TypeScript, etc.
- Language alias normalization (js→JavaScript, py→Python)
- highlight_code() and render_code_block() helpers
- Global syntax/theme sets with lazy loading
- Fallback for unknown languages
- 10 unit tests

Dependencies added: syntect, once_cell

Closes #12

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:10:39 +09:00
Shunsuke Hayashi
9f869f93fa feat(tui): implement diff visualization with colors and indicators
Add diff_viewer.rs with enhanced diff display:
- DiffColors with GitHub-inspired color scheme (#2ea043, #f85149)
- DiffViewer widget with configurable options
- Line number columns (old/new)
- Gutter indicators (+/-)
- File headers with path display
- Multiple color schemes (default, minimal, high-contrast)
- Helper functions render_diff() and render_diff_minimal()
- 11 unit tests

Closes #16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:03:27 +09:00
Shunsuke Hayashi
e24069ca79 feat(tui): implement incremental markdown parser with pulldown-cmark
Add markdown_parser.rs with:
- MarkdownParser with caching for efficient re-rendering
- pulldown-cmark integration with full options
- EventRenderer for converting markdown to styled Ratatui lines
- Support for headings, code blocks, lists, emphasis, links
- Blockquotes, horizontal rules, task lists
- Graceful handling of incomplete/malformed markdown
- 14 unit tests covering all features

Dependencies added: pulldown-cmark

Closes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:01:43 +09:00
Shunsuke Hayashi
bed65b23b2 feat(tui): implement DiffRender for git diff parsing
Add diff_render.rs with complete unified diff parsing support:
- DiffLineType enum (Context, Addition, Deletion, HunkHeader, FileHeader)
- DiffLine, DiffHunk, FileDiff structs for structured representation
- DiffRender with parse() and render() methods
- Line number tracking for both old/new files
- Styled Ratatui Line output with syntax highlighting
- 5 comprehensive unit tests

Closes #15

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:53:44 +09:00
Shunsuke Hayashi
e096f5eea8 feat: Implement MarkdownStream core structure (#10)
- Add StreamState enum (Idle, Streaming, Complete)
- Add StreamBuffer for content accumulation
- Add MarkdownStream with state management
- Implement push_str() for streaming chunks
- Implement render() returning Ratatui Lines
- Add basic markdown styling (headers, code, lists)
- Add cursor indicator during streaming
- Add comprehensive unit tests (5 tests)

Closes #10

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:50:30 +09:00
Shunsuke Hayashi
00d5d4d4e9 chore: Initialize Miyabi project with full planning
- Add .claude/ configuration (agents, commands, prompts, templates)
- Add comprehensive documentation:
  - WBS.md - Work Breakdown Structure
  - SPRINT_PLANNING.md - 4-sprint detailed plan
  - OPERATION_PLAN.md - Execution procedures
  - PRODUCT_SPEC.md - Product requirements
  - PREPARATION_OPS.md - Pre-sprint checklist
- Add PlantUML diagrams (wbs-diagram, gantt-chart)
- Configure Miyabi (.miyabi.yml)
- Set up Rust workspace structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:45:08 +09:00