Skip to content

feat(desktop-gpui): choose the diagnostic test duration in Settings > Feedback - #4253

Open
richiemcilroy wants to merge 6 commits into
mainfrom
feat/gpui-diagnostic-duration
Open

richiemcilroy wants to merge 6 commits into
mainfrom
feat/gpui-diagnostic-duration

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Brings back 0.6.0's "Test duration" choice (20, 40 or 60 seconds) for the diagnostic report in Settings > Feedback. The GPUI app always ran 20 seconds.

Root cause

  • 0.6.0 offered DIAGNOSTIC_DURATIONS (20 / 40 / 60 s) and passed the choice to the run and its confirmation (settings/feedback.tsx:58-61, :131, :143, :161).
  • The GPUI port hard-coded diagnostics::DEFAULT_DURATION_SECS (20) in both the confirmation text and SyncTestOptions, so there was no way to run a longer, more drift-sensitive test.

What changed

// apps/desktop-gpui/src/diagnostics.rs
pub const DURATION_CHOICES_SECS: &[u64] = &[DEFAULT_DURATION_SECS, 40, 60];

// apps/desktop-gpui/src/settings_pages.rs, the run and its confirmation
confirm_body(self.pages.diagnostic_duration_secs)
SyncTestOptions { duration_secs: self.pages.diagnostic_duration_secs, .. }
  • A "Test duration" row between "Recording mode" and "Test microphone", using the same ui::SegmentedControl::settings as the mode row. It is disabled while a run is going, like the other options.
  • The choice starts at 20 s each time Settings opens, as 0.6.0's createSignal(20) did; nothing new is stored.
  • Strings duration_label, duration_description and duration_option in all seven locales.

Callers checked

  • diagnostics::DEFAULT_DURATION_SECS: still the first choice and the default; its other uses are unchanged.
  • confirm_body and SyncTestOptions in settings_pages.rs: the only two places the run's length was read; both now use the chosen value.

What could regress

  • Every offered length reaches the CLI unchanged: the CLI clamps the sync pattern to 14-120 s and the playback leg to 18-120 s, and 20, 40 and 60 are all inside both.
  • Default behaviour is identical: a user who never touches the row runs 20 s, as before.

Tests

  • every_offered_duration_reaches_the_cli_unclamped (diagnostics.rs): each choice lands in --duration as given and sits inside the CLI's clamps; the first choice is the default.
  • settings_surface_tests.rs: the new label, description and each option render the English strings, and duration_option is in the locale key list.

Proof

Real app built from this branch and from main, Linux under Xvfb, driven with xdotool: Settings > Feedback, pick 60 seconds, press Run Diagnostic, read the confirmation, cancel. (The run itself cannot start here: screen capture is unavailable under Xvfb.)

main this PR
Diagnostic options (light)
Confirmation (light)
Diagnostic options (dark)
Confirmation (dark)

Recordings: this PR (light, dark), main (light, dark).

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues remain.

Summary

Adds 20-, 40- and 60-second diagnostic choices in Settings > Feedback.

  • Diagnostic tests can now run for 20, 40, or 60 seconds.

The comment identified in the previous, unnumbered thread has been removed. No new actionable issues were found. Review checks were source-only; no build, tests or native UI capture were run.

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Ignored Ignored Preview Nov 17, 2026 4:37am UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 05:24 Inactive
@richiemcilroy
richiemcilroy marked this pull request as ready for review November 14, 2026 05:25
@sandchest-com

sandchest-com Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Sandchest

Sandchest reviewed 8933e49: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

Comment thread apps/desktop-gpui/src/diagnostics.rs Resolved
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 14, 2026 05:59 Inactive

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 17, 2026 04:04 Inactive

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

This branch was successfully deployed

1 active (outdated) and 1 inactive (outdated) deployments
Preview – cap-web — 04612f11 Deployed Nov 17, 2026 by vercel[bot]
Preview – cap-status — 04612f11 Deployed Nov 17, 2026 by vercel[bot]
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.

1 participant