Skip to content

Expose console command execution#85

Open
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-export-execute
Open

Expose console command execution#85
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-export-execute

Conversation

@M09Ic

@M09Ic M09Ic commented Jun 27, 2026

Copy link
Copy Markdown

Background

Menu.RunCommandArgs is the normal public entry point for programmatic execution, but it always goes through the active-menu reset flow. Some integrations prepare a menu command tree themselves and need direct access to the lower-level execution path that StartContext and RunCommandArgs use internally.

Approach

  • Add Console.Execute(ctx, menu, args, async) as a small public wrapper around the existing internal execution path.
  • Keep the existing execute implementation and current callers unchanged.
  • Document that most callers should continue using Menu.RunCommandArgs unless they already prepared a menu.

Tests

  • Added a regression test that executes a prepared menu command through Console.Execute.
  • Verified the target command runs and the console execution flag is cleared afterwards.
  • Ran go test ./...

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 23.59%. Comparing base (7002774) to head (48286e5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   22.54%   23.59%   +1.05%     
==========================================
  Files          27       27              
  Lines        2045     2047       +2     
==========================================
+ Hits          461      483      +22     
+ Misses       1554     1528      -26     
- Partials       30       36       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant