refactor(tui): screen registry + CLI-fork data broker (deepening #6 + #7)#257
Merged
Conversation
) #6: one TUI_SCREEN_REGISTRY (token -> handler) + _tui_invoke_screen dispatcher replaces the duplicated manage/secrets/sysinfo/help token->screen case arms in the fzf navigator, the whiptail main loop, and _tui_dispatch (one source of truth; unknown token is a safe no-op). Navigator loop structure unchanged. #7: tui_broker_init forks list/detect --json ONCE per session into cached temp files with a single error path; tui_broker_list_json / tui_broker_detect_json serve the cache (no re-fork). The fzf --preview cache folds into the broker; per-invocation forks (show / install_plan / manage_plan / installed) stay direct. G4 preserved (TUI sources no engine lib). Two adapters justify the seam: real CLI fork (prod) + injected JSON (tests). Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
TUI front-matter deepenings #6 + #7 (grilling-locked), precursor to phase 3.
TUI_SCREEN_REGISTRY(token -> handler) +_tui_invoke_screenreplaces the manage/secrets/sysinfo/help token->screencasearms duplicated across the fzf navigator, the whiptail main loop, and_tui_dispatch. Unknown token is a safe no-op. Navigator loops unchanged.tui_broker_initforks list/detect --json once per session(cached temp files, single error path);
tui_broker_list_json/detect_jsonserve the cache. The fzf
--previewcache folds into the broker;per-invocation forks stay direct. G4 preserved.
Test plan
quick_setup / review): 0 failures.
Deepening #6 + #7.
.agents/memoryuntouched.Generated with Claude Code.