Skip to content

Features/add web UI#3

Merged
ticoder00 merged 19 commits into
masterfrom
features/add-web-ui
Apr 12, 2026
Merged

Features/add web UI#3
ticoder00 merged 19 commits into
masterfrom
features/add-web-ui

Conversation

@ticoder00
Copy link
Copy Markdown
Contributor

No description provided.

ticoder00 and others added 19 commits April 11, 2026 21:25
- 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>
@ticoder00 ticoder00 merged commit cbb8d47 into master Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant