[server] Fix studio rewrite #1926 - #1927
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, targeted, and backed by a regression test, with only a minor test-failure logging/coverage nit noted.
Pull request overview
This PR fixes Agdb Studio asset URL rewriting when the server is configured with a non-empty basepath, ensuring Studio’s bundled JS uses basepath-prefixed /studio URLs (including template-literal occurrences), and adds a regression test to cover the scenario.
Changes:
- Extend Studio index JS rewriting to also handle template-literal paths (
`/studio`) whenconfig.basepathis set. - Add an integration test that validates the served Studio HTML and JS reflect the configured basepath.
File summaries
| File | Description |
|---|---|
| agdb_server/src/routes/studio.rs | Adds basepath rewriting for template-literal \/studio` occurrences in the served index JS bundle. |
| agdb_server/tests/routes/misc_routes.rs | Adds a studio basepath rewrite regression test that fetches Studio HTML, extracts the bundle path, and validates rewritten URLs in the JS. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The basepath rewrite logic in studio.rs was missing a case for single-quoted `/studio` string literals. Added handling for `'/studio` alongside the existing double-quote and backtick cases. The test is also improved to check all three quote styles and report the offending snippet on failure.
michaelvlach
enabled auto-merge (squash)
September 11, 2026 17:10
agnesoft
approved these changes
Sep 11, 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.
No description provided.