Skip to content

feat(ui): show comment and sub-issue counts on issue detail tabs#1927

Open
bluzername wants to merge 1 commit intopaperclipai:masterfrom
bluzername:fix/issue-detail-tab-counts
Open

feat(ui): show comment and sub-issue counts on issue detail tabs#1927
bluzername wants to merge 1 commit intopaperclipai:masterfrom
bluzername:fix/issue-detail-tab-counts

Conversation

@bluzername
Copy link
Copy Markdown

@bluzername bluzername commented Mar 27, 2026

Thinking Path

  • Paperclip orchestrates ai-agents for zero-human companies
  • But humans want to watch the agents and oversee their work
  • Human users can view issues, which is central screen for understanding what agents are doing
  • Each issue has detail page with tabs: Comments, Sub-issues, Activity
  • But these tabs do not show any count, so user must click each tab to know if there is content inside
  • The "Linked Approvals" tab already shows count in parentheses, so the pattern exist but was not applied to main tabs
  • This PR adds count numbers to Comments and Sub-issues tabs, using data that is already loaded in the component
  • The benefit is that during triage, user can immediately see which issues have discussion or are broken down into sub-tasks, without clicking back and forth

Problem

When looking at an issue detail page, the tabs at the bottom show "Comments", "Sub-issues", "Activity" - but no counts. I cannot see if there are 0 or 50 comments without clicking the tab. Same for sub-issues.

This is specially annoying when triaging issues because I want to quickly see which issues have discussion (comments) and which are broken down into sub-tasks (sub-issues) without clicking back and forth between tabs.

The "Linked Approvals" tab further down already show a count in parentheses, so the pattern exist in the same page but was not applied to the main tabs.

What I changed

Added count display to Comments and Sub-issues tabs:

  • Comments (5) - shows when there are comments
  • Sub-issues (3) - shows when there are child issues
  • Just Comments or Sub-issues when count is zero (no distracting "(0)")

Both use data already loaded and available in the component (comments from useQuery and childIssues from useMemo).

How to test

  1. Open any issue that has comments and/or sub-issues
  2. The Comments tab should show count like "Comments (5)"
  3. The Sub-issues tab should show count like "Sub-issues (2)"
  4. Open issue with zero comments - should show just "Comments" with no number

1 file, 2 lines changed.

The Comments and Sub-issues tabs in issue detail page was showing
just the label without any count. User had to click each tab to
find out if there are any comments or sub-issues.

Now tabs show count when items exist:
- "Comments (5)" when there are 5 comments
- "Sub-issues (3)" when there are 3 child issues
- Just "Comments" or "Sub-issues" when count is zero

This match the pattern already used by "Linked Approvals" tab
in the same page which show the count.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR adds comment and sub-issue counts to the two main tabs on the issue detail page, matching the existing pattern already used by the "Linked Approvals" tab. The implementation is minimal (2 lines), uses already-loaded data, and handles the loading/empty states correctly.\n\nChanges:\n- Comments tab now shows Comments (N) when N > 0, and just Comments when empty or still loading — correctly null-guarded since comments from useQuery starts as undefined.\n- Sub-issues tab now shows Sub-issues (N) when N > 0 — no null guard needed since childIssues from useMemo always initializes to [].\n\nPR description concerns:\n- The PR is missing a "thinking path" as required by CONTRIBUTING.md. The thinking path should trace from the top of the product down to the specific change.\n- Since this is a visual/UI change, CONTRIBUTING.md also asks for before/after screenshots to verify the change looks as intended. Please add these to the PR description.

Confidence Score: 5/5

Safe to merge — the code change is correct and minimal, the only outstanding items are PR description improvements (thinking path + screenshots).

Both changed lines are logically correct: comments is properly null-guarded for the useQuery undefined state, and childIssues needs no guard since useMemo always returns an array. No tests are affected, no new dependencies introduced. The only feedback is around the PR description format required by CONTRIBUTING.md, which does not affect code correctness.

No files require special attention.

Important Files Changed

Filename Overview
ui/src/pages/IssueDetail.tsx Added count display to Comments and Sub-issues tabs; correctly handles undefined comments (loading state) and the always-defined childIssues array. Logic is sound — comments uses a null guard while childIssues (always [] from useMemo) does not need one.

Reviews (1): Last reviewed commit: "feat(ui): show counts on issue detail Co..." | Re-trigger Greptile

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