-
-
Notifications
You must be signed in to change notification settings - Fork 168
feature: document and test experimental UI event dump flag #1237
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
Open
simulot
wants to merge
11
commits into
develop
Choose a base branch
from
feature/tui-revamp-foundations
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Implemented the UI pipeline in `app/upload/ui_pipeline.go` to manage UI events and state updates during asset uploads. - Added a `MemPublisher` for testing purposes to capture and assert UI events in unit tests. - Created a structured event system in `internal/ui/core/messages` to handle various UI events such as asset queuing, uploading, and failure notifications. - Established a modular directory layout for the UI module, including core state management, messaging, and platform-specific implementations for terminal, web, and native shells. - Documented the UI module architecture and development guidelines in `internal/ui/README.md` and `internal/ui/specifications/tui-revamp-plan.md`. - Introduced build tags to manage different UI shell implementations and ensure backward compatibility with existing CLI commands.
…ui-revamp-foundations
- add runner jobs watcher plus JobSummary fields and wire it into the upload UI pipeline with cancellable lifecycle - expose file processor event hooks, batch counters via ticker, and forward processing metadata as structured logs - cover the new plumbing with unit tests (runner jobs, channel publisher, file processor hook)
- fan out the experimental UI event stream so both the legacy tcell UI and future shells can consume the same publisher output without racing - teach the legacy UI to read EventLogLine and EventJobsUpdated payloads, updating the log pane and server jobs sparkline directly from streamed telemetry (with a poller fallback) - add file-processor event hooks, stats batching, and channel fan-out helpers (with unit tests) to support the new wiring
Added user-facing documentation for the hidden --ui-dump-events flag in upload.md Created troubleshooting guide in ui-dump-events-troubleshooting.md for developer use Expanded unit tests in ui_pipeline_test.go to cover job summary event logging Ensured code formatting and test coverage for new flag and helpers
Dependency ReviewThe following issues were found:
OpenSSF ScorecardScorecard details
Scanned Files
|
Removed redundant return statements flagged by staticcheck Updated function signatures and error handling to satisfy unparam/staticcheck Ensured code style and linter compliance in ui_pipeline.go
Details: wrap the UI event logging tests with a mutex-protected buffer so the race detector stops flagging concurrent reads/writes make ChannelPublisher.send return immediately once the context is canceled before attempting to publish, keeping the cancellation test deterministic
✅ Fast Feedback PassedAll code quality checks have passed:
Next Steps: |
simulot
commented
Nov 29, 2025
Owner
Author
simulot
left a comment
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.
/run-e2e
Owner
Author
|
/run-e2e |
split the web/native platform layers into ui_web and ui_native build-tag pairs with shared config + error stubs so future shells can opt-in cleanly drop the old monolithic stubs and clarify runner fallback behavior plus the new Phase 0 progress log in README.md
Major architectural improvements for event handling and new Bubble Tea based dashboard: **Event Dispatcher Pattern (Phase 1 & 2)** - Created EventDispatcher with thread-safe multi-sink broadcasting - Added EventSink interface for structured event processing - Implemented SlogSink for file logging with level detection - Created UISink to forward file events to experimental UI - Updated Recorder to dispatch events to all registered sinks - Maintained backwards compatibility with legacy SetLogger() - Added comprehensive test suite (16 tests, all passing) **Experimental TUI Dashboard** - Implemented upload_dashboard.go with Bubble Tea framework - Full-screen layout: header, 4-card stats row, log panel, footer - Responsive design: 3 breakpoints (vertical, 2x2, 4-in-row layouts) - Color-coded logs with chronological display (oldest→newest) - Server URL and user email display in header - Equal-width status cards with vertical separators - Bold+underline card titles for visual hierarchy **Status Cards Implementation** - Discovery: images/videos counts and sizes, filtered assets - Processing: sidecars, albums, stacks, tags (placeholders) - Progress: pending/processed/discarded/errors with totals - Server Jobs: active and waiting job counts **Event Pipeline Integration** - SetupUILogHandler registers UISink with FileProcessor - uiLogWriter captures app-level slog output for UI - Inventory watcher polls server statistics periodically - Jobs watcher updates server operation status - Real-time event stream consumption via Bubble Tea **UI State Management** - RunStats with Stage, ThroughputSamples, InFlight tracking - ServerInventory with Photos/Videos/Total and latency - LogEvent with Level/Message/Timestamp/Details - CloneRunStats for thread-safe payload delivery - maxLogEntries=1000 for historical log storage **Build & Configuration** - Added Bubble Tea and Lipgloss dependencies (go.mod/go.sum) - UI enabled via --ui-experimental flag - Conditional progress output based on experimental flag - Wait for user input before closing experimental UI - Inventory poll interval configurable (default 2s) **Testing** - Created dispatcher_test.go with comprehensive coverage - Added upload_dashboard_test.go for UI model behavior - MockSink pattern for event capture in tests - Concurrency tests (10 goroutines × 100 events) - All existing tests passing **Documentation** - Added doc.go for terminal package overview - Updated tui-revamp-plan.md with specification paths - Created upload-dashboard-wireframe.md for design reference - Removed obsolete web/app_stub.go Backwards compatibility maintained: legacy UI continues working unchanged. Experimental UI activated via --ui-experimental flag without breaking existing workflows. Related PRs: #1237
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.
This PR adds documentation and troubleshooting guidance for the hidden --ui-dump-events flag used to debug the experimental TUI event pipeline.
This improves developer experience and makes it easier to diagnose issues in the new UI event stream.