Skip to content

web: exact-total search count badge + dependency bumps#24

Merged
dotwaffle merged 3 commits into
mainfrom
search-count-badge-and-deps
Jun 8, 2026
Merged

web: exact-total search count badge + dependency bumps#24
dotwaffle merged 3 commits into
mainfrom
search-count-badge-and-deps

Conversation

@dotwaffle

Copy link
Copy Markdown
Owner

Summary

Two small things, batched into one release (v1.20.1):

Exact-total search count badge. The grouped search badge showed (10+) for any type over the 10-result quick-search cap, disagreeing with the adjacent "View all N" link's exact figure. The badge now shows the same exact, comma-formatted total (e.g. Networks (1,234)). The total is already computed for overflowing types (it drives the link), so no extra query. The terminal search header (curl/plain UAs) is aligned to the same exact total for parity. The count helper is exported as templates.FormatThousands for reuse; the now-unused hasMoreSuffix is removed.

Dependency bumps. golang.org/x/sync v0.20.0 → v0.21.0 and modernc.org/sqlite v1.51.0 → v1.52.0 — the two direct deps with available updates. Neither is a codegen tool, so generated code is unaffected.

Verification

go build, go test -race ./..., go vet, golangci-lint run all pass; go generate ./... drift-clean (only the two intended templ files); govulncheck ./... → no vulnerabilities.

🤖 Generated with Claude Code

dotwaffle and others added 3 commits June 8, 2026 12:25
The grouped search count badge showed "(10+)" for any type that
overflowed the 10-result quick-search cap, while the adjacent "View
all N" link showed the exact total. The two figures disagreed for the
same group.

Show the exact total in the badge instead, comma-formatted, so it reads
e.g. "Networks (1,234)" and matches the "View all" link. The total is
already computed for overflowing types (it drives the link), so this
adds no query. The terminal search header is aligned to the same exact
total for cross-surface parity, replacing its own "(N+ results)" form.

The single count helper is exported as templates.FormatThousands so the
termrender package can reuse it; the now-unused hasMoreSuffix helper is
removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Routine maintenance bumps of the two direct dependencies with available
updates: golang.org/x/sync v0.20.0 -> v0.21.0 and modernc.org/sqlite
v1.51.0 -> v1.52.0. Neither is a code-generation tool, so generated
code is unaffected; the full race suite and govulncheck pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Capture the exact-total search count badge (Changed) and the dependency
bumps (Dependencies) under a 1.20.1 section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Code Metrics Report

Coverage Test Execution Time
80.9% 3m9s

Code coverage of files in pull request scope (93.8%)

Files Coverage
internal/web/templates/searchtypes.go 85.7%
internal/web/termrender/search.go 100.0%

Reported by octocov

@dotwaffle dotwaffle merged commit 7eb2d43 into main Jun 8, 2026
2 checks passed
@dotwaffle dotwaffle deleted the search-count-badge-and-deps branch June 8, 2026 12:33
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