fix: address scaffold and framework papercuts (#65–#85) - #87
Merged
Conversation
Bundled fixes covering eleven open issues. All scoped to the framework templates and core helpers; in-tree behaviour is preserved by tests. Scaffold templates (`sm new`): - #65 vite: pre-bundle the use-sync-external-store CJS shim so recharts / react-redux pulls don't blow up the dev server. - #82/#78 tailwind: add `tailwindcss` + `@tailwindcss/vite` to the host package.json template, register the plugin in vite.config.ts, and ship a styles.css that imports the UI globals + module @source globs. - #83 i18n: scaffold app.tsx now calls configureI18n from initial Inertia shared props and listens to router events for locale transitions. - #84 page resolver: glob and regex now allow nested .tsx pages (e.g. `pages/Users/Index.tsx`). Same fix applied to the in-tree host/client_app/pages.ts. - #67 catalog: `--preset full` no longer pulls in the `datasets` example module; new `examples` preset opts in to demo modules. Wizard test updated to reflect the new contract. Framework: - #80 inertia env: any non-development/testing environment now uses the production manifest path (was a literal "production" check), so staging/qa hosts render with built assets instead of a stranded /main.tsx script tag. - #79 enum render: `render_item` now emits `sa.Enum(..., values_callable=)` for StrEnum columns so Postgres labels match lowercase StrEnum values rather than uppercase attribute names. - #69 alembic imports: `render_item` adds the imports for `fastapi_users_db_sqlalchemy.generics` and `geoalchemy2` types so autogenerated migrations are importable without manual patching. - #77 SM_PROJECT_ROOT: app builder now walks up from cwd looking for pyproject.toml/.env/alembic.ini sentinels instead of a fixed parents[3] depth, so wheel installs work without setting the env var. gen-pages CLI summary also includes the module count. - #85 SM019 diagnostic: warns when a module overrides register_routes with a non-empty view_prefix but never registers a menu item — the pages exist but the sidebar can't surface them. Packages: - #72 ui peer deps: declare the radix-ui, cmdk, vaul, recharts, etc. peer dependencies the components actually import, so npm warns at install rather than build time.
The initial peerDeps ranges were too restrictive (e.g. recharts ^2 vs the host's recharts ^3.8) which forced npm to install duplicate copies at the host workspace level, in turn surfacing TS API mismatches against the older types. Pin to the major versions that match what `host/client_app` already declares.
antosubash
marked this pull request as ready for review
April 30, 2026 12:52
This was referenced Apr 30, 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
Bundled fixes covering eleven open issues. Every change is scoped to framework templates and core helpers; existing in-tree behaviour is preserved by the test suite (431 tests passing).
Issues addressed
Scaffold (
sm new) templatesuse-sync-external-storeCJS shim so recharts / react-redux pulls don't blow up the dev server.tailwindcss+@tailwindcss/viteto the hostpackage.jsontemplate, register the plugin invite.config.ts, and ship astyles.cssthat imports the UI globals + module@sourceglobs.app.tsxnow callsconfigureI18nfrom initial Inertia shared props and listens to router events for locale transitions..tsxpages (e.g.pages/Users/Index.tsx). Same fix applied to the in-treehost/client_app/pages.ts.--preset fullno longer pulls in thedatasetsexample module; newexamplespreset opts in to demo modules.Framework
development/testingenvironment now uses the production manifest path (was a literal"production"check), so staging/qa hosts render with built assets instead of a stranded/main.tsxscript tag.render_itemnow emitssa.Enum(..., values_callable=...)forStrEnumcolumns so Postgres labels match lowercase StrEnum values rather than uppercase attribute names.render_itemadds the imports forfastapi_users_db_sqlalchemy.genericsandgeoalchemy2types so autogenerated migrations are importable without manual patching.SM_PROJECT_ROOT: app builder now walks up from cwd looking forpyproject.toml/.env/alembic.inisentinels instead of a fixedparents[3]depth, so wheel installs work without setting the env var.gen-pagesCLI summary also includes the module count.register_routeswith a non-emptyview_prefixbut never registers a menu item — pages exist but the sidebar can't surface them.Packages
Out of scope
A few issues were skipped because they target architectural changes outside this repo or affect publish-only concerns:
redirect_slashesdefault — too invasive to flip globallysimple_module_testfixtures.tsxpage resolution (vite aliases / symlinks) — broader plugin workGrantsHelperAPI drift — refers to externallacowiki_sharing/simple_module_sharingpackagestests/__init__.py/pytest_plugins) — documentation/processTest plan
uv run pytest framework/ tests/ --ignore=tests/e2e— 431 passeduv run ruff check framework/uv run ruff format --check framework/framework/core/tests/test_module_diagnostics.py--preset fullwizard test reflects the new catalog contracthttps://claude.ai/code/session_01MvfqvaCPGZd5SQW8TpJkHc
Generated by Claude Code