Skip to content

feat: runtime config editing — add/save tabs with YAML validation - #20

Merged
clobrano merged 6 commits into
mainfrom
claude/runtime-config-editing-L9rA6
May 24, 2026
Merged

feat: runtime config editing — add/save tabs with YAML validation#20
clobrano merged 6 commits into
mainfrom
claude/runtime-config-editing-L9rA6

Conversation

@clobrano

Copy link
Copy Markdown
Owner
  • "+" opens a two-step floating dialog (name → command) to add a new
    tab; the new TabConfig is validated against the full config before
    config.yaml is written, preventing broken configs
  • "w" on any config tab saves the current (possibly edited) command
    back to config.yaml immediately
  • "w" on the Search tab prompts for a name and saves the search command
    as a permanent tab entry in config.yaml
  • After a successful add, the new tab is appended to the tab bar and
    focused automatically
  • tabs.AddTab(), config.SaveConfig(), TabAddedMsg / ConfigSavedMsg
    wired into the Elm-style Update loop; disk I/O runs in a Cmd goroutine
    so the TUI stays responsive
  • Footer hints updated to advertise [w]save and [+]new tab

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz

claude added 6 commits May 20, 2026 12:26
- "+" opens a two-step floating dialog (name → command) to add a new
  tab; the new TabConfig is validated against the full config before
  config.yaml is written, preventing broken configs
- "w" on any config tab saves the current (possibly edited) command
  back to config.yaml immediately
- "w" on the Search tab prompts for a name and saves the search command
  as a permanent tab entry in config.yaml
- After a successful add, the new tab is appended to the tab bar and
  focused automatically
- tabs.AddTab(), config.SaveConfig(), TabAddedMsg / ConfigSavedMsg
  wired into the Elm-style Update loop; disk I/O runs in a Cmd goroutine
  so the TUI stays responsive
- Footer hints updated to advertise [w]save and [+]new tab

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz
- Reorder footer: [w]save and [+]new tab now appear first in the hint
  line on all states (normal, filtered, Search tab) so they are always
  visible even in narrow terminals
- Add [w] to filtered-state footer (was missing)
- Intercept 'w' inside the command-edit dialog (Enter key, config tab):
  applies the new command AND saves config.yaml in one keystroke
- Show "[w] apply + save to config.yaml" in the edit dialog's key-hint
  line via new WithExtraHints() on InputModel
- README: add Runtime Config Editing section and keyboard shortcut table

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz
The footer was reordered to put [w]/[+] first, but the right fix is to
let the long hint string wrap at the terminal width.

- Add wrapAtWidth() helper that breaks on word boundaries at m.width
- Apply it to all three footer states (normal, filtered, search tab)
- [w]save and [+]new tab are back at their natural end position; they
  become visible on the wrapped second line in narrow terminals
- Bump list-height budget from height-5 to height-6 to reserve space
  for a potential second footer line (footer area now 4: \n\n + 2 lines)

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz
[w] is now a contextual hint: it appears exclusively in the
command-edit dialog (opened with Enter on a config tab) via
WithExtraHints(), where it is actually usable.

Removed [w]save / [w]save as tab from all three footer lines
(normal, filtered, search tab). [+]new tab remains in the footer
since it is always available.

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz
'w' is a printable character and would be consumed by kubectl get
expressions typed inside the input dialogs. Ctrl+W is a safe chord
that does not conflict with any command text.

Updated all three sites: main-view key handler, ViewSearchTab intercept,
dialog extra-hint label, and README shortcut table.

https://claude.ai/code/session_01GYo9iNKVfzrzZafwzRr7hz
@clobrano
clobrano merged commit 8400bc1 into main May 24, 2026
2 of 3 checks passed
@clobrano
clobrano deleted the claude/runtime-config-editing-L9rA6 branch May 24, 2026 16:19
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.

2 participants