🎽 [src] skip grace period in quick mode#271
Merged
chicks-net merged 2 commits intoMay 15, 2026
Merged
Conversation
Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the TUI’s “premature exit prevention” logic so --quick mode (noAvg) can exit without waiting for the full startup grace period, and updates UI/test behavior accordingly.
Changes:
- Adds a
--quick(noAvg) branch incanTrustCompletionthat bypasses the grace-period / expected-count logic. - Updates the TUI waiting text when in quick mode and completion can’t yet be trusted.
- Adds unit tests covering the new quick-mode completion-trust behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/tui/view.go | Adds a quick-mode-specific waiting message when completion isn’t trusted. |
| internal/tui/update.go | Alters canTrustCompletion behavior in quick mode to bypass grace-period logic. |
| internal/tui/update_test.go | Adds tests for the new quick-mode canTrustCompletion behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+29
| if m.noAvg { | ||
| debug.Log("can trust completion: quick mode", | ||
| "check_count", checkCount, "peak", m.peakCheckCount) | ||
| return m.peakCheckCount <= checkCount | ||
| } |
| int(minCheckAppearanceRatio*100), | ||
| int(float64(len(m.checkRuns))/float64(m.expectedCheckCount)*100)) | ||
| } else if m.noAvg { | ||
| b.WriteString(m.styles.Queued.Render(" Waiting for check count to stabilize...\n")) |
Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
internal/tui/update.go:28
- The debug log message
"can trust completion: quick mode"is emitted even when the function returnsfalse(e.g., whenpeakCheckCount > checkCount). This makes debug output misleading; consider wording that reflects a decision being evaluated (and/or log the boolean result).
if m.noAvg {
debug.Log("can trust completion: quick mode",
"check_count", checkCount, "peak", m.peakCheckCount)
return m.peakCheckCount <= checkCount
Comment on lines
+24
to
32
|
|
||
| if m.noAvg { | ||
| debug.Log("can trust completion: quick mode", | ||
| "check_count", checkCount, "peak", m.peakCheckCount) | ||
| return m.peakCheckCount <= checkCount | ||
| } | ||
|
|
||
| elapsed := time.Since(m.firstCheckSeenAt) | ||
|
|
Comment on lines
+90
to
92
| } else if m.noAvg { | ||
| b.WriteString(m.styles.Queued.Render(" Waiting for all seen checks to finish...\n")) | ||
| } else { |
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.
Fixes #270
Done
Meta
(Automated in
.just/gh-process.just.)