feat(ui): make What's Next feed scrollable beyond 5 items#354
Open
dimakis wants to merge 1 commit into
Open
Conversation
Remove the hard MAX_ITEMS=5 cap from useAttentionFeed hook so all attention items are returned. The component now shows 5 by default with a "Show all N" / "Show less" toggle button. The header badge shows the true tier-1 count regardless of collapsed state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dimakis
commented
May 22, 2026
Owner
Author
dimakis
left a comment
There was a problem hiding this comment.
Centaur Review
Found 2 issue(s).
frontend/src/components/AttentionFeed.tsx
Clean, well-scoped change that correctly moves the display cap from hook to component. No bugs or regressions — just a minor stale-state edge case and missing component tests for the new toggle.
- 🔵 missing_tests: No component-level tests for the new show-more/show-less toggle behavior. The project has component tests for other components (ToolPill, ToolGroup, CodeBlock, etc.). Consider adding tests that verify: (1) only 5 items render by default, (2) clicking 'Show all' renders all items, (3) the button doesn't appear when there are <= 5 items, (4) the button label shows the correct total count.
[fixable] - 🔵 bugs (L54): If the user clicks 'Show all' and items subsequently shrink below DEFAULT_VISIBLE_COUNT (e.g., a todo is completed),
showAllstays true buthasMorebecomes false, hiding the button. The user can never click 'Show less' — they're stuck with showAll=true, though it's functionally harmless since slice(0, 5) on fewer items returns all of them anyway. Not a real bug, but the state is stale.[fixable]
|
|
||
| const hasUrgent = tier1Count > 0; | ||
| const [manualOpen, setManualOpen] = useState<boolean | null>(null); | ||
| const [showAll, setShowAll] = useState(false); |
Owner
Author
There was a problem hiding this comment.
🔵 bugs: If the user clicks 'Show all' and items subsequently shrink below DEFAULT_VISIBLE_COUNT (e.g., a todo is completed), showAll stays true but hasMore becomes false, hiding the button. The user can never click 'Show less' — they're stuck with showAll=true, though it's functionally harmless since slice(0, 5) on fewer items returns all of them anyway. Not a real bug, but the state is stale. [fixable]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MAX_ITEMS=5cap fromuseAttentionFeedhook — all attention items are now returnedTest plan
useAttentionFeedtest: verifies all 10 items returned (was asserting 5-cap)🤖 Generated with Claude Code