-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
Today git-glimpse has a single app.readyWhen.url (or app.previewUrl) that acts as the global base URL for all demos. This works for simple apps but breaks down for repos that serve multiple distinct UI surfaces — for example:
- An admin dashboard at
https://admin.myapp.comand a customer storefront athttps://myapp.com - A Shopify app where the admin routes live on a local Remix dev server and the storefront extension lives on a live Shopify store
- A monorepo with a marketing site, a web app, and a docs site, each at a different origin
When files from different surfaces change in the same PR, git-glimpse can only demo one of them — it uses the same base URL for every route in routeMap.
Desired behaviour
Allow configuring multiple named entry points, each with its own URL (and optionally its own startCommand). routeMap entries can then declare which entry point they belong to:
const config: GitGlimpseConfig = {
app: [
{
name: 'storefront',
readyWhen: { url: process.env.TEST_STORE_URL },
},
{
name: 'admin',
startCommand: 'npm run dev:server',
readyWhen: { url: 'http://localhost:3000' },
},
],
routeMap: {
'extensions/virtual-tryon-block/**': { entry: 'storefront', route: '/products/ring' },
'app/routes/**': { entry: 'admin', route: '/' },
},
};git-glimpse would then start only the entry points needed for the changed files in a given PR, and record each surface separately (or stitch them into a single demo).
Notes
- Single-entry-point configs should remain fully backward-compatible
- Starting multiple local servers in parallel is a natural extension of the existing
startCommandmechanism - The LLM script generator would need to know which base URL to use per route
- Could also be useful for multi-step flows that cross surfaces (e.g. merchant enables a product in admin → customer sees the try-on button on storefront)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels