Fix: Update app name for auto-update - #11
Merged
Merged
Conversation
sachiniyer
added a commit
that referenced
this pull request
May 6, 2026
…278) ## Summary Two small triage-friendly tweaks to `scans list` card output (audit items #10 and #11 — bundled because they both touch `Formattable for Scan`): **1. Header parenthetical (#10)** Drop the `(N Open)` parenthetical when it would be noise: - `total == 0` — leading `0 Bugs Found` already says nothing; `(0 Open)` is boilerplate - `open == total` — `(N Open)` just restates the leading number Otherwise the existing `"{repo} N Bugs Found (M Open)"` form is preserved. **2. Commit row (#11)** Surface `Scan.commit_sha` (truncated to 7 chars, matching `format_introduced_in`'s blame style) so users can answer "did this scan run on the current main?" without an extra round-trip. Conditional — omitted when `commit_sha` is null/absent so older scans stay quiet. ## Test refactor Existing scan-card tests addressed `pairs[N]` by numeric index, which would silently break once the new conditional `Commit` row shifts later positions. Rewrote them to look up by key name via a small `scan_pair` helper. ## Testing **Automated, run locally and passing:** - `cargo test` — full suite green. New tests: - `scan_card_header_drops_parenthetical_when_total_is_zero` → `"usedetail/cli 0 Bugs Found"` - `scan_card_header_drops_parenthetical_when_open_equals_total` → `"usedetail/cli 7 Bugs Found"` (7 found, 7 open) - `scan_card_header_keeps_parenthetical_when_partially_resolved` → still emits `(3 Open)` when partial - `scan_card_includes_short_commit_sha` → 24-char sha truncated to `"deadbee"` - `scan_card_omits_commit_when_null` - Existing `scan_card_workflow_id_present` etc. updated to look up by key - `cargo clippy -- -D warnings` — clean - `cargo fmt --check` — clean - `cargo xtask check` — clean (no flag changes; HELP.md unchanged) **Manual end-to-end against live API (`usedetail/detail`):** ``` 1. usedetail/detail 0 Bugs Found ← was "0 Bugs Found (0 Open)" Status complete Scan Type - Initiator scheduler Workflow ID wr_387e02f8-… Created 2026-05-06 11:23:02 -07:00 2. usedetail/detail 0 Bugs Found ← parenthetical dropped Status complete Scan Type recentChanges Initiator scheduler Commit 5373780 ← new row, conditional Workflow ID wr_d0b4fdfd-… Created 2026-05-06 11:22:34 -07:00 3. usedetail/detail 1 Bugs Found (0 Open) ← parenthetical kept (open ≠ total) Status complete Scan Type recentChanges Initiator scheduler Commit aa4ba49 Workflow ID wr_27be25a4-… Created 2026-05-05 16:36:24 -07:00 ``` - Verified the older scan #4 with no `commitSha` cleanly omits the `Commit` row. - The `open == total` branch wasn't representable in `usedetail/detail`'s recent scans (everything is resolved), so it's covered by unit test only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.