Features/add web UI#3
Merged
Merged
Conversation
- New `crgutils-ui` script entry point served by stdlib HTTP server - Next.js 16 static export with Pyodide + micropip for in-browser Python - Six chart views via Plotly.js: elevation map, plan view, 3D surface, cross-section, longitudinal profile, heading/curvature - Build pipeline: `just build-ui` (uv build → prebuild → next build → copy to _ui/) - Release workflow updated to build UI before publishing wheel - Wheel automatically includes src/crgutils/_ui/ (uv_build filesystem walk) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tries ports 8000–8009 in sequence before giving up with a clear error. Avoids the raw OSError crash when another process holds the default port. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
micropip is not auto-available in Pyodide — it must be explicitly loaded
with loadPackage("micropip") before `import micropip` will work.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ames
micropip.install("/_pkg/crgutils.whl") failed because micropip parsed
the path component as a package name. Use window.location.origin to
construct an absolute http:// URL before passing it to micropip.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove _serve.py and crgutils-ui script entry point - Add deploy-ui.yaml: builds wheel + Next.js on push to master, deploys to https://time-integral.github.io/crgutils/ via GitHub Pages - next.config.ts: basePath/assetPrefix from NEXT_PUBLIC_BASE_PATH env var - prebuild.mjs: keep full versioned wheel filename so micropip can parse it; write manifest.json so pyodide.ts knows the filename at runtime; clean _pkg/ dir at start so stale wheels don't accumulate - pyodide.ts: load manifest.json to get wheel filename, use full http:// URL for micropip (relative paths were misinterpreted as package names) - release.yaml: remove Bun and UI build steps (wheel ships without UI) - justfile/CLAUDE.md updated accordingly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… heading Plotly Surface with 1D x/y arrays creates a rectangular grid in that coordinate space — wrong for a curved road. Each grid point (v[j], u[k]) has a unique world position via the Frenet frame: x = x_ref(u) − v·sin(φ) y = y_ref(u) + v·cos(φ) Pass 2D xGrid/yGrid arrays (shape [n_v][n_u]) so the surface footprint matches world geometry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python's json.dumps emits bare NaN/-Infinity/Infinity tokens which are invalid JSON — JSON.parse throws SyntaxError on them. Replace all three before returning the string to JavaScript. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The bridge was computing z + z_mean (height relative to the reference line) while eval_uv_to_z adds ref_z on top of that. Add ref_z to z_abs before downsampling so every view — 3D surface, elevation map, cross-section, longitudinal profile — matches the Python eval output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
No description provided.