Skip to content

Settings screen: sectioned layout + breadcrumbs (#76)#77

Merged
BunsDev merged 1 commit into
mainfrom
worktree-issue-76-settings-sections
Jun 11, 2026
Merged

Settings screen: sectioned layout + breadcrumbs (#76)#77
BunsDev merged 1 commit into
mainfrom
worktree-issue-76-settings-sections

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 11, 2026

Copy link
Copy Markdown
Member

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 Code header, with scroll tracking based on a hardcoded visible_rows = 10 estimate.

Changes

  • Sections — entries are grouped into Response, Context, Interface, and Workflow, with non-selectable uppercase section headers (and blank-line gaps) in the list. Selection and search continue to index entries only, so Up/Down skips headers naturally.
  • Breadcrumbs — the header now reads Settings › <Section> following the selection, extending to › <Setting> while a numeric field is being edited. Esc close stays right-aligned with width computed from the actual breadcrumb length.
  • Section-aware search — the filter matches section names as well as labels (interface surfaces the whole Interface section; git branch still finds the single matching label). Filtering logic is consolidated into one filtered_entries helper used by render, description, navigation, and toggle paths (it was previously duplicated inline four times).
  • Real scroll math — the selected row is centred against the actual viewport height (headers included) and clamped at the list end; the scroll_offset field and its rough-estimate update_scroll_offset_for_selection helper are gone.

Testing

  • New tests: every entry belongs to a known section, sections are contiguous and in SECTIONS order, search by section name, search by label.
  • Updated the index-based toggle test to look up by key (entry order changed with grouping).
  • cargo test -p claurst-tui — 634 passed, 0 failed; workspace check clean; no new clippy warnings; fmt clean.

Closes #76

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 11, 2026 04:40
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jun 11, 2026 4:41am

@BunsDev BunsDev merged commit fcb3bd0 into main Jun 11, 2026
2 checks passed
@BunsDev BunsDev deleted the worktree-issue-76-settings-sections branch June 11, 2026 04:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 › Section and › Setting while editing) with right-aligned “Esc close”.
  • Consolidate filtering into a single filtered_entries helper and switch to viewport-driven scroll centering (removing the old rough scroll_offset logic).

💡 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"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings screen: sectioned layout + breadcrumbs instead of a flat full-width list

2 participants