Tags are categorized by the base they belong to, not by their
ref prefix. A tag in the hst table is always a hashtag, regardless
of whether its ref starts with "flg", "ply", etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Count tags per category before rendering sidebar
- Only display categories that have tags in current view
- Show count next to each category name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Event handlers now read fresh state from State.get() instead of
using captured values from when bindSidebarEvents was called.
This ensures the sidebar updates correctly with each render.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of depending on non-existent api_library_list_* views,
now queries library_${base} for unique mrf_library values and
fetches tag info from main table.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>