refactor(mqlaunch): de-layer git & release menu launchers into a lib (Step 11a)#45
Merged
Conversation
…(P4 / Step 11a) Fifth Step 11a slice. Pull the git and release menu launchers (open_git_menu, open_release_menu) out of the mqlaunch.sh monolith into mqlaunch/lib/git-menus.sh, sourced back into the launcher's scope. Both launch an external menu script (gitlaunch.sh / mq-release-menu.sh) and invalidate the cached dashboard header on return. Verbatim move, no behavior change: still uses the ambient UI helpers, $BASE_DIR, and command -v-guarded mq_dashboard_cache_invalidate / release_menu_loop; every caller (main dispatch, command-mode, mq-main-menu) resolves because the lib sources before dispatch. Launcher: 1547 → 1479 lines (~600 out since 11a began). Two existing contract tests referenced these functions by their old home and correctly failed on the move — repointed to git-menus.sh (git-route→gitlaunch in test-mqlaunch.sh; cache-invalidation-on-Back in dashboard-header-cache-smoke). The contracts are unchanged, only the file that owns them. Smoke CONCERNS row added (31 functions across 4 libs); AUTHORITY_MAP and CHANGELOG updated. Scoping note: run_git_screen at the top of mqlaunch.sh is dead there (no live caller in the launcher graph; the live copy lives in tools/scripts/mqlaunch_desktop.sh), so it is deliberately NOT moved here — dead code is a separate cleanup, not something to launder into a lib as if live. run_github_repo_picker is live but a ~117-line picker; its own follow-up slice. 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.
What
Fifth slice of Step 11a (monolith de-layering, audit P4). Pull the git & release menu launchers out of
terminal/launchers/mqlaunch.shintomqlaunch/lib/git-menus.sh:open_git_menu,open_release_menu.Both launch an external menu script (
gitlaunch.sh/mq-release-menu.sh) and invalidate the cached dashboard header on return (a commit/stash/tag makes cached Git status stale).$BASE_DIR, andcommand -v-guardedmq_dashboard_cache_invalidate/release_menu_loop. No behavior change.mq-main-menu).Tests caught the move (safety net working)
Two existing contract tests referenced these functions by their old home and correctly failed:
test-mqlaunch.sh— "Git route uses gitlaunch"dashboard-header-cache-smoke.sh— "…menus invalidate the cache on Back"Both repointed to
git-menus.sh. The contracts are unchanged, only the file that owns them.Guard
Added the git-menus row to
tests/monolith-delayer-smoke.sh— now 31 functions across 4 concern libs.Deliberately out of scope
run_git_screenat the top ofmqlaunch.shis dead there — no live caller in the launcher graph; the live copy lives intools/scripts/mqlaunch_desktop.sh. Not moved: dead code is a separate cleanup, not something to launder into a lib as if it were live.run_github_repo_pickeris live but a ~117-line picker — its own follow-up slice.Verification
Full selftest suite green (145 shell files lint clean); shellcheck clean on the new lib; markdownlint clean; resolution smoke confirms both functions resolve after sourcing.
Part of the
v2.0.0runtime-authority track; 11a unblocks Step 12 (v1 removal).🤖 Generated with Claude Code