Repository navigation
Conversation
evnchn
marked this pull request as draft
February 14, 2026 16:39
falkoschindler
added a commit
that referenced
this pull request
Mar 12, 2026
### Motivation This PR addresses multiple Dependabot security alerts by bumping vulnerable dependencies to their patched versions: - [#67](https://github.com/zauberzeug/nicegui/security/dependabot/67) - `lodash-es` for vanilla-jsoneditor (json_editor element) - [#68](https://github.com/zauberzeug/nicegui/security/dependabot/68) - `fonttools` for matplotlib - [#72](https://github.com/zauberzeug/nicegui/security/dependabot/72) - `aiohttp` ≥3.13.3 - [#80](https://github.com/zauberzeug/nicegui/security/dependabot/80) - `urllib3` ≥2.6.3 - [#83](https://github.com/zauberzeug/nicegui/security/dependabot/83) - `orjson` ≥3.11.5 ### Implementation - Updated pyproject.toml with new minimum versions for `aiohttp`, `orjson`, `urllib3`, and added `fonttools` to the matplotlib extra - Pinned `lodash-es` ^4.17.23 in package.json for two elements to override vulnerable transitive dependencies - Regenerated package-lock.json files and uv.lock (`npm run build` didn't change anything in the generated bundles) ### Progress - [x] I chose a meaningful title that completes the sentence: "If applied, this PR will..." - [x] The implementation is complete. - [x] This is not a security issue in NiceGUI itself, but updating dependencies with already-public CVEs. - [x] Pytests are not necessary. - [x] Documentation is not necessary.
19 tasks
Pre-render Vue element tree server-side via MiniRacer and inject into #app so the browser paints immediately; the full Vue app then hydrates on top. Squash of 10 commits rebased onto current upstream/main. Includes: - nicegui/ssr.py: MiniRacer-backed server-side Vue render (render_to_string) - Custom Quasar ESM build with SSR client flags; shared Vue/Quasar UMD via importmap so server + client use the same bundle - #app ssr_html injection marker with HTML-escaping hooks - Hydration fixes: number input, nested <a> tag sanitization - mini-racer as dev dep; SSR-aware caplog filtering in tests - tests/test_ssr.py (13 tests, all passing) Lints: ruff/autopep8/mypy/pylint all clean; pre-commit green.
evnchn
force-pushed
the
experiment/vue-ssr-hydration
branch
from
April 14, 2026 18:00
ea7adbb to
33b3e92
Compare
Owner
Author
|
Rebased onto current upstream/main (was 125 behind). Fork-only push, no upstream PR. Rebase: clean after 2 mechanical conflicts in Lints (all green)
Mineable ideas (banger-source) Even if this PR never lands, these techniques are individually cherry-pickable:
Artifact preserved at https://github.com/evnchn/nicegui/tree/experiment/vue-ssr-hydration — single squashed commit on top of upstream/main. |
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.
What this branch does
Adds Vue server-side rendering (SSR) to NiceGUI using MiniRacer (a V8 engine embedded in Python) to pre-render Vue component HTML on the server. The SSR HTML is injected into the
#appdiv so the browser paints content immediately before JavaScript loads and Vue hydrates, dramatically improving time-to-visible-content. The branch evolved through several iterations: starting with Vue'screateSSRApphydration, then discovering Quasar UMD incompatibilities, and ultimately building a custom Quasar ESM bundle with__QUASAR_SSR_CLIENT__=trueto enable proper hydration withisRuntimeSsrPreHydrationmode.Key changes
nicegui/ssr.py: Core SSR module -- renders Vue components in MiniRacer V8 with polyfills, postprocesses HTML (strips number input values, fixes nested<a>tags)nicegui/client.py: Integrates SSR rendering into the page response pipelinenicegui/static/ssr-entry.js,nicegui/static/ssr-polyfills.js,nicegui/static/ssr-bundle.js: SSR JavaScript infrastructure (esbuild-bundled IIFE for MiniRacer)nicegui/static/quasar.esm.js/quasar.esm.prod.js: Custom ESM Quasar builds with SSR client flags enablednicegui/static/nicegui.js: Detects SSR HTML presence viainnerHTML.trim()and usescreateSSRAppvscreateAppaccordinglynicegui/templates/index.html: Updated to support SSR HTML injection and ESM Quasar loading via import mapsextract_core_libraries.py: Build script updated for custom Quasar ESM buildtests/test_ssr.py: Unit tests for SSR postprocessing (number input stripping, anchor nesting fixes)nicegui/testing/screen.py: Hydration mismatch allowance for test fixturesStatus
Experimental. This is a research branch exploring SSR/hydration for NiceGUI. It works but has known limitations: hydration mismatches are tolerated for viewport dimensions and crypto UUIDs, the MiniRacer dependency is heavy, and the custom Quasar ESM build adds build complexity. The branch has 12 commits reflecting an iterative discovery process.
Upstream PR
None yet