Skip to content

Commit 4b0f8ed

Browse files
art049claude
authored 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 b068e70 commit 4b0f8ed

3 files changed

Lines changed: 29 additions & 10 deletions

File tree

src/upload/poll_results.rs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,31 @@ pub async fn poll_results(
4848
if let Some(report) = report {
4949
if let Some(impact) = report.impact {
5050
let rounded_impact = (impact * 100.0).round();
51-
let impact_text = if impact > 0.0 {
52-
style(format!("+{rounded_impact}%")).green().bold()
51+
let (arrow, impact_text) = if impact > 0.0 {
52+
(
53+
style("\u{25B2}").green(),
54+
style(format!("+{rounded_impact}%")).green().bold(),
55+
)
56+
} else if impact < 0.0 {
57+
(
58+
style("\u{25BC}").red(),
59+
style(format!("{rounded_impact}%")).red().bold(),
60+
)
5361
} else {
54-
style(format!("{rounded_impact}%")).red().bold()
62+
(
63+
style("\u{25CF}").dim(),
64+
style(format!("{rounded_impact}%")).dim().bold(),
65+
)
5566
};
5667

68+
let allowed = (response.allowed_regression * 100.0).round();
69+
info!("{arrow} Impact: {impact_text} (allowed regression: -{allowed}%)");
70+
} else {
5771
info!(
58-
"Impact: {} (allowed regression: -{}%)",
59-
impact_text,
60-
(response.allowed_regression * 100.0).round()
72+
"{} No impact detected, reason: {}",
73+
style("\u{25CB}").dim(),
74+
report.conclusion
6175
);
62-
} else {
63-
info!("No impact detected, reason: {}", report.conclusion);
6476
}
6577
}
6678
}
@@ -94,7 +106,8 @@ pub async fn poll_results(
94106
}
95107

96108
info!(
97-
"\nTo see the full report, visit: {}",
109+
"\n{} {}",
110+
style("View full report:").dim(),
98111
style(response.run.url).blue().bold().underlined()
99112
);
100113
end_group!();

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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ pub async fn upload(
288288
profile_archive.content.size().await?
289289
);
290290
upload_profile_archive(&upload_data, profile_archive).await?;
291+
info!(
292+
"{} Performance data uploaded",
293+
style("\u{2714}").green().bold()
294+
);
291295

292296
Ok(UploadResult {
293297
run_id: upload_data.run_id,

0 commit comments

Comments
 (0)