Skip to content

Make add-in discovery opt-in with a configurable directory - #1020

Merged
Stephen Griffin (stephenegriffin) merged 2 commits into
mainfrom
feature/addin-directory
Oct 21, 2026
Merged

Stephen Griffin (stephenegriffin) merged 2 commits into
mainfrom
feature/addin-directory

Conversation

@stephenegriffin

Copy link
Copy Markdown
Member

Summary

Make add-in discovery explicitly opt-in in MFCMAPI and MrMAPI. An empty setting disables discovery; a configured directory is the sole, nonrecursive scan location.

  • Replace the Load Add-ins checkbox with an editable directory and Browse action, validating an existing absolute path on a local fixed drive, including its resolved target.
  • Preserve DLL inspection, architecture checks, and hash-based approvals. Accepting a changed or cleared directory resets remembered approvals and denials; loaded add-ins remain loaded until restart.
  • Initialize only AddInDirectory in MrMAPI through its registered option list, leaving other saved MFCMAPI options out of console behavior. Preserve -NoAddins and -ApproveAddins without adding a directory switch.
  • Add a reusable PathPane for directory, open-file, and save-file browsing, adopting it for add-ins, debug output, Load MAPI, PST paths, and Compute Store Hash.
  • Integrate compact help into the pane, fix scrolling Options layout, and forward wheel events from unfocused closed dropdowns to the dialog.
  • Fix the shared registry string reader to remove its trailing terminator while preserving embedded NULs for validation.

Validation

  • Existing VS Code Build Debug x64 and Build Debug x86 tasks passed.
  • All 261 x64 unit tests passed; all 17 focused x86 add-in tests passed.
  • Regression coverage includes path validation, persistence, discovery scope with distinct candidate hashes, approval-cache clearing, and excluding unrelated saved options from MrMAPI initialization.
  • CLI smoke checks passed with clean output for help and add-in overrides.
  • Native UI smoke checks passed for independent Browse actions, folder selection, picker/Options cancellation, compact help, wheel scrolling, and focused/expanded dropdown behavior.

Compatibility

Legacy LoadAddIns values are ignored. Existing users must explicitly configure an add-in directory; neither tool falls back to scanning beside its executable. Directory changes take effect on the next launch.

Share a fixed-local add-in directory between MFCMAPI and MrMAPI, disable discovery by default, and clear remembered decisions when the directory changes in Options.

Add reusable path browsing panes and fix Options layout and dropdown wheel behavior. Correct registry string termination handling and add regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread MrMapi/mmcli.cpp
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Test Results

    8 files  ± 0      8 suites  ±0   48s ⏱️ -1s
  261 tests + 9    261 ✅ + 9  0 💤 ±0  0 ❌ ±0 
2 088 runs  +72  2 088 ✅ +72  0 💤 ±0  0 ❌ ±0 

Results for commit 08fb41c. ± Comparison against base commit 105d2d3.

♻️ This comment has been updated with latest results.

@stephenegriffin
Stephen Griffin (stephenegriffin) merged commit 37f89e8 into main Oct 21, 2026
21 checks passed
@stephenegriffin
Stephen Griffin (stephenegriffin) deleted the feature/addin-directory branch October 21, 2026 15:50
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.

3 participants