Skip to content

Comments

feat filter as you type#9

Merged
shouze merged 3 commits intomainfrom
feat-filter-as-you-type
Feb 19, 2026
Merged

feat filter as you type#9
shouze merged 3 commits intomainfrom
feat-filter-as-you-type

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Feb 19, 2026

  • feat(filter): as you type
  • doc(readme): update
  • v1.1.0

Copilot AI review requested due to automatic review settings February 19, 2026 02:39
@github-actions
Copy link

Coverage after merging feat-filter-as-you-type into main will be

97.45%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api.ts100%100%100%100%
   group.ts100%100%100%100%
   output.ts98.91%100%94.74%99.39%45
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts77.01%100%88.89%75.64%128, 130–132, 79–93
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze force-pushed the feat-filter-as-you-type branch from cc0ae63 to 0e440d1 Compare February 19, 2026 02:40
@github-actions
Copy link

Coverage after merging feat-filter-as-you-type into main will be

97.45%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api.ts100%100%100%100%
   group.ts100%100%100%100%
   output.ts98.91%100%94.74%99.39%45
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts77.01%100%88.89%75.64%128, 130–132, 79–93
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze merged commit 6c2a4fd into main Feb 19, 2026
4 checks passed
@shouze shouze deleted the feat-filter-as-you-type branch February 19, 2026 02:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a "filter as you type" feature to the interactive TUI, allowing users to see filtered results in real-time as they type in filter mode. Previously, filtering only applied after pressing Enter.

Changes:

  • Implemented live filtering by using filterInput to filter rows while typing in filter mode
  • Added cursor clamping when typing/backspacing to prevent invalid cursor positions
  • Version bumped from 1.0.5 to 1.1.0
  • Improved README formatting by wrapping replay commands in collapsible <details> sections

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/tui.ts Added activeFilter logic to use filterInput during filter mode for live filtering, and cursor clamping on backspace/printable character input
src/render.test.ts Added test case for live-filtering behavior and formatting improvements for multi-line function calls
package.json Version bump from 1.0.5 to 1.1.0
README.md Fixed version example, improved documentation formatting with collapsible sections, and removed stray markdown artifacts
Comments suppressed due to low confidence (1)

src/tui.ts:109

  • When typing or backspacing in filter mode, the cursor is clamped to the new filtered row list but scrollOffset is not adjusted. This differs from the Enter key handler (line 99) and reset filter handler (line 170) which both clamp scrollOffset after clamping the cursor. If the cursor becomes less than scrollOffset due to filtering, it will be off-screen. Consider adding scrollOffset = Math.min(scrollOffset, cursor); after cursor clamping on lines 104 and 109.
        cursor = Math.min(cursor, Math.max(0, newRows.length - 1));
      }
      redraw();
      continue;
    }

    // ── Normal mode ─────────────────────────────────────────────────────────
    const rows = buildRows(groups, filterPath);
    const row = rows[cursor];


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


```bash
INSTALL_DIR=~/.local/bin VERSION=v1.2.0 \
INSTALL_DIR=~/.local/bin VERSION=v1.0.6 \
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The version example changed from v1.2.0 to v1.0.6, but package.json is being bumped from 1.0.5 to 1.1.0. The version v1.0.6 in this example doesn't match either the old version (1.0.5) or the new version being released (1.1.0). Consider updating this to v1.0.5 (to reference a past stable release) or v1.1.0 (to reference the version being released in this PR).

Suggested change
INSTALL_DIR=~/.local/bin VERSION=v1.0.6 \
INSTALL_DIR=~/.local/bin VERSION=v1.1.0 \

Copilot uses AI. Check for mistakes.
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