Skip to content

Commit 966930d

Browse files
art049claude
andcommitted
feat(cli): polish impact reporting and upload feedback
- Impact display: directional arrows (green up / red down / dimmed neutral) alongside the percentage change - Report URL: cleaner "View full report:" label in dim with prominent blue bold link - Upload success: green checkmark prefix on completion message - Improved polling timeout error message Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8a291f0 commit 966930d

4 files changed

Lines changed: 31 additions & 12 deletions

File tree

src/cli/exec/poll_results.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ pub async fn poll_results(
2525
}
2626

2727
info!(
28-
"\nTo see the full report, visit: {}",
28+
"\n{} {}",
29+
style("View full report:").dim(),
2930
style(response.run.url).blue().bold().underlined()
3031
);
3132
}

src/cli/run/poll_results.rs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,31 @@ pub async fn poll_results(
2222

2323
if let Some(impact) = report.impact {
2424
let rounded_impact = (impact * 100.0).round();
25-
let impact_text = if impact > 0.0 {
26-
style(format!("+{rounded_impact}%")).green().bold()
25+
let (arrow, impact_text) = if impact > 0.0 {
26+
(
27+
style("\u{25B2}").green(),
28+
style(format!("+{rounded_impact}%")).green().bold(),
29+
)
30+
} else if impact < 0.0 {
31+
(
32+
style("\u{25BC}").red(),
33+
style(format!("{rounded_impact}%")).red().bold(),
34+
)
2735
} else {
28-
style(format!("{rounded_impact}%")).red().bold()
36+
(
37+
style("\u{25CF}").dim(),
38+
style(format!("{rounded_impact}%")).dim().bold(),
39+
)
2940
};
3041

42+
let allowed = (response.allowed_regression * 100.0).round();
43+
info!("{arrow} Impact: {impact_text} (allowed regression: -{allowed}%)");
44+
} else {
3145
info!(
32-
"Impact: {} (allowed regression: -{}%)",
33-
impact_text,
34-
(response.allowed_regression * 100.0).round()
46+
"{} No impact detected, reason: {}",
47+
style("\u{25CB}").dim(),
48+
report.conclusion
3549
);
36-
} else {
37-
info!("No impact detected, reason: {}", report.conclusion);
3850
}
3951

4052
if output_json {
@@ -63,7 +75,8 @@ pub async fn poll_results(
6375
}
6476

6577
info!(
66-
"\nTo see the full report, visit: {}",
78+
"\n{} {}",
79+
style("View full report:").dim(),
6780
style(response.run.url).blue().bold().underlined()
6881
);
6982
}

src/upload/polling.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ pub async fn poll_run_report(
2525
run_id: upload_result.run_id.clone(),
2626
};
2727

28+
debug!("Waiting for results to be processed...");
29+
2830
let response;
2931
loop {
3032
if start.elapsed() > RUN_PROCESSING_MAX_DURATION {
31-
bail!("Polling results timed out");
33+
bail!("Polling results timed out after 5 minutes. Please try again later.");
3234
}
3335

3436
let fetch_result = api_client

src/upload/uploader.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ pub async fn upload(
301301
profile_archive.content.size().await?
302302
);
303303
upload_profile_archive(&upload_data, profile_archive).await?;
304-
info!("Performance data uploaded");
304+
info!(
305+
"{} Performance data uploaded",
306+
style("\u{2714}").green().bold()
307+
);
305308

306309
Ok(UploadResult {
307310
run_id: upload_data.run_id,

0 commit comments

Comments
 (0)