feat(fuzzy-finder): add operation completion and Value/Label fzf support#527
feat(fuzzy-finder): add operation completion and Value/Label fzf support#527
Conversation
Add fuzzy completion for SHOW OPERATION statement, listing DDL operations with multiline display showing DDL statements as labels and operation IDs as values. Refactor fzf integration to support Value/Label separation (fzfItem type) enabling different display and insert text, with multiline rendering for operation candidates. Refs #521, #526 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @apstndb, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the fuzzy finder capabilities by introducing support for Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces fuzzy completion for SHOW OPERATION and significantly refactors the fuzzy finder implementation to support separate display (Label) and insertion (Value) texts. This is achieved by introducing an fzfItem struct and updating the caching, fzf execution, and candidate fetching logic accordingly. The changes also add support for multiline display in the fuzzy finder, improving the user experience for complex items like DDL operations. The test suite has been substantially updated to cover the new functionality and refactoring, including a new test helper to run fzf in filter mode. My review found one high-severity issue related to the choice of delimiter for separating Value and Label, which could lead to incorrect completions if the data contains tab characters. I've suggested using a non-printable control character to resolve this.
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (71393af) | #527 (ecc065f) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 67.8% | 68.0% | +0.1% |
| Files | 55 | 55 | 0 |
| Lines | 5959 | 6039 | +80 |
+ | Covered | 4046 | 4108 | +62 |
+ | Code to Test Ratio | 1:1.2 | 1:1.2 | +0.0 |
| Code | 13683 | 13819 | +136 |
+ | Test | 17037 | 17235 | +198 |
+ | Test Execution Time | 1m11s | 1m2s | -9s |Code coverage of files in pull request scope (57.1% → 58.9%)
Reported by octocov |
Replace tab character with \x01 (SOH) as the delimiter between Value and Label to prevent data corruption if values contain tab characters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and well-executed refactoring of the fuzzy finder to support separate Value and Label items, enabling more descriptive completion candidates. This is nicely demonstrated by the new SHOW OPERATION completion, which displays multiline DDL statements as labels while inserting just the operation ID. The changes also improve testability by isolating fzf option preparation. However, I found a critical issue in the new fetchOperationCandidates function that will prevent the code from compiling.
|
/gemini summary |
Summary of ChangesThis pull request significantly enhances the fuzzy finder's capabilities by introducing support for Highlights
Changelog
Activity
|
Summary
SHOW OPERATIONstatement — lists DDL operations with multiline display showing DDL statements as labels and operation IDs as insert valuesfzfItemtype) enabling different display and insert text, with--delimiter/--with-nthfor display andextractValue()for result extraction--read0,--multi-line,--gap) with dynamic height calculation for operation candidates[]stringto[]fzfItemRefs #521, #526
Test plan
make checkpasses (test + lint + fmt-check)SHOW OPERATION+ Ctrl+T shows DDL operations with multiline DDL labels[]fzfItemtype🤖 Generated with Claude Code