Skip to content

feat: add search filtering to shared libraries tab#142

Open
kimjune01 wants to merge 4 commits into
orhun:mainfrom
kimjune01:search-shared-libraries
Open

feat: add search filtering to shared libraries tab#142
kimjune01 wants to merge 4 commits into
orhun:mainfrom
kimjune01:search-shared-libraries

Conversation

@kimjune01
Copy link
Copy Markdown

Adds / search functionality to the General tab (shared libraries).

  • Filters by library name or path (case-insensitive)
  • Empty query shows all entries

Closes #45

kimjune01 added 2 commits May 10, 2026 07:43
Implements case-insensitive search in the General tab (shared libraries)
matching the pattern used in Static, Dynamic, and Strings tabs. Users
can press "/" to filter dependencies by name or path.

Fixes orhun#45
@kimjune01 kimjune01 requested a review from orhun as a code owner May 10, 2026 14:48
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
βœ… Project coverage is 3.39%. Comparing base (1a39294) to head (d2dcd8e).

Files with missing lines Patch % Lines
src/tui/ui.rs 0.00% 10 Missing ⚠️
src/tui/state.rs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #142      +/-   ##
========================================
- Coverage   3.41%   3.39%   -0.02%     
========================================
  Files         19      19              
  Lines       2201    2217      +16     
========================================
  Hits          75      75              
- Misses      2126    2142      +16     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@orhun
Copy link
Copy Markdown
Owner

orhun commented May 12, 2026

Hey, thanks for the PR!

When I press /, I don't see any search query indicator in the UI, which should be visible I think.
We can probably make it part of the bottom border of the block (similar to the other menus).

Mirrors the pattern from render_static_analysis (src/tui/ui.rs:751-771)
so the search input is visible when filtering the Dependencies table on
the General tab. Adds a bottom-border title with the search query and
renders the cursor while in input mode.

The input line is constructed inline (rather than reusing get_input_line)
because the existing helper borrows from state, which conflicts with the
later mutable borrow of state.list.state in render_stateful_widget.
@kimjune01
Copy link
Copy Markdown
Author

Looking into it now

@kimjune01
Copy link
Copy Markdown
Author

Pushed the bottom-border indicator (a127210) β€” |search: <query>| now sits next to the |N/M| count.

CI reds aside from Code format (mine, fixed in d2dcd8e) reproduce on main β€” rust 1.95's manual_saturating_arithmetic lint and duplicate thiserror/windows-targets in cargo deny, both unrelated to this diff.

One thing surfaced during testing: each keystroke rebuilds SelectableList via with_items (widgets/list.rs::new), which resets selection to 0 β€” type a char and the cursor jumps to the top of the filtered list. Intentional, or want me to preserve the prior selection when it survives the filter?

@kimjune01
Copy link
Copy Markdown
Author

Indicator is now in the Dependencies block bottom border, mirroring the |N/M| count style. Verified the keystroke protocol in a clean Linux container (rust:1.95 + tmux, ls as the target since it has 6 deps).

Bottom border of the Dependencies block across the input lifecycle:

Baseline (no input mode):

└────────...────────|1/6|β”˜

After /:

└────... ──────|search:  |─────────────|1/6|β”˜

After typing lib:

└─────... ───────|search: lib |───────|1/6|β”˜

After Esc:

└────────...────────|1/6|β”˜

The search: segment is yellow, the query text uses the accent color, the brackets match the existing |N/M| gray. Cursor renders inside the indicator while in input mode. Disappears entirely when input is cleared and mode exits, so the baseline UI is unchanged for users who never hit /.

Full keystroke captures (200x80 tmux pane) and the docker attestation script are in commit d2dcd8e's receipt at ~/.sweep/attestations/orhun-binsider-142-fix-d2dcd8e/ on my end β€” happy to attach the PNGs here if useful.

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.

Support searching for shared libraries

2 participants