Skip to content

enhance(packages): show package count in profile tabs#38265

Open
ahanoff wants to merge 1 commit into
go-gitea:mainfrom
ahanoff:enhance/package-tab-count
Open

enhance(packages): show package count in profile tabs#38265
ahanoff wants to merge 1 commit into
go-gitea:mainfrom
ahanoff:enhance/package-tab-count

Conversation

@ahanoff

@ahanoff ahanoff commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Show package counts on user and organization package tabs, matching the existing repository and project tab counters.
  • Count distinct owner packages that have at least one non-internal version.
  • Hide the package count badge when the count is zero.

Screenshots

Captured locally with Podman and Playwright/Chrome:

  • Before:
package-tab-before
  • After:
package-tab-after

Testing

  • make GO=/home/ahanoff/.local/bin/go fmt
  • /home/ahanoff/.local/bin/go test -run '^TestCountOwnerPackages$|^TestHasOwnerPackages$' ./models/packages/
  • git diff --check
  • make deps-frontend
  • make frontend
  • pnpm exec playwright screenshot --browser=chromium --channel=chrome --viewport-size=1365,768 --wait-for-timeout=1000 http://127.0.0.1:3101/demo/-/packages screenshots/package-tab-before.png
  • pnpm exec playwright screenshot --browser=chromium --channel=chrome --viewport-size=1365,768 --wait-for-selector=".ui.secondary.pointing.menu .item .ui.small.label" --wait-for-timeout=500 http://127.0.0.1:3102/demo/-/packages screenshots/package-tab-after.png

AI Assistance

This PR was prepared with assistance from Codex:GPT-5.5 xhigh and reviewed before submission.

Add a package count to the user and organization package tabs, matching the existing repository and project tab counters.

Assisted-by: Codex:GPT-5
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 29, 2026
@github-actions github-actions Bot added the type/enhancement An improvement of existing functionality label Jun 29, 2026
@wxiaoguang

Copy link
Copy Markdown
Contributor

Actually I have objection for adding more and more "count" numbers to the tabs.

For most cases, it only slows down the page loading and most users don't need it.

That's just my personal opinion, so I won't block it if most people like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants