TUI infrastructure improvements#15
Open
freesig wants to merge 27 commits into
Open
Conversation
…from dir The seed feature now opens a full filesystem tree browser instead of a plain text path input. Users can expand/collapse directories, navigate with arrow keys, go above home with Backspace, and select with S.
After selecting a directory, a new screen lets you choose exploration depth (1–5) before seeding. Uses the existing recursive ingest backend instead of single-level seed_spec, with background status polling.
Add candidate browsing and acceptance to the spec_view content panel. When a node has candidates, they appear below the answer section with [/] to browse and [y] to accept. Candidates persist after acceptance.
Both create-spec and seed-from-directory flows now prompt the user to choose between local/remote and development/exploration before proceeding, passing the selection through to the spec-forest API.
Wire [f] and [n] keybindings in SpecView to create new root features and child questions via the external editor, using existing backend create_feature and add_child APIs.
Poll sync connection status on every tick and display a red "Sync: not connected" label in the footer when a sync URL is configured but the connection is not established (not logged in, login failed, or connection dropped).
Add a settings screen accessible from the spec view (press [g]) that shows the current active directory and allows changing it via the directory browser or clearing it. The directory automatically flows to AI prompts for development-mode specs once set.
Sync module and other shared library code used eprintln!() which writes to stderr and corrupts the TUI alternate screen, leaving lingering text after operations like sync login. Switched all eprintln calls to tracing macros so messages route to the log file instead. Also fixed a test that used an 80-column terminal too narrow for the full footer text.
Captures tracing events into an in-memory ring buffer via a custom tracing Layer, displayed as a bottom panel toggled with [l]. Supports scrolling with PgUp/PgDn. File logging is unaffected.
… support Show all candidate answer texts instead of only the selected one, fix misleading [/] browse hint to show actual keybindings, and add [E] to load the selected candidate into the external editor for editing before submission.
Tab focus switching no longer desyncs the displayed node. Removed node_selected flat list index in favor of always using tree_state for selection. Main panel Up/Down now navigates siblings.
Answering a question no longer automatically generates child nodes by default. A new "Auto Explore" toggle in the Config screen (g) controls this behavior, persisted across sessions via the settings table.
Log model, prompt size, response size, and elapsed time on success, failure, and timeout paths for better observability of Claude API calls.
The TUI now exclusively uses the spec-forest API layer instead of accessing the database directly. Added missing API functions (get_children, get_next_question, get/set_setting) and re-exported DB types from spec-forest so frontends don't need a direct dep.
The editor now shows both fields as editable sections (## Question / ## Answer) so existing answers are preserved and either field can be updated independently. The flat-list 'e' key now edits the selected node instead of fetching the next unanswered question.
The comment filter in run_editor() was stripping all lines starting with '#', including the '## Question' and '## Answer' section markers that parse_question_answer() needs. This caused edited answers to be placed into the question field instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.spec-forestacross all cratesStack
Test plan