Skip to content

feat: fold hierarchical tags with '/' in Versions tab#34

Merged
spoorcc merged 4 commits intomainfrom
claude/fix-selectversion-expand-groups-HqOhc
Mar 8, 2026
Merged

feat: fold hierarchical tags with '/' in Versions tab#34
spoorcc merged 4 commits intomainfrom
claude/fix-selectversion-expand-groups-HqOhc

Conversation

@spoorcc
Copy link
Contributor

@spoorcc spoorcc commented Mar 8, 2026

When any tag name contains a forward slash (as commonly seen in monorepo
setups, e.g. component/v1.0.0), the Versions tab now renders a collapsible
tree instead of a flat list. Tags are grouped by the prefix before the
first '/', and each group starts collapsed. Groups auto-expand when the
currently selected version lives inside them.

  • Added CSS for .vtree-group-hdr, .vtree-item, .vtree-chevron, etc.
  • Added _renderVerTree() to build the grouped HTML
  • Added toggleTreeGroup() to expand/collapse a group
  • Updated selectVersion() to use data-vidx attribute for highlight
    (works in both flat and tree modes)

Closes #31

Summary by CodeRabbit

  • New Features
    • Hierarchical tree view for version tags with collapsible/expandable groups and chevrons.
    • Tags grouped by prefix for clearer navigation and counts per group.
    • Selection now targets rendered rows and will auto-expand a group when selecting an item inside it.
    • Improved rendering paths for grouped vs. flat tag lists to ensure consistent highlighting and updates.

claude and others added 3 commits March 8, 2026 00:02
When any tag name contains a forward slash (as commonly seen in monorepo
setups, e.g. component/v1.0.0), the Versions tab now renders a collapsible
tree instead of a flat list. Tags are grouped by the prefix before the
first '/', and each group starts collapsed. Groups auto-expand when the
currently selected version lives inside them.

- Added CSS for .vtree-group-hdr, .vtree-item, .vtree-chevron, etc.
- Added _renderVerTree() to build the grouped HTML
- Added toggleTreeGroup() to expand/collapse a group
- Updated selectVersion() to use data-vidx attribute for highlight
  (works in both flat and tree modes)

Closes #31
When a version is selected via URL parameters, the selected row could
remain hidden inside a collapsed vtree-group-hdr. Now selectVersion
walks backwards from the selected row to find its group header and
calls toggleTreeGroup to expand it if the row is not visible.

https://claude.ai/code/session_01EVUptUcqgjMwB6W7W1SsGE
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b244f06-7508-480e-bb1c-d8106351e153

📥 Commits

Reviewing files that changed from the base of the PR and between 3770167 and ae4aa54.

📒 Files selected for processing (1)
  • dfetch_hub/site/index.html

📝 Walkthrough

Walkthrough

Adds hierarchical tag tree rendering to the versions list in index.html: detects tags with slashes, groups them by prefix, renders collapsible group headers and child rows, updates selection to use data-vidx, and auto-expands groups containing the selected version. (47 words)

Changes

Cohort / File(s) Summary
Hierarchical Tag Tree UI
dfetch_hub/site/index.html
Introduces hierarchical tag detection and two rendering paths (_renderVerTree, _renderVerFlat), new renderVersionRow(r,i) row builder, toggleTreeGroup(hdr) for collapse/expand, CSS classes for tree UI (vtree-*), and selection logic updated to use data-vidx and auto-reveal collapsed parents.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I nibbled slashes, found a tree,
Branches folded snug for me,
Chevrons wink and rows align,
Data-vidx makes selection fine,
A little hop — versions shine 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main feature: enabling hierarchical tag folding in the Versions tab when tags contain forward slashes.
Linked Issues check ✅ Passed All coding requirements from issue #31 are met: hierarchical tag detection, tree view rendering with grouping by '/' prefix, collapsed groups by default, and auto-expansion of selected versions' parent groups.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing hierarchical tag folding in the Versions tab as specified in issue #31; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-selectversion-expand-groups-HqOhc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@dfetch_hub/site/index.html`:
- Line 935: The clickable tree group header (tr with class "vtree-group-hdr"
that calls toggleTreeGroup(this)) is not keyboard accessible; update the element
creation to include tabindex="0", role="button", and an accessible state like
aria-expanded set from the open variable, and add a keydown handler (or attach
via the existing toggleTreeGroup) that triggers toggleTreeGroup(this) when Enter
or Space is pressed; ensure the same changes are applied to the other similar
headers around lines 951-957 so keyboard and assistive tech users can
expand/collapse groups.
- Around line 868-875: The long inline ternary/mapper for populating
document.getElementById('vtbody').innerHTML with allRefsCache should be split
into smaller helper functions: extract the row rendering logic into a function
(e.g., renderVersionRow(ref, index) that uses esc(ref.name), ref.kind,
ref.commit_sha, ref.date and calls selectVersion(index) on click), keep the tree
path using the existing _renderVerTree(allRefsCache) and delegate to a flat
renderer that maps allRefsCache.map(renderVersionRow). Ensure you reference
curVersion when computing sel and preserve hasHierTags, _renderVerTree,
allRefsCache, selectVersion, esc, and curVersion names so the final assignment
becomes a short conditional that calls the helpers and stays well under 120
characters per line.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6a4e0d07-8956-4a0d-a981-20190d9027be

📥 Commits

Reviewing files that changed from the base of the PR and between 1d446dd and 3770167.

📒 Files selected for processing (1)
  • dfetch_hub/site/index.html

@spoorcc spoorcc merged commit 2124bce into main Mar 8, 2026
2 checks passed
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.

fold tags when hierarchical tags with / in version tab

2 participants