You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue #44 : feat(cli): validate checks @widget routes and widgets/out HTML - #58
Shreyavemana
changed the title
feat(cli): validate checks @widget routes and widgets/out HTML
Issue #44 : feat(cli): validate checks @widget routes and widgets/out HTML
Oct 19, 2026
Verification of the proposed fix (feat/validate-widgets, 9df0e74)
Changes: Added widget validation to detect missing or empty widget HTML files and flag invalid routes. Added 9 tests covering valid, invalid, missing, empty, duplicate, vendored, and no-widget cases.
Installation and test environment
Cloned the branch into a temporary directory, created a fresh virtual environment, and installed the package using pip install <repo>.
The checks were run against the installed package from outside the repository. The installed version was nitrostack 0.4.2, imported from the temporary virtual environment's site-packages\nitrostack directory, confirming that the CLI validation checks were tested against the installed package rather than the source checkout.
Results:
78 targeted tests passed, covering test_validate_widgets.py and test_cli.py.
840 tests passed in the full test suite.
3 manual checks passed: Missing and empty widget files triggered warnings, while a valid file passed validation.
0 errors reported. The only remaining warning was about the missing application class in the sample project.
Conclusion: The fix works as expected: the CLI detects missing or empty widget HTML files, and all targeted and full-suite tests passed on Windows.
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
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
nitrostack-py validatedid not check widget routes or their HTML files, so missing or emptywidgets/out/<route>.htmlwent undetected after init.Findings
validate_projectincli/validators.pyonly ran dependency, import, and module checks — no widget validation.ensure_python_widgetsincli/main.pycreated widget HTML duringinitandgenerate, but nothing re‑checked files afterwards.Proposal
validate_widgetstovalidate_project.@widgetroutes using the same patterns asensure_python_widgets.route → file → URIin warning messages.Tests
tests/test_validate_widgets.pycover missing, empty, valid, duplicate, invalid, vendored, and no‑widget cases.