-
Notifications
You must be signed in to change notification settings - Fork 0
Fix issue-1: Update StopwatchApplication #2
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
Conversation
WalkthroughIntroduces a private rendering state and a dedicated RenderLine(TimeSpan) method; RunAsync now calls RenderLine on iteration, Enter, Backspace, and character input. RenderLine formats elapsed time, appends the input buffer, pads trailing spaces using _previousLineLength, writes output, and updates _previousLineLength. No public API changes. Changes
Sequence Diagram(s)sequenceDiagram
participant App as StopwatchApplication
participant User as User (keypress)
participant Render as RenderLine
participant Fmt as FormatElapsed
participant Console as Console.Write
Note over App,User: Main loop / input handling
User->>App: keypress (char / Backspace / Enter)
App->>Render: RenderLine(elapsed)
Render->>Fmt: FormatElapsed(elapsed)
Fmt-->>Render: formattedTime
Render->>Console: Write(paddedLine)
Console-->>Render: writeAck
Render-->>App: update _previousLineLength
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Stopwatch.App/StopwatchApplication.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/Stopwatch.App/StopwatchApplication.cs (3)
src/Stopwatch.Adapters.Console/SystemConsole.cs (1)
Write(7-10)src/Stopwatch.Ports/IConsole.cs (1)
Write(5-5)tests/Stopwatch.Unit/Fakes/FakeConsole.cs (1)
Write(12-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-test (windows-latest)
Summary by CodeRabbit
Style
Bug Fixes