Flatten views structure: reduce space complexity by 2 dimensions#8258
Merged
Flatten views structure: reduce space complexity by 2 dimensions#8258
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Redesigns the transformed add-on metadata output to reduce storage duplication by writing versioned/language-specific add-on files once and projecting “views” via symlinks.
Changes:
- Transform now writes
/addons/{addonId}/{addonVersion}/{lang}.jsonand creates versioned +latestview symlinks under/views/{lang}/.... - GitHub Actions workflow now checks out
nvaccess/addonstore-views, generates output, and opens an auto-merge PR instead of pushing directly. - Tests and documentation updated to validate/describe the new output layout (including symlink expectations).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| transform/src/transform/transform.py | Generates per-language add-on files and creates relative symlinked view projections. |
| transform/src/tests/test_viewsGenerationSystem.py | Updates expected output paths and asserts view files are symlinks to the correct translated add-on files. |
| transform/src/tests/test_datastructures.py | Updates docstring example path to match new views layout. |
| transform/README.md | Updates high-level description to reflect new “add-ons + views” output model. |
| transform/docs/output.md | Documents the new output structure and how language fallback for symlink targets works. |
| README.md | Updates repository purpose statement to reflect new hosting/publishing approach. |
| docs/design/designOverview.md | Updates design overview to describe the new generated data layout and repo flow. |
| .github/workflows/transformDataToViews.yml | Switches from pushing a branch to generating data into addonstore-views and creating an auto-merged PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sean Budd <seanbudd123@gmail.com>
seanbudd
commented
Apr 2, 2026
Signed-off-by: Sean Budd <seanbudd123@gmail.com>
SaschaCowley
requested changes
Apr 8, 2026
Member
Author
|
pre-commit.ci run |
SaschaCowley
requested changes
Apr 8, 2026
SaschaCowley
approved these changes
Apr 9, 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.
Part of #7585
Closes #5903
Structure change
The current add-on views structure is too wide. It has storage complexity of
O(numAddonFiles * numLanguages * numNVDAAPIVersions * numChannels). This should just beO(numAddonFiles).This PR reduces the structure to
O(numAddonFiles * numLanguages).The current file structure for add-on views is:
views/en/2019.1.0/UIANotificationSwitch/stable.jsonGenerated from files committed to this branch as:
addons/AbsoluteYoutube/2026.2.0.jsonFile paths in the current views structure now serve as symlinks which point to files like
addons/UIANotificationSwitch/2026.1/en.jsonwhich is generated from the translations inaddons/AbsoluteYoutube/2026.2.0.jsonImprovements
Size
The new views size is 264 MB, the old views size was 13GB.
Checked with:
(Get-ChildItem . -Recurse -Force -File | Measure-Object Length -Sum).Sum).Transform step speed
The old transform step took about 1.5-2h.
The new transform step takes about 10-15min.
Testing
nvaccess/addonstore-views#1
Planned future changes
With further work to
addonstore-apiwe could reduce the complexity toO(numAddonFiles).This would require the server to create translated versions of each add-on file when reading the add-on files.
This might not be worthwhile, as it would require the server to buffer add-on files into python memory.
CoPilot detailed summary
This pull request makes significant improvements to how add-on metadata is transformed and output for the NVDA Add-on Store. The main change is a redesign of the output structure: add-on data is now separated into versioned, language-specific files in an
addonsdirectory, while theviewsdirectory contains symlinks (not copies) to these files, organized by language and NVDA API version. This reduces data duplication and improves clarity. The GitHub workflow is also updated to push changes to a separate repository and automate pull request creation and merging. Documentation and tests are updated to match the new structure.Output structure and transformation logic:
addons/{addonId}/{addonVersion}/{language}.jsonand creates symlinks inviews/{language}/{nvdaAPIVersion}/{addonId}/{channel}.jsonpointing to the correct add-on file, preferring exact language match, then base language, then English as fallback.Workflow automation and repository integration:
addonstore-viewsrepository, generates the new output structure, copies the generated data, and creates a pull request with auto-merge enabled, instead of pushing directly. This improves automation and separation of data and view hosting.Documentation updates:
README.md,transform/README.md,docs/design/designOverview.md,transform/docs/output.md) is updated to describe the new output structure, clarify the role of the repository, and explain how views and add-on files are organized and accessed.Testing improvements:
Code quality and logging: