Settings screen: sectioned layout + breadcrumbs (#76)#77
Merged
Conversation
Resolves audit item P2 #10: the settings screen rendered all ~20 settings as one flat full-width list with a static header and a hardcoded visible_rows = 10 scroll estimate. - Group entries into four sections — Response, Context, Interface, Workflow — with non-selectable uppercase section headers in the list; selection and filtering index entries only. - Header is now a breadcrumb that follows the selection (Settings › Section, plus › Setting while editing a field). - Search matches section names as well as labels, so "interface" surfaces a whole section. - Scroll math centres the selected row in the real viewport height and clamps at the list end, replacing the scroll_offset field and its rough-estimate update helper. Closes #76 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the TUI settings screen (/config / /settings) to improve navigability by grouping settings into sections, adding a selection-following breadcrumb header, and making search/scroll behavior reflect the real rendered list.
Changes:
- Group settings into Response / Context / Interface / Workflow with non-selectable section headers in the list.
- Add a dynamic breadcrumb header (
Settings › Sectionand› Settingwhile editing) with right-aligned “Esc close”. - Consolidate filtering into a single
filtered_entrieshelper and switch to viewport-driven scroll centering (removing the old roughscroll_offsetlogic).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+314
to
+316
| kind: SettingKind::Enum { | ||
| options: vec!["text", "json", "streamjson"], | ||
| }, |
Comment on lines
+44
to
+46
| /// Section display order. Entries within `all_entries` are already grouped; | ||
| /// this list exists so tests can assert the grouping stays contiguous. | ||
| pub const SECTIONS: [&str; 4] = ["Response", "Context", "Interface", "Workflow"]; |
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.
Resolves audit item P2 #10 (
docs/AUDIT-2026-06.md), the last unfiled P2 item, now tracked as #76.Before
All ~20 settings rendered as one flat full-width list in definition order, under a static
Settings — Coven Codeheader, with scroll tracking based on a hardcodedvisible_rows = 10estimate.Changes
Settings › <Section>following the selection, extending to› <Setting>while a numeric field is being edited.Esc closestays right-aligned with width computed from the actual breadcrumb length.interfacesurfaces the whole Interface section;git branchstill finds the single matching label). Filtering logic is consolidated into onefiltered_entrieshelper used by render, description, navigation, and toggle paths (it was previously duplicated inline four times).scroll_offsetfield and its rough-estimateupdate_scroll_offset_for_selectionhelper are gone.Testing
SECTIONSorder, search by section name, search by label.cargo test -p claurst-tui— 634 passed, 0 failed; workspace check clean; no new clippy warnings; fmt clean.Closes #76
🤖 Generated with Claude Code