Skip to content

fix: sidebar Focus list no longer truncates at 12 items without expand option#677

Merged
yaojin3616 merged 1 commit into
mainfrom
fix/sidebar-focus-truncation
Jun 13, 2026
Merged

fix: sidebar Focus list no longer truncates at 12 items without expand option#677
yaojin3616 merged 1 commit into
mainfrom
fix/sidebar-focus-truncation

Conversation

@wisdomqin

Copy link
Copy Markdown
Contributor

Problem

The sidebar Aware tab's Focus list had a hardcoded slice(0, 12) in renderFocusGroup with no expand button. Any Focus items beyond position 12 (In progress, System Focus, and Completed groups) were completely invisible and unmanageable in the sidebar.

Root Cause

renderFocusGroup (sidebar-only helper at ~L4451) was a static renderer with no expand state, unlike the main Aware tab which already uses showAllFocus + SECTION_PAGE_SIZE.

Fix

  • Added three new state vars: showAllSideActive, showAllSideSystem, showAllSideCompleted
  • Refactored renderFocusGroup to accept showAll / setShowAll props
  • When items > 12, shows a counter badge (12/N) in the subtitle and a Show more (+N) / Show less toggle button at the bottom of the group
  • Completed group received the same expand/collapse treatment; also resets to collapsed when parent 'Hide completed' is toggled

Testing

  • TypeScript: tsc --noEmit --skipLibCheck passes with zero errors
  • Behavior verified: groups with ≤12 items render identically to before (no regression)

…d option

- Replace static slice(0,12) in renderFocusGroup with collapsible show-more
- Add showAllSideActive / showAllSideSystem / showAllSideCompleted state vars
- In-progress and System Focus groups show counter badge (e.g. 12/20) and
  a 'Show more (+N)' / 'Show less' toggle button when items exceed 12
- Completed group also gains same expand/collapse; collapses back to 12
  when the parent 'Hide completed' button is toggled
- SIDE_FOCUS_LIMIT constant (12) co-located with renderFocusGroup for clarity

Fixes: sidebar Focus items beyond position 12 were invisible and unmanageable
@yaojin3616 yaojin3616 merged commit 15ac89c into main Jun 13, 2026
1 check failed
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.

2 participants