Skip to content

Fix mention selection to respect filtered file count#557

Draft
RajPabnani03 wants to merge 1 commit intoathasdev:masterfrom
RajPabnani03:claude/fix-bug-KZRvD
Draft

Fix mention selection to respect filtered file count#557
RajPabnani03 wants to merge 1 commit intoathasdev:masterfrom
RajPabnani03:claude/fix-bug-KZRvD

Conversation

@RajPabnani03
Copy link

Pull Request

Description

Fixed a bug in the AI chat mention selection where the selectNext function was hardcoded to allow a maximum of 5 items (index 0-4), regardless of the actual number of filtered files available. This caused incorrect behavior when selecting through mentions with fewer items.

Changes Made

  • Updated selectNext action to accept totalItems parameter instead of using hardcoded limit of 4
  • Modified the selection logic to calculate maxIndex based on the actual number of filtered files
  • Updated the type signature in AIChatActions interface to reflect the new parameter
  • Updated the call site in ai-chat-input-bar.tsx to pass the filtered files count when invoking selectNext

Related Issues

Closes #

Checklist

https://claude.ai/code/session_01PwR8J37gjzpQ1tEbEJUgTi

Copy link
Author

@RajPabnani03 RajPabnani03 left a comment

Choose a reason for hiding this comment

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

Fix hard-coded index bound in mention dropdown navigation

@RajPabnani03 RajPabnani03 force-pushed the claude/fix-bug-KZRvD branch from 12d2db9 to 6e1f1f0 Compare March 9, 2026 07:02
@RajPabnani03 RajPabnani03 marked this pull request as draft March 9, 2026 07:15
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