fix: preserve edit and lane legacy console routes - #48
Merged
Conversation
`graphLocation` decided the suffix with `to.path.endsWith('/edit')`, which is
the concrete URL and therefore carries user data. `ok_name` admits `edit` as a
graph name, so `/apps/a/targets/edit` and `/targets/edit` both end with `/edit`
while naming no suffix at all: that graph was redirected to
`/apps/a/graphs/edit/edit`, the editor, instead of to its detail page.
The matched record's `path` is the pattern the router registered and cannot
contain a name, so it answers the question the URL was being asked.
Claude-Session: https://claude.ai/code/session_012K8u7BEJyd6nDNMCQAgH3z
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.
Problema
La console risolve gli URL legacy senza applicazione (
/targets/:name/...) cercando prima il grafo nell'indice. La funzione di risoluzione ricostruiva però sempre e soltanto l'URL del dettaglio:/targets/foo/editapriva il dettaglio invece dell'editor;/targets/foo/lanes/urgentapriva il grafo ma perdevaurgent, quindi non evidenziava il path corrispondente.La variante già qualificata con
/apps/:app/...conservava la lane, ma aveva una costruzione separata dell'URL di edit.Fix
graphLocation;/edite convertelanes/:lanein?path=:laneanche dopo la risoluzione asincrona dell'applicazione;app,nameepathcome segmenti/query URI.Le route legacy budget mantengono deliberatamente il comportamento esistente (aprono il grafo): dal solo URL legacy non è possibile ricavare in modo affidabile il nodo di un documento v2.
Verifica
cd ui && npm run build(52 moduli trasformati, build Vite riuscita);git diff --check.Per Alice
È un fix di compatibilità dei link/runbook esistenti; non modifica le route canoniche né il modello dati. Il punto da verificare manualmente è che browser back/forward tra un URL legacy di lane e il dettaglio mantenga l'evidenziazione: la reattività del query param è corretta in una PR separata.