Skip to content

feat: Implement Search Query History (Up/Down Navigation) (#63)#125

Open
pisum-sativum wants to merge 1 commit into
pie-314:mainfrom
pisum-sativum:feature/search-query-history
Open

feat: Implement Search Query History (Up/Down Navigation) (#63)#125
pisum-sativum wants to merge 1 commit into
pie-314:mainfrom
pisum-sativum:feature/search-query-history

Conversation

@pisum-sativum

Copy link
Copy Markdown

This PR implements an internal query history feature for the trx TUI application. It saves users from having to re-type previous search queries by allowing them to navigate through prior searches using the Up and Down arrow keys when in search editing mode.

Features implemented:

  • Loaded search history from ~/.local/state/trx/search_history on startup.
  • Automatically persisted successful search queries (avoiding duplicates) to the local history file.
  • Enabled standard shell readline-like behavior for Up and Down navigation in InputMode::Editing.
  • Correctly saved and restored the in-progress input when navigating back past the most recent entry.
  • Reset the history navigation state upon character insertion, deletion, Enter, or Esc.

Fixes #63

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual test (Verified that navigating up/down cycles through previous searches correctly, that the history file is written to the expected path without duplicate entries, and that the active/in-progress query buffer is restored correctly when navigating down past the end of the history).

Checklist:

  • My code follows the Coding Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have NOT added useless AI-generated comments.
  • I have NOT deleted existing unrelated comments.
  • I have NOT modified files unrelated to this task.
  • I have included screenshots/recordings (for UI changes).
  • My changes generate no new warnings (clippy/fmt).
  • I have linked the issue I am working on.

Screenshots (if applicable)

trx_tui_mockup_1780698594458

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

@pisum-sativum is attempting to deploy a commit to the pie's projects Team on Vercel.

A member of the Team first needs to authorize it.

@pie-314 pie-314 added the ai-slop label Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Search Query History (Up/Down Navigation)

2 participants