fix(review): per-repo review.visual.production_url override for bot-capture - #4564
Merged
Conversation
…apture PUBLIC_SITE_ORIGIN is a single global env var with no per-repo awareness, so on a multi-repo self-host instance it can be correct for at most one repo -- every other repo's "before" (production) shot silently degrades to a dash, which means the bot-capture screenshot pipeline never produces a real before/after pair for that repo (#3611). Add review.visual.production_url as a per-repo config-as-code override, mirroring the existing review.visual.preview.url_template precedence pattern. Also generalize the route-file regex (DEFAULT_ROUTE_FILE) and isVisualPath's app-folder pattern beyond apps/gittensory-ui/ -- metagraphed's apps/ui/** uses the identical TanStack flat-file routing convention, just under a different app folder name, so route inference was silently falling back to "/" for every metagraphed PR regardless of which page actually changed.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 11f6451 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 03:29 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4564 +/- ##
=======================================
Coverage 94.08% 94.09%
=======================================
Files 427 427
Lines 37961 37969 +8
Branches 13864 13867 +3
=======================================
+ Hits 35715 35726 +11
Misses 1586 1586
+ Partials 660 657 -3
🚀 New features to boost your workflow:
|
This was referenced Jul 10, 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.
Summary
buildCapture's "before" (production) shot readsPUBLIC_SITE_ORIGINas a single global env var with no per-repo awareness — on a multi-repo self-host instance that's correct for at most one repo, so every other repo's before-shot silently degrades to a dash and the bot-capture pipeline can never produce a real before/after pair for it (blocking Enable + validate automated visual capture end-to-end for metagraphed #3611, the still-open "enable + validate for metagraphed" sub-issue of the Epic: extend automated visual-capture convergence (#577) to self-host + metagraphed #3607 epic).review.visual.production_urlas a per-repo config-as-code override (SSRF-validated at parse time, same aspreview.url_template), always winning over the env var when set.DEFAULT_ROUTE_FILEandisVisualPath's app-folder pattern beyondapps/gittensory-ui/— metagraphed's UI lives atapps/ui/**using the identical TanStack flat-file routing convention, so route inference was silently falling back to"/"for every metagraphed PR regardless of which page actually changed.Test plan
npm run typechecknpm run test:coverage(unsharded) — new branches fully covered; verified via lcov that no new-diff line is in the uncovered setnpm run test:ci(full local gate, exit 0)npm audit --audit-level=moderate— 0 vulnerabilities