improvment(cli): add UI feedback during sync#73
Merged
Conversation
Owner
Author
|
👋 Hi, Myastr0! Thanks for opening a PR. We will review it soon. |
add ui feedback during sync process
c37f46a to
cfe089b
Compare
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.
Add Terminal UI Event Logging and Progress Tracking
Summary
This PR introduces a comprehensive event logging system with terminal UI feedback to provide users with real-time visibility into the synchronization process. The implementation includes progress tracking, spinner indicators, and clear status messages for key operations.
Changes to Core Features
What This PR Does
Event Logging Infrastructure
EventLoggerRepositoryinterface for abstracting event loggingTerminalUiEventLoggerRepositoryusing theoralibrary for terminal spinnersFakeEventLoggerRepositoryfor testing purposesSynchronization Events
check-source-is-accessible: Validates source accessibilitycheck-destination-is-accessible: Validates destination accessibilitysynchronization-process: Tracks overall synchronization progressProgress Tracking
User Experience Improvements
Why These Changes
Technical Details
New Dependencies
ora@9.0.0: Terminal spinner library for visual feedbackcli-progress@3.12.0: Progress bar library (added but not yet used in this PR)@types/cli-progress@3.11.6: TypeScript types for cli-progressArchitecture Changes
EventLoggerRepositoryto the dependency injection systemSynchronizeMarkdownToNotionandPreviewSynchronizationfeaturessizeproperty toSiteMapclass for progress calculationFiles Changed
New Files:
src/domains/event-logs/: Event log types and repository interfacesrc/domains/synchronization/events/: Synchronization-specific event definitionssrc/infrastructure/tui/terminal-ui-event-logger.repository.ts: Terminal UI implementation__tests__/__fakes__/event-logs/fake-event-logger.repository.ts: Test fake implementationModified Files:
src/domains/synchronization/features/synchronize-markdown-to-notion.feature.ts: Added event logging callssrc/domains/synchronization/features/preview-synchronization.feature.ts: Added event logger dependencysrc/MkNotes.ts: Integrated event logger into feature initializationsrc/infrastructure/index.ts: Added event logger to infrastructure instancessrc/domains/sitemap/entities/SiteMap.ts: Addedsizeproperty for progress trackingTesting
FakeEventLoggerRepositoryin feature constructorsChecklist
All Submissions:
Changes to Core Features:
Example Output
Before this PR, users would see minimal output during synchronization. Now they'll see:
Future Enhancements
cli-progressfor more detailed progress bars