Skip to content

Conversation

@stared
Copy link
Collaborator

@stared stared commented Aug 3, 2025

Untangling code, making it well designed

stared and others added 7 commits August 2, 2025 22:23
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…complexity

- Create ConsoleOutput.vue for overlay display functionality
- Create ConsoleToggle.vue for toggle button with clean interface
- Remove confusing toggleOnly/overlayOnly props abstraction
- Clear separation: toggle shows state, output manages overlay
- Extract all console-related logic and styling from App.vue
- Reduce App.vue by ~100 lines with better separation of concerns

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Create AppHeader.vue with title, subtitle, and GitHub link functionality
- Create RunButton.vue with dynamic state and version display
- Remove 445 lines from App.vue (57% reduction: 776→331 lines)
- Clean 2-level component hierarchy with focused responsibilities
- Each component handles its own state and styling

Components now extracted:
- AppHeader: GitHub API, stars, title display
- RunButton: execution state, version info, dynamic styling
- ConsoleOutput: message overlay display
- ConsoleToggle: console toggle button with error states

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Show "Running..." instead of "Console (0)" when code is executing
- Disable button and prevent clicks during loading state
- Hide toggle arrow when running since interaction unavailable
- Add muted styling for loading state with proper visual feedback
- Maintain error/warning state priority over loading state

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

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…concerns

- Extract pure WebR modules without Vue dependencies to src/webr/
- Create layered architecture: Core → Runtime → Storage → Utils
- Replace complex composables with clean, testable modules
- Fix output processing to handle R condition objects properly
- Add proper TypeScript types throughout, eliminate 'any' usage
- Implement consistent error handling with cleanup
- Add comprehensive WebR API documentation references

Key improvements:
- WebRInstance: Clean lifecycle management
- Executor: Robust code execution with proper output capture
- OutputProcessor: Fixed INFO/WARNING message categorization
- Serializer: Handles complex R objects with fallback strategies
- PackageManager: Tracks installations with version info
- FileSystem: Virtual filesystem operations

Output now correctly shows:
- INFO: `geom_smooth()` using formula = 'y ~ x'
- WARNING: Clean warning messages without duplication

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

Co-Authored-By: Claude <noreply@anthropic.com>
@stared stared merged commit 42927ed into main Aug 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants