feat(console): serve the react web console from the installed package#456
Merged
Conversation
add `vouch console`: a starlette app that serves the vendored webapp SPA plus a same-origin /proxy bridge to `vouch serve --transport http` backends — a python port of the vite dev-proxy (loopback-guarded, reads X-Vouch-Target, passes backend statuses through unmasked). the built SPA is bundled into the wheel as vouch/web/console via a conditional hatch build hook, so `pip install 'vouch-kb[web]'` then `vouch console` needs no node and no repo clone. wire the release workflow to build the webapp before packaging and build the wheel from the working tree so the console rides inside it. bump to 1.3.0 across the four version sites, document the pip path in the readme, and add a changelog entry.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 changed
adds
vouch console: a starlette app that serves the vendoredwebapp/react SPA plus a same-origin
/proxybridge tovouch serve --transport httpbackends — a python port of the vite dev-proxy(
webapp/plugins/vouch-proxy.ts): loopback-guarded, readsX-Vouch-Target,forwards
/proxy/<path>to the backend, passes backend statuses throughunmasked. the built SPA is bundled into the wheel as
vouch/web/consolebya conditional hatch build hook, and the release workflow now builds the
webapp before packaging and builds the wheel from the working tree so the
console rides inside it. bumped to 1.3.0 across the four version sites;
readme + changelog updated.
Why
the react console previously shipped only via the docker demo or a repo
clone +
make console(vite dev server). nowpip install 'vouch-kb[web]'then
vouch consoleserves the same console from the installed package —no docker, no node, no clone. the bridge must run locally and same-origin:
vouch sends no cors headers and the proxy only accepts loopback clients, so
a remotely-hosted console can't reach a local backend.
What might break
nothing on an existing
.vouch/. no file moves, no on-disk field changes,no
kb.*method changes —vouch consoleis a new CLI command, and theonly packaging change is extra static files inside the wheel (skipped
cleanly when
webapp/distisn't built, so source-only builds stillsucceed). version bumps 1.2.2 → 1.3.0.
VEP
not a surface change — no
kb.*method, no object-model / on-disk-layout /audit-log change; the wheel gaining static assets is not a kb bundle-format
change. no VEP.
Tests
make checkpasses locally (ruff + mypy + full pytest green on this branch)tests/test_console.py: proxy forward / loopback-guard / error-passthrough, SPA fallback, console-dir resolution, and the CLI commandCHANGELOG.mdupdated under## [Unreleased]note on the commit range: this branch is based on local
test, which isahead of
origin/testby the session-transcript-viewer work, so thosecommits appear in this PR's range. the console change itself is the single
faa8abdcommit.