The `--summary`/`--pending` render, pure over the wire-carried domain summary — the same lines the local body prints (headline percentage, source/tool breakdown, the verbose internals, the data-quality warnings, and the draft-view hint when the view has a recorded parent).
(
summary: &atomic_repository::ProvenanceSummary,
view_name: &str,
pending_parent: Option<&str>,
view_parent: Option<&str>,
verbose: bool,
)
| 85 | /// data-quality warnings, and the draft-view hint when the view has |
| 86 | /// a recorded parent). |
| 87 | pub(crate) fn render_summary( |
| 88 | summary: &atomic_repository::ProvenanceSummary, |
| 89 | view_name: &str, |
| 90 | pending_parent: Option<&str>, |
| 91 | view_parent: Option<&str>, |
| 92 | verbose: bool, |
| 93 | ) { |
| 94 | let header_line = match pending_parent { |
| 95 | Some(parent) => format!("Pending work: {} → {}", view_name, parent), |
| 96 | None => format!("Project: {}", view_name), |
| 97 | }; |
| 98 | println!("{}", header_line); |
| 99 | println!(); |
| 100 | |
| 101 | // Headline. |
| 102 | match summary.ai_authored_pct() { |
| 103 | None => { |
| 104 | println!("No authored changes in this view yet."); |
| 105 | } |
| 106 | Some(pct) => { |
| 107 | let denom = summary.authored_denominator(); |
| 108 | println!( |
| 109 | "AI-authored: {:.0}% ({} of {} authored change{})", |
| 110 | pct, |
| 111 | summary.ai_changes, |
| 112 | denom, |
| 113 | if denom == 1 { "" } else { "s" }, |
| 114 | ); |
| 115 | if summary.human_changes > 0 { |
| 116 | println!( |
| 117 | "Human-authored: {} change{}", |
| 118 | summary.human_changes, |
| 119 | if summary.human_changes == 1 { "" } else { "s" }, |
| 120 | ); |
| 121 | } |
| 122 | if !summary.by_vendor.is_empty() { |
| 123 | let parts: Vec<String> = summary |
| 124 | .by_vendor |
| 125 | .iter() |
| 126 | .map(|(v, n)| format!("{} {}", pretty_vendor(v), n)) |
| 127 | .collect(); |
| 128 | println!("AI sources: {}", parts.join(" · ")); |
| 129 | } |
| 130 | if !summary.by_tool.is_empty() { |
| 131 | let parts: Vec<String> = summary |
| 132 | .by_tool |
| 133 | .iter() |
| 134 | .map(|(t, n)| format!("{} {}", pretty_tool(t), n)) |
| 135 | .collect(); |
| 136 | println!("Tools: {}", parts.join(" · ")); |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | // Verbose: internal accounting. |
| 142 | if verbose { |
| 143 | println!(); |
| 144 | println!( |
nothing calls this directly
no test coverage detected