brain: Preserve hunkless commit progress

2241b22fd2983092abce8ac71d187a4ba8fd3582
Loaded commits normally derive footer progress from changed lines.
Hunkless commits have no changed lines, so retain the backend-derived
completion state instead of replacing it with empty progress.

Assisted-by: Codex:gpt-5.6-sol
Alexis Sellier committed ago 1 parent 469c62d4
crates/brain/src/session.rs +1 -17
1226 1226
                status.map_or_else(ReviewProgress::default, |status| status.progress),
1227 1227
                status.map_or_else(DiffStat::default, |status| status.stats),
1228 1228
            )
1229 1229
        } else {
1230 1230
            let slot = &self.commits[self.current];
1231 -
            let progress = slot
1232 -
                .loaded
1233 -
                .as_ref()
1234 -
                .map_or(slot.progress, |loaded| ReviewProgress {
1235 -
                    accepted: loaded
1236 -
                        .review
1237 -
                        .accepted()
1238 -
                        .iter()
1239 -
                        .filter_map(|hunk| loaded.hunk_stats.get(hunk))
1240 -
                        .map(|stats| stats.additions + stats.deletions)
1241 -
                        .sum(),
1242 -
                    total: loaded
1243 -
                        .hunk_stats
1244 -
                        .values()
1245 -
                        .map(|stats| stats.additions + stats.deletions)
1246 -
                        .sum(),
1247 -
                });
1231 +
            let progress = slot.progress;
1248 1232
            let stats = slot.loaded.as_ref().map_or_else(
1249 1233
                || {
1250 1234
                    if slot.progress.is_complete() {
1251 1235
                        DiffStat::default()
1252 1236
                    } else {