Skip to content

feat(ui): make What's Next feed scrollable beyond 5 items#354

Open
dimakis wants to merge 1 commit into
mainfrom
feat/attention-feed-scrollable
Open

feat(ui): make What's Next feed scrollable beyond 5 items#354
dimakis wants to merge 1 commit into
mainfrom
feat/attention-feed-scrollable

Conversation

@dimakis
Copy link
Copy Markdown
Owner

@dimakis dimakis commented May 22, 2026

Summary

  • Remove the hard MAX_ITEMS=5 cap from useAttentionFeed hook — all attention items are now returned
  • Component shows first 5 items by default with a "Show all N" / "Show less" toggle button
  • Header badge now shows the true tier-1 count (was previously capped at 5)

Test plan

  • Updated useAttentionFeed test: verifies all 10 items returned (was asserting 5-cap)
  • Verify on mobile: "What's Next" shows 5 items, tap "Show all" to expand, "Show less" to collapse
  • Verify badge count shows true total when >5 sessions awaiting reply

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown
Owner Author

@dimakis dimakis left a comment

Choose a reason for hiding this comment

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

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), 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]


const hasUrgent = tier1Count > 0;
const [manualOpen, setManualOpen] = useState<boolean | null>(null);
const [showAll, setShowAll] = useState(false);
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

🔵 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]

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