Repository navigation
feat: Add test-view command for UI component testing - #111
Merged
Merged
Conversation
Add new infer test-view command that allows direct testing and iteration of UI components in the terminal without requiring chat mode. Features: - Test approval view component with sample tool data - Test diff renderer with Edit and MultiEdit tool previews - Customizable component dimensions via CLI flags - Sample content configuration for testing different scenarios - Beautiful Tokyo Night theme styling with ANSI colors - Multiple test cases showing different component states This addresses the need for rapid UI development iteration mentioned in issue #108, allowing pixel-by-pixel styling adjustments. Co-authored-by: Eden Reich <[email protected]>
Contributor
Author
|
@claude CI is failing. |
Contributor
|
Claude finished @edenreich's task —— View job CI Failure Fixed! ✅
Issues Resolved:
Implementation Analysis: The Commit: 06cd7fb - Fixed all markdownlint issues The CI should now pass! 🎉 |
- Fix line length exceeding 120 characters - Add missing blank lines around headings and lists - Remove duplicate code block closing tags - Ensure all markdownlint rules pass Co-authored-by: Eden Reich <[email protected]>
- Implemented a new diff rendering system for tools, allowing for better visualization of changes made during edit operations. - Added a `DiffFormatter` interface and `DiffInfo` struct to standardize diff information across tools. - Updated `EditTool`, `MultiEditTool`, and `WriteTool` to utilize the new diff rendering system, displaying diffs in a git-style format. - Improved the `ApprovalComponent` to handle scrolling and content wrapping more effectively, ensuring a better user experience. - Refactored existing diff generation logic into a dedicated `GitDiffComponent`, providing clearer separation of concerns. - Enhanced color formatting for added, removed, and unchanged lines in diffs for better readability. - Updated keybindings to ensure scrolling actions are available in the approval view. Signed-off-by: Eden Reich <[email protected]>
- Updated expected fields in TestWriteTool_Definition to include new parameters. - Improved error messages for missing required parameters in TestWriteTool_Validate. - Removed unnecessary validation tests for parameters that are no longer required. - Simplified error handling in TestWriteTool_Execute and TestWriteTool_ValidateDisabled. - Added validatePathResult helper function to streamline path security checks. Enhance approval view component styling - Changed selected option foreground color to black for better visibility. - Reverted unselected option background color to use shared success color. - Cleaned up rendering logic in renderFooter and assembleContent methods for improved readability. Remove diff_formatter and git_diff components - Deleted diff_formatter.go and git_diff.go as they were redundant. - Consolidated diff rendering logic into diff_renderer.go for better maintainability. Improve diff rendering with enhanced color support - Updated DiffRenderer to use lipgloss for colored output. - Added new styles for additions, deletions, headers, and context lines. - Refactored RenderEditToolArguments and RenderMultiEditToolArguments to utilize new styles. - Enhanced RenderDiff method to handle new file and deleted file scenarios with appropriate chunk headers. Update shared colors for diff overlays - Introduced new vibrant background colors for added and removed lines in diffs. - Adjusted CreateDiffAddedLine and CreateDiffRemovedLine functions to utilize new background colors. Signed-off-by: Eden Reich <[email protected]>
…roved UI consistency Signed-off-by: Eden Reich <[email protected]>
…ation - Updated FormatForUI method to display a summary of edits when applicable, including file name and number of edits. - Improved FormatForLLM method to handle git diff rendering more effectively. - Refactored GetDiffInfo to streamline the process of simulating edits and generating diff information. - Added comprehensive unit tests for FormatForUI to cover various scenarios including successful edits, failed edits, and empty edits. - Enhanced DiffRenderer to improve styling and rendering of diffs, including new methods for rendering new and deleted file content. - Introduced new tests for DiffRenderer to validate rendering of different diff scenarios. - Created snapshot tests for UI components to ensure consistent output across various terminal sizes and conditions. Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…ering for MultiEditTool Signed-off-by: Eden Reich <[email protected]>
- Moved color definitions from shared package to a new colors package for better organization and maintainability. - Updated all UI components to use the new colors package for color definitions. - Introduced a new icons package to manage status icons and their styles. - Created a styles package to encapsulate common styles used across UI components. - Removed the old shared colors.go file to eliminate redundancy and improve clarity. - Ensured all components are updated to reflect the new structure, maintaining consistent theming throughout the application. Signed-off-by: Eden Reich <[email protected]>
…add tests for ShouldCollapseArg Signed-off-by: Eden Reich <[email protected]>
Contributor
|
🎉 This PR is included in version 0.38.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses issue #108 by adding a new
infer test-viewcommand that allows direct testing and iteration of UI components in the terminal without requiring chat mode.Features
Usage
Generated with Claude Code