Skip to content

🎽 [src] skip grace period in quick mode#271

Merged
chicks-net merged 2 commits into
mainfrom
chicks/2026-05-15-no-grace-period-in-quick-mode
May 15, 2026
Merged

🎽 [src] skip grace period in quick mode#271
chicks-net merged 2 commits into
mainfrom
chicks/2026-05-15-no-grace-period-in-quick-mode

Conversation

@chicks-net
Copy link
Copy Markdown
Member

@chicks-net chicks-net commented May 15, 2026

Fixes #270

Done

  • 🎽 [src] skip grace period in quick mode
  • improve message to user

Meta

(Automated in .just/gh-process.just.)

Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
Copilot AI review requested due to automatic review settings May 15, 2026 20:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in canTrustCompletion that 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 thread internal/tui/update.go
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
}
Comment thread internal/tui/view.go Outdated
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 returns false (e.g., when peakCheckCount > 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 thread internal/tui/update.go
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 thread internal/tui/view.go
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 {
@chicks-net chicks-net merged commit 59af4e8 into main May 15, 2026
28 of 33 checks passed
@chicks-net chicks-net deleted the chicks/2026-05-15-no-grace-period-in-quick-mode branch May 15, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grace period should not apply when -q/--quick flag is used

2 participants