Conversation
- Drop `--detach` flag; users launch apps with target command after `--` - Simplify launch documentation and script examples - Archive previous "default + detach" design proposal - Reduce CLI complexity and option dependencies
📝 WalkthroughWalkthroughThe changes remove the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/main.cpp (1)
532-547: Unreachable code path after child process handling.After the loop exits,
child_pidis always > 0 (spawn succeeded at line 516, or we returned early at line 514). The control flow handles both!child_exited(lines 532-536) andchild_exited(lines 538-543), both of which return. Therefore, lines 544-547 ("Shutting down..." andEXIT_SUCCESS) are unreachable.Consider removing the unreachable code for clarity:
♻️ Suggested cleanup
if (child_pid > 0 && child_exited) { if (WIFEXITED(child_status)) { return WEXITSTATUS(child_status); } return EXIT_FAILURE; } - GOGGLES_LOG_INFO("Shutting down..."); } GOGGLES_LOG_INFO("Goggles terminated successfully"); return EXIT_SUCCESS; }Or alternatively, if you want to keep the success path for future extensibility, mark it explicitly:
// Note: Currently unreachable; kept for future modes that may not spawn a child GOGGLES_LOG_INFO("Shutting down...");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/app/main.cpp` around lines 532 - 547, The final GOGGLES_LOG_INFO("Shutting down...") and return EXIT_SUCCESS are unreachable because after spawning the child (child_pid) the branches handling !child_exited (calling terminate_child(child_pid) and returning EXIT_FAILURE) and child_exited (checking WIFEXITED(child_status) and returning WEXITSTATUS or EXIT_FAILURE) always return; remove the unreachable GOGGLES_LOG_INFO and EXIT_SUCCESS lines, or if you want to keep them for future modes, convert them into an explicit commented note above the log (e.g., "// Currently unreachable; kept for future non-child modes") so the intent is clear while leaving control flow unchanged — update references in main.cpp around child_pid, child_exited, WIFEXITED, child_status, and terminate_child accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/app/main.cpp`:
- Around line 532-547: The final GOGGLES_LOG_INFO("Shutting down...") and return
EXIT_SUCCESS are unreachable because after spawning the child (child_pid) the
branches handling !child_exited (calling terminate_child(child_pid) and
returning EXIT_FAILURE) and child_exited (checking WIFEXITED(child_status) and
returning WEXITSTATUS or EXIT_FAILURE) always return; remove the unreachable
GOGGLES_LOG_INFO and EXIT_SUCCESS lines, or if you want to keep them for future
modes, convert them into an explicit commented note above the log (e.g., "//
Currently unreachable; kept for future non-child modes") so the intent is clear
while leaving control flow unchanged — update references in main.cpp around
child_pid, child_exited, WIFEXITED, child_status, and terminate_child
accordingly.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
openspec/changes/add-headless-mode/tasks.mdopenspec/changes/archive/2026-02-07-update-launch-modes-default-detach/design.mdopenspec/changes/archive/2026-02-07-update-launch-modes-default-detach/proposal.mdopenspec/changes/archive/2026-02-07-update-launch-modes-default-detach/specs/app-window/spec.mdopenspec/changes/archive/2026-02-07-update-launch-modes-default-detach/tasks.mdscripts/task/profile.shscripts/task/start.shsrc/app/cli.cppsrc/app/cli.hppsrc/app/main.cpptests/app/test_cli.cpp
💤 Files with no reviewable changes (7)
- openspec/changes/archive/2026-02-07-update-launch-modes-default-detach/tasks.md
- src/app/cli.hpp
- openspec/changes/archive/2026-02-07-update-launch-modes-default-detach/specs/app-window/spec.md
- tests/app/test_cli.cpp
- openspec/changes/archive/2026-02-07-update-launch-modes-default-detach/design.md
- openspec/changes/archive/2026-02-07-update-launch-modes-default-detach/proposal.md
- scripts/task/profile.sh
User description
--detachflag; users launch apps with target command after--PR Type
Enhancement
Description
Remove
--detachflag; simplify CLI by requiring app command after--Eliminate detach mode validation logic and option dependencies
Unconditionally launch target app in default mode (no viewer-only option)
Update documentation and test cases to reflect simplified launch workflow
Diagram Walkthrough
File Walkthrough
4 files
Remove detach flag and simplify validationRemove detach boolean field from structEliminate detach mode branching in app launchRemove detach mode validation check1 files
Remove detach mode test cases6 files
Update usage docs and remove detach examplesMark smoke test task as completedArchive design notes for removed featureArchive proposal document for removed featureArchive specification for removed featureArchive task checklist for removed featureSummary by CodeRabbit
Documentation
Bug Fixes
Chores