Skip to content

Add tab completion for table and column names #1

@rohitgs28

Description

@rohitgs28

Summary

When typing SQL in the query input, pressing Tab should show a popup with matching table/column names from the schema.

Current Behavior

Tab cycles between panels.

Expected Behavior

  • When the cursor is in the query input and text is partially typed, Tab shows completions
  • Completions are sourced from app.schema.tables and their columns
  • Arrow keys navigate the popup, Enter selects
  • Tab without partial text still cycles panels

Technical Notes

  • Schema is already available in App.schema: SchemaInfo
  • Consider fuzzy matching (e.g. us matches users)
  • Popup can be rendered as a floating ratatui widget
  • See src/app.rs handle_key() for input handling

Files to modify

  • src/app.rs (Tab key handling)
  • src/ui/renderer.rs (completion popup rendering)
  • NEW: src/ui/components/autocomplete.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededui/uxTerminal UI improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions