Skip to content

Fix: Update app name for auto-update - #11

Merged
tjdammann merged 1 commit into
mainfrom
tjdammann/fix-auto-update-app-name
Feb 12, 2026
Merged

Fix: Update app name for auto-update#11
tjdammann merged 1 commit into
mainfrom
tjdammann/fix-auto-update-app-name

Conversation

@tjdammann

Copy link
Copy Markdown
Contributor

No description provided.

@tjdammann
tjdammann merged commit 10c8ae6 into main Feb 12, 2026
5 checks passed
@tjdammann
tjdammann deleted the tjdammann/fix-auto-update-app-name branch February 12, 2026 01:58
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant