-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Complete redesign and modernization of PutWindow component #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Implement immediate file dialog on Upload button click - Add modern professional UI following fs-tree design language - Create two-phase upload progress (browser→daemon, daemon→network) - Add prominent file information section with file type icons - Implement clear public/private upload mode selection - Add collapsible advanced settings (chunk size, storage mode, no-verify) - Create modern styled progress components with detailed network upload tracking - Add enhanced theme system with section groups and info frames - Implement smart state management and validation - Add professional completion screen with copy-to-clipboard functionality - Fix unstable feature usage in window_system.rs - Ensure all components follow established MutAnt design patterns The redesigned PutWindow provides a modern, user-friendly upload experience with immediate file selection, clear progress tracking, and professional styling that seamlessly integrates with the existing design system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR completely redesigns the PutWindow component and modernizes related parts of the application to improve user experience and visual consistency. Key changes include updating the window system to simplify sender usage, integrating modern themed UI components and progress indicators, and triggering an immediate file dialog upon creating a Put tab.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mutant-web/src/lib.rs | Removed an unstable feature flag no longer needed. |
| mutant-web/src/app/window_system.rs | Refactored sender usage from a write-lock mapping to a read-lock with cloning. |
| mutant-web/src/app/theme.rs | Introduced new theming functions for styled sections and frames. |
| mutant-web/src/app/fs_window.rs | Updated to trigger an immediate file dialog when adding a Put tab. |
| mutant-web/src/app/components/progress.rs | Added modern, detailed progress components for file transfers. |
Comments suppressed due to low confidence (1)
mutant-web/src/app/window_system.rs:81
- Review the change from using a write-lock mapping to a read-lock with cloning; ensure that cloning the sender aligns with the intended single-writer semantics and does not inadvertently allow multiple concurrent sender instances.
fn new_window_tx() -> futures::channel::mpsc::Sender<WindowType> {
| let progress_bar = ProgressBar::new(completion) | ||
| .fill(MutantColors::ACCENT_BLUE) | ||
| .animate(true); |
Copilot
AI
Jun 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider reusing the existing styled_progress_bar utility to construct the progress bar for consistency across components, unless the deviation is intentional.
| let progress_bar = ProgressBar::new(completion) | |
| .fill(MutantColors::ACCENT_BLUE) | |
| .animate(true); | |
| let progress_bar = styled_progress_bar(completion, None, Some(MutantColors::ACCENT_BLUE)); |
1. Fixed window opening logic - PutWindow only opens after successful file selection 2. Preserved full filename including extensions in key name input 3. Removed redundant max chunk size setting, added chunk info to storage modes 4. Implemented immediate browser-to-daemon file transfer on selection 5. Fixed non-functional Start Upload button with proper daemon-to-network upload - Added global callback system for cross-component communication - Enhanced file reading with chunked async streaming (256KB chunks) - Integrated proper progress tracking for all upload phases - Added comprehensive error handling and user notifications - Updated dependencies (gloo-timers, enhanced web-sys features) - All improvements compile successfully and maintain existing functionality
🎨 Complete PutWindow Redesign and Modernization
This PR completely redesigns and modernizes the PutWindow component, transforming it from the outdated first window into a professional, user-friendly upload interface that follows the established MutAnt design system.
✨ Key Features
Enhanced User Flow
Modern UI Components
Design System Integration
🔧 Technical Improvements
Enhanced Components
file_transfer_progress()andnetwork_upload_progress()Architecture
📱 User Experience
Before
After
🎯 Files Changed
mutant-web/src/app/put.rs: Complete component redesign with modern UI sectionsmutant-web/src/app/fs_window.rs: Updated to trigger immediate file dialogmutant-web/src/app/components/progress.rs: Added modern styled progress componentsmutant-web/src/app/theme.rs: Extended theme system with new styling functionsmutant-web/src/app/window_system.rs: Fixed unstable feature usagemutant-web/src/lib.rs: Removed unnecessary feature flag🧪 Testing
📸 UI Sections Implemented
🚀 Impact
This redesign transforms the upload experience from a basic, outdated interface into a modern, professional tool that:
The new PutWindow sets the standard for modern UI components in the MutAnt ecosystem and provides a foundation for future component development.
Pull Request opened by Augment Code with guidance from the PR author