Skip to content

feat: add commit and ref counters to repo tab view#761

Open
Jay-Madden wants to merge 4 commits intocharmbracelet:mainfrom
Jay-Madden:main
Open

feat: add commit and ref counters to repo tab view#761
Jay-Madden wants to merge 4 commits intocharmbracelet:mainfrom
Jay-Madden:main

Conversation

@Jay-Madden
Copy link
Copy Markdown
Contributor

One of the main things I look for information wise when browsing repos is how many commits/branches it has. Softserve didnt easily show me that so i went ahead and added it to the tab view where it felt natural.

I am currently running this happily on my forked build on my own server, but I figured I would offer the patch upstream as well. I haven't created a discussion but I can create one if needed?

Example:
image

The tab handling is a bit odd in that its a single tab instance for all repos, so i added the ResetTabNames() to the init to prevent other repos counts from showing up on new repos. It's not my favorite way to do it but short of making all repos their own "instance" of repo i think it's workable enough.

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 2, 2025

Codecov Report

❌ Patch coverage is 38.23529% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.87%. Comparing base (b06b555) to head (b05d1be).
⚠️ Report is 227 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ui/pages/repo/repo.go 6.25% 15 Missing ⚠️
pkg/ui/components/tabs/tabs.go 66.66% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
+ Coverage   51.96%   52.87%   +0.91%     
==========================================
  Files         157      160       +3     
  Lines       13454    11627    -1827     
==========================================
- Hits         6991     6148     -843     
+ Misses       5891     4906     -985     
- Partials      572      573       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

liuzhen9320 added a commit to liuzhen9320/app-soft-serve that referenced this pull request Nov 6, 2025
rhystmorgan added a commit to rhystmorgan/soft-serve that referenced this pull request Jan 4, 2026
Integrate PR charmbracelet#761 functionality to display dynamic counters in tab headers:

- Enhance tabs component with IdentifiableTab structure
- Add SetTabValueMsg for dynamic tab text updates
- Implement ResetTabNames() to clear counters between repos
- Add commit counter: "Commits (N)" format
- Add branch/ref counter: "Branches (N)" format
- Ensure clean navigation with automatic counter reset

Based on charmbracelet#761 by Jay-Madden

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
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