Modernize build, fix mapping listing, persistence and edit bug#1
Merged
Conversation
Code fixes: * List every available app module (bundled with NVDA or provided by add-ons) by enumerating the appModules package, instead of only the handful that already have an alias in EXECUTABLE_NAMES_TO_APP_MODS. * Persist custom mappings in NVDA's user config directory (globalVars.appArgs.configPath) instead of the add-on folder, which is wiped on update/reinstall. Existing 0.2.0 files are migrated on load. * Fix add/modify detection in the mapping dialog (it was comparing the app name against the list of available modules) and preserve the true original module across edits so Remove restores it correctly. * Document the notAssociated app module and remove leftover dead code and the accidental a.txt. Build/tooling (ported from EnhancedDictionaries): * Typed scons NVDATool builders, cleaner gettexttool, new sconstruct, typed buildVars.py with changelog, manifest templates, flake8 and pre-commit updates. * Replace CI with reusable validate.yml plus pr-checks.yml and release.yml. Bump to 0.3.0; last tested against NVDA 2026.1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Packaged add-on artifact |
Releasing still builds and publishes the .nvda-addon to GitHub Releases; submission to the NV Access datastore is done manually. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Packaged add-on artifact |
thgcode
approved these changes
Jul 13, 2026
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
Completes the in-progress work to list all NVDA app modules, and modernizes the build/tooling to match the sibling EnhancedDictionaries add-on.
Code fixes
appModulespackage, not just the ~40 aliases inEXECUTABLE_NAMES_TO_APP_MODS. This also picks up modules provided by other add-ons.globalVars.appArgs.configPath) instead of the add-on folder (which is wiped on update/reinstall). Files from 0.2.0 are migrated automatically on load.notAssociatedneutral module; removed dead code and straya.txt.Build / tooling (ported from EnhancedDictionaries)
NVDAToolbuilders, cleanergettexttool, newsconstruct, typedbuildVars.py(with changelog),manifest.ini.tpl+manifest-translated.ini.tpl,flake8.iniand.pre-commit-config.yamlupdates.validate.ymlpluspr-checks.ymlandrelease.yml(branchmain, MIT license). Releases publish the.nvda-addonto GitHub Releases; datastore submission is manual.Version
Bumped to 0.3.0;
lastTestedNVDAVersion= 2026.1.0 (minimum kept at 2024.1 — the APIs used exist since ~2023.1). Changelog is inbuildVars.pyaddon_changelogand rendered intomanifest.ini.Verified locally (build)
sconsbuildsCustomAppModulesMapper-0.3.0.nvda-addonwith correct contentsscons potgenerates the translation templatepre-commit run --all-filespasses (ast / case-conflict / yaml / flake8)Functional test script
Run against NVDA 2026.1 with the packaged
CustomAppModulesMapper-0.3.0.nvda-addon. The config file referenced below iscustomModulesMapping.picklein the NVDA user config dir (installed:%APPDATA%\nvda\; portable:<portable>\userConfig\).0. Install
scons..nvda-addonand restart NVDA when prompted.addon loadedand (first run)Custom mappings created.1. Full module list is available (the core fix)
notepad,winword,soffice,firefox,thunderbird), not just alias targets likeeclipse/code.notAssociatedis present;nvda,javaw,msedgewebview2and the touch-keyboard host are absent.2. Add a mapping and apply
dbeaver(or any installed app you can launch), App module =notepad, OK, then OK on Settings.NVDA+Ctrl+Z) and run:import api; print(type(api.getFocusObject().appModule).__module__)appModules.notepad).3. Persistence across NVDA restart
customModulesMapping.pickleexists in the config dir (not in the add-on folder).Custom mappings loaded from fileandAssociating dbeaver app with notepad module; the mapping still shows in Settings and is still applied.4. Reinstall-safe (the reason for the config-dir move)
dbeaver → notepadmapping is still present and applied (the pickle survived because it lives in the config dir).5. Migration from 0.2.0
<addon folder>\customModulesMapping.pickle(or install 0.2.0, add a mapping, then upgrade in place to 0.3.0).Migrated custom mappings to the NVDA configuration directory; the file now exists in the config dir and no longer in the add-on folder; the mapping still works.6. Modify preserves the original, Remove restores it
dbeaver → eclipse(NVDA's real default for dbeaver).dbeaver → notepad. Save.notepad.dbeaverresolves toeclipseagain (the true original), not tonotepad.7. Disassociate via notAssociated
notepad→notAssociated). Save, relaunch the app.appModules.notAssociated, i.e. no app-specific behavior.8. Secure mode
globalVars.appArgs.secure).🤖 Generated with Claude Code