Skip to content

Conversation

@nikhilsaikethe
Copy link
Contributor

This PR fixes the issue in #9540

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Dec 10, 2025
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 10, 2025

Greptile Overview

Greptile Summary

Fixed the stream selection bug where user input remained visible after selecting a stream from the dropdown. The fix removes the condition that checked indexListSelectField.inputValue before clearing, allowing the input to be properly reset. Additionally, it now closes the dropdown menu automatically using hidePopup() to improve UX.

Key Changes

  • Removed the inputValue existence check that was preventing input clearing in web/src/plugins/logs/IndexList.vue:227-236
  • Added hidePopup() call to automatically close the dropdown menu after single stream selection
  • Improved conditional structure for better null-safety checks

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a focused bug fix that improves input clearing logic and UX by removing an overly restrictive condition and adding dropdown close behavior. The logic is defensive with proper null checks, and the change aligns with the existing pattern in handleMultiStreamSelection at web/src/plugins/logs/IndexList.vue:210
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
web/src/plugins/logs/IndexList.vue 5/5 Fixed input clearing logic and added dropdown close functionality when selecting single stream

Sequence Diagram

sequenceDiagram
    participant User
    participant QSelect as q-select (streamSelect)
    participant Component as IndexList Component
    participant SearchObj as searchObj State

    User->>QSelect: Types "def" in search input
    QSelect->>QSelect: Filters options (shows "default")
    User->>QSelect: Clicks on "default" stream
    QSelect->>Component: handleSingleStreamSelect(opt)
    Component->>SearchObj: Update selectedStream = [opt.value]
    Component->>Component: $nextTick() callback
    Component->>QSelect: Check if ref exists
    alt updateInputValue exists
        Component->>QSelect: updateInputValue("")
        QSelect->>QSelect: Clears input value
    end
    alt hidePopup exists
        Component->>QSelect: hidePopup()
        QSelect->>QSelect: Closes dropdown menu
    end
    Component->>Component: onStreamChange("")
    Component->>User: Input cleared, dropdown closed
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@nikhilsaikethe nikhilsaikethe merged commit 4e09819 into branch-v0.30.0 Dec 10, 2025
10 checks passed
@nikhilsaikethe nikhilsaikethe deleted the fix/issue-9540-0.30 branch December 10, 2025 05:16
nikhilsaikethe added a commit that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants