mecatui: live-reload operator settings (keymap) without restart
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 152
- Forks
- 16
- Avg merge
- 14h 48m
- Merged PRs (30d)
- 536
Description
Problem
mecatui reads the operator-tier keymap: overrides from ~/.config/mecatl/settings.yaml exactly once at startup — applyKeyOverridesToDeps in cmd/mecatui/main.go runs before tea.NewProgram, bakes the result into ui.Deps.KeyOverrides, and ui.New applies it at construction (model.go). There is no re-read path: no fsnotify watch, no /reload palette command, no signal handler. An operator who edits settings.yaml must quit and relaunch mecatui to pick up a keybinding change.
Why it's worth fixing
Keybinding remapping is an iterative, taste-driven activity — an operator trying to find a comfortable home for Agents/Effort (e.g. to free ctrl+a/ctrl+e for line editing, see #455) will want to try a chord, feel it, and adjust. A full restart per iteration is friction that discourages the very configurability the feature offers.
Possible shapes (design TBD)
- A
/reloadpalette command that re-readssettings.yaml, re-validates the keymap, and swapsm.keysin place (rebuilding help markings). - An fsnotify watch on the settings file that does the same automatically on save.
- Either must handle: an invalid edited file (keep the last-good keymap + surface a loud warning, don't crash or drop bindings), and chords whose action is mid-overlay (e.g. remapping
CancelChildwhile the agents overlay is open).
Scope note
The validator (keymap.Parse/keymap.Validate) and the override application (applyKeyOverrides) already exist and are pure — the work is the reload trigger + safe in-place swap + a warning surface, not new keymap machinery. See #455 for the documentation side of the keymap feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read cmd/mecatui/main.go and model.go, starting at applyKeyOverridesToDeps and ui.New to trace how key overrides are loaded and applied. Define a reload trigger and safe in-place swap using the existing validator, preserving the last-good keymap and surfacing invalid-file warnings, including when an overlay is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100