chore(dev tool): route drift script - #13849
Conversation
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
anandaroop
left a comment
There was a problem hiding this comment.
Looks like a helpful addition!
Is the plan to wire this up in CI as well? (I see that the --strict flag implies that, but I didn't see any config for that yet in this PR.)
| | Yes | Yes | **exclude** (`NOT`) | flow wins; screen still reachable via `artsy://` | | ||
| | No | Yes | **exclude** (`NOT`) | keep the user in the web flow | | ||
| | No | No — content worth having | allow → in-app webview, or build a screen | this is "actionable drift" in the report | | ||
| | No | No — web-only (admin, SEO, legal) | either | exclude to avoid a degraded webview, or allowlist | |
There was a problem hiding this comment.
question (non-blocking): Is an in-app webview necessarily degraded, or does that depend on which route?
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
That was initially the plan, possibly on modifying routes.tsx but there is a fair bit of clean up that needs to happen for that to work so removing for now! and we can just run locally every so often and once we get to good spot maybe add to CI. |
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
…igen into brian/route-drift-script
Assisted-By: Claude <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Assisted-By: Claude <[email protected]>
Assisted-By: Claude <[email protected]>
…igen into brian/route-drift-script
Assisted-By: Claude <[email protected]>
| process.stdout.write(JSON.stringify(results)) | ||
| } | ||
|
|
||
| main() |
There was a problem hiding this comment.
main() is async and unhandled here (same in parseEigenRoutesHarness.ts, though that one is sync). If it rejects, Node exits non-zero with an unhandled-rejection trace, and execFileSync in the Jest test throws Unexpected end of JSON input from JSON.parse(out) instead of showing the real cause. A .catch that writes the error to stderr and calls process.exit(1) makes the failure legible.
|
Summary Adds a dev-only Good call reusing the real Issues Found 🟡 Important — 1. If no intent-filter declares an 🟢 Suggestion — 2.
🟢 Suggestion — 3. Unhandled async A rejection surfaces in the Jest test as 🟢 Suggestion — 4.
Areas Reviewed Architecture — Splitting the pure helpers ( Correctness — Spot-checked the tricky bits: the AASA Security — Testing — Coverage is solid for a dev script: the force/eigen walkers are exercised over inline fixtures (spreads, shorthand Questions for Author
|
This PR resolves []
Description
Problem:
Eigen supports universal links + deep links, so its route table
(
src/app/Navigation/routes.tsx) ismeant to mirror the web app's routes
(
artsy/forcesrc/Apps/*/*Routes.tsx) — withsome intentional exceptions. Nothing enforces that, so the two drift, and drift
produces linking bugs: e.g.: an artsy.net URL that should open a native screen
silently opens inside a webview instead. Similarly Android and iOS linking are supposed to be consistent but are configured distinctly, on iOS all links open the app by default with a denylist in our universal links config. On Android link prefixes must be added explicitly to manifest so there is another area things can drift.
Adds a route drift report script that can be periodically run to review our routing and universal linking alignment across force, android and iOS. See README in script folder for more details.
PR Checklist
To the reviewers 👀
Changelog updates
Changelog updates
Cross-platform user-facing changes
iOS user-facing changes
Android user-facing changes
Dev changes
Need help with something? Have a look at our docs, or get in touch with us.