feat(config-settings): four-page TUI (Universal · Session · Sponge · Paths) #66
Reference in New Issue
Block a user
Delete Branch "feat/config-settings-pages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extends the
config-settingsTUI from a two-scope toggle table into a four-page interface, surfacing non-boolean settings (sponge tuning, scrollback/path variables) that previously required editing files by hand.Pages cycle with
Tab/Shift-Tab:set -Uset -gsponge_delay,sponge_purge_only_on_exit,sponge_allow_previously_successful,sponge_successful_exit_codes,__fish_sponge_extra_sensitive__fish_scrollback_history_dir,__fish_scrollback_history_max_files,__fish_user_dots_path(moved off the toggle table)Toggle rows use
←/→(OFF ← DEFAULT → ON); value rows (path/int/list) edit inline withEnterand clear with←.New row-type model
Each row is typed (
toggle/bool/path/int/list); draw and event-handling dispatch on the type. New helpers:__config_settings_pagetab,__config_settings_draw_value,__config_settings_get_raw,__config_settings_set_value. Every page renders exactly 16 lines, preserving the existing wrap-aware redraw geometry.Scrollback variables
__fish_scrollback_history_dir/_max_filesare now the fish-style source of truth;config.fishexports theSCROLLBACK_HISTORY_*mirrors the POSIX wrappers (paru/yay/tmux/zellij logging,_prune_terminal_logs) read. It deliberately avoids creating a global source var, which would shadow the universal and break live edits.Bugs fixed along the way
string match -rreturned token substrings, so secret values were never actually scrubbed for non-exact var names (e.g.GITHUB_TOKENmatched asTOKEN→ unset deref → skipped). Fixed with--entire.__fish_sponge_extra_sensitivelets users add their own credential name tokens.true/false(sponge's convention), noton/off.set --input hardening.Variables added / surfaced
__fish_scrollback_history_dir,__fish_scrollback_history_max_files(new source-of-truth; mirror exported)__fish_sponge_extra_sensitive(new; extra credential name tokens)Docs:
docs/fish-config.md(§ Scrollback History, § Sponge History Filtering, config-settings reference),docs/fish-config.index, andREADME.mdupdated. The man page / HTML / wiki are CI-regenerated.Manual Verification
config-settings;Tabcycles Universal → Session → Sponge → Paths,Shift-Tabreverses.←/→move a category toggle OFF ← DEFAULT → ON; the value persists (set -Uvsset -gper page).Delay,OK codes,Extra secretedit viaEnter;Purge@exitandAllow prevtoggle via←/→and show ON/OFF correctly.Allow prevand confirmset -U sponge_allow_previously_successfulholdstrue/false(noton/off):set -S sponge_allow_previously_successful.Extra secret(e.g.ACME_API); in a fresh shell,set -gx ACME_API_KEY hunter2hunter2then run it — the command's value is scrubbed from history (history | grep hunter2returns nothing).Log dirviaEnter; after exiting,echo $SCROLLBACK_HISTORY_DIRreflects the new path in the same session;←on the row clears it back to default.Dots pathedits and clears on the Paths page (no longer on the toggle table).config-togglestill prints its deprecation notice and delegates.q/Escexit cleanly with the cursor restored.A blank or escaped inline edit, and the ← clear, previously erased the variable. sponge reads sponge_delay / sponge_purge_only_on_exit / sponge_allow_previously_ successful with no fallback, so an unset value crashed the prompt ('test: Missing argument'). Fixes: - Value rows reset to a per-row default value (sponge_delay→2, exit_codes→0) or erase only when the var tolerates unset (paths, extra-sensitive list). - Blank/escaped Enter reverts to that default instead of writing empty. - Sponge booleans are now a 2-state true/false (sponge's convention), never unset. - Defensive set -q;or set -l fallbacks added to the sponge consumer functions so a transiently-unset var can never error the prompt.