Skip to content

feat(ui): fill in the query form from URL parameters - #567

Merged
jsenecal merged 7 commits into
mainfrom
feat/port-p1-url-prefill
Nov 21, 2026
Merged

jsenecal merged 7 commits into
mainfrom
feat/port-p1-url-prefill

Conversation

@jsenecal

@jsenecal jsenecal commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Builds on #574 (merged), which fixed #549. #545 and #537, which it also builds on, are merged. Rebased onto main.

Problem

There is no way to link to a query with its location, query type and target filled in, for example from a NOC tool, a ticket or documentation. History (H2, #557) and the shared result page (S2, #560) need the same function to fill the form from stored values.

Change

Port of the prefill part of jsenecal#6 and #136, rewritten on top of #537/#545 and extended for several locations, mixed vendors and directive variables. run=1 is not ported: in the fork it set the results view directly, which skipped the required greeting and hostname resolution.

URL shape

/?location=<device id>&location=<device id>&type=<directive id or name>&target=<value>&var.<variable id>=<value>

  • location is repeated for several locations; duplicates are read once.
  • Variables are prefixed var., because a directive variable may be named location or type (validate_variable_names only reserves target and mask).
  • One target. The UI doesn't receive a directive's multiple flag (Directive.frontend() doesn't export it) and the form only ever submits one target, so a link can't express more than the form can. For type, target and each variable the first value is used. Empty values are skipped.
  • Values are read with URLSearchParams: IPv6 addresses and prefixes work unencoded (target=2001:db8::/32), a zone needs %25 (fe80::1%25eth0), and + reads as a space, as in any query string. The target is taken as written, as typed text is: brackets or a zone are passed on to the backend's validation, which decides as it does for typed input.

hooks/use-form-state.ts

  • parsePrefill(search) reads the parameters; withoutPrefill(search) returns the query string without them, keeping the others.

  • prefillForm(prefill, extra) is the one entry point (H2 and S2 will call it too). It goes through the same steps as the user's input, so fix(ui): submit the only available query type and reject an empty target #537/fix(ui): keep the query form consistent after location changes and resets #545's rules apply:

    1. Known locations only (unknown IDs are dropped). Without a known location nothing is applied and the form is left as it is. Otherwise the link replaces the query in the form: its query type, target (with target.display) and variables are cleared first, so nothing of the old query is kept when a value from the link is left out or missing. It then sets selections.queryLocation, then calls locationChange, which offers the common query types, chooses the only one if there is one (clearing the target, Form state: stale query type after a location change, target kept on auto-select, errors kept after reset #540), and reports locations without query types in common with the usual message.
    2. Query type from the offered types: by ID, then by name, then by the name of the directive with that ID on another selected location. Offered directives carry the first location's IDs, so a link made with Router One (Juniper) first and opened with Router Three (FRR) first still finds BGP Route, as resolve_directive_by_name does on the backend. A type that isn't offered stops here, also when locationChange chose the only offered query type: the link's target was meant for another query type.
    3. Target, for the selected query type (from the link, or the only one offered when the link has no type): skipped for a directive without a field (the form sets ['null'] as before), one of the options for a select, otherwise as written, except that a target with control characters or line separators (Unicode Cc, Cf, Zl, Zp, the classes the backend rejects in validate_query_target_characters) is dropped, so the form never holds a target the input can't show. It sets both form.queryTarget and target.display (the input shows target.display).
    4. Variables whose ID and value the directive defines, read as own properties (Object.hasOwn), so IDs such as constructor or toString work.

    The target and variables are independent: an invalid variable doesn't drop a valid target.

components/looking-glass-form.tsx

Once router.isReady, the form reads window.location.search once, calls prefillForm, then removes the parameters with router.replace(${router.pathname}${rest}, ${pathname}${rest}${hash}, { shallow: true, scroll: false }). Other parameters keep their original text (?q=a%20b&flag stays as written) and the hash stays. The route is the page's (/) and the address is passed as as, so a page served as /index.html keeps its address and stays on the shallow path; with the address as the route, /index.html isn't a route and Next.js would load the page again. #537's mirror passes the values to react-hook-form.

The prefill effect is declared after the mirror effect. When the router is already ready at mount (a client-side navigation), both run in the same commit, and the mirror's reset of the still-empty form cleared the "no query types in common" error that locationChange had just set. Nothing is submitted: the user presses Submit, and submitHandler's greeting check and hostname resolution apply.

Why it waits for the router, and replaces through it: checked in Chromium against a next build export, a first version that called history.replaceState on mount didn't hold. For an auto-exported page opened with a query string, Next.js replaces the address after hydration with the one it read (that's when isReady turns true), which put the parameters back; Back from the results then remounted the form and applied the link again over the user's change. With isReady and router.replace, Next.js's history state has the new address too. Result, same export, Chromium: opened /?utm=x&location=router_one&location=router_three&type=__hyperglass_juniper_bgp_route__&target=2001:db8::/32#frag → form filled with BGP Route and 2001:db8::/32, address /?utm=x#frag; changed the target to 2001:db8::1, submitted, pressed Back → address /?utm=x#frag, target 2001:db8::1. The same with /index.html?utm=x&q=a%20b&flag&location=…#frag → address /index.html?utm=x&q=a%20b&flag#frag throughout, target 2001:db8::1 after Back.

Why the parameters are removed rather than guarded with a ref or a store flag: the form unmounts while the results show, and once the user changes the form the address would no longer describe it.

components/query-target.tsx

The select target had no value, so a target set in the store without the select (from a link, and also on return from the results) wasn't shown as chosen. It now shows the option matching form.queryTarget[0].

Invalid values: no message. Unknown or unavailable values are dropped silently. The form shows exactly what was applied, and a message would need new web.text keys (types, sample config, docs, fixture) for a case the reader can see on screen. The one existing message that can appear is locationChange's "no query types in common", the same as for a manual selection. H2 plans web.text.history_location_unavailable for its own case.

Gallery mode (#549). LocationCard used to read its checked state only on mount, and the form mounts before the router is ready, so prefilled locations were selected in the store but their cards didn't show it, and the first click on such a card did nothing. #574 (merged) made the card controlled (isChecked from form.queryLocation); this PR adds a test for a prefilled card (below). The location select (dropdown mode) already showed the prefilled locations.

Tests

New in hooks/use-form-state.test.ts:

  • parsePrefill: null without parameters / only other parameters / only empty values; repeated locations, type, target and a variable; with or without ?; encoded IPv6, IPv6 prefix unencoded, zone %25, bracketed; var.location and var.type kept apart from location and type; locations read once, first of other repeated parameters; variables without an ID or value skipped.
  • parsePrefill: variables named constructor and toString.
  • withoutPrefill: removes only its parameters, keeps the others in order and as written (q=a%20b, flag, r=x+y); removes them with encoded names (%6Cocation, var%2Evrf); empty result; unchanged without its parameters.
  • prefillForm: one location; several in order with their common types; unknown locations dropped; nothing changes without a known location; no-common-types error as for a selection; type by ID, by name, by another selected location's ID; unknown type dropped with its target; target without a type dropped; IPv4, IPv6, IPv6 prefix, IPv6 with zone and hostname targets set in form.queryTarget and target.display; target for the only query type chosen by locationChange; select target in / not in the options; target of a field-less directive dropped; only defined variables with allowed values, including one named location; a query already in the form has its type, target and variables replaced; with the same query type already in the form, a target that is left out and a link without a target clear the old target and variables, a link variable replaces the old ones, and a link without a resolvable type or with no type clears the old query type, target and variables, while a link without a known location leaves the old query alone; an unknown type on a location with only Ping drops the target and variables (Ping stays chosen by locationChange); targets with a line feed, carriage return, NUL, zero-width space or line separator are dropped; variables toString set, inherited constructor not; status stays form.

New in components/looking-glass-form.test.tsx (LookingGlassForm prefill, the address set with history.replaceState, next/router stubbed). As on a first load, the form mounts with the router not ready, which then becomes ready (openAddress); one test mounts with it ready, as after a client-side navigation:

  • shows the values (IPv6 target, query type in the select) and submits them only on Submit
  • shows the locations in the location select (dropdown mode)
  • shows a prefilled location as a selected card in gallery mode (data-checked="true", the other cards false); one click removes it from the card and the store (form.queryLocation and selections.queryLocation empty), a second click selects it again
  • submits a mixed-vendor link's query type under the first location's ID
  • shows a select target as chosen
  • shows and submits a variable
  • submits a field-less query type
  • drops unavailable values without a message
  • resolves a hostname target before the results
  • still requires the greeting (reload, status form)
  • waits for the router to be ready
  • removes its parameters through the router, keeping others as written and the hash
  • keeps /index.html as the address, on the / route
  • shows the "no query types in common" message for a link, both when the router becomes ready after the mount and when it is ready at mount
  • leaves an address without its parameters alone
  • does not apply the link again when the form remounts after the user changed it
  • with a query of the same type already in the store: shows and submits no target when the link's target is left out (text input and react-hook-form's queryTarget empty, target error on Submit), and no variable when the link has none (required-variable error on Submit)

With #545's code (1a775da1) and the new tests:

 Test Files  2 failed (2)
      Tests  50 failed | 60 passed (110)

(That run predates the review fixes below. parsePrefill, withoutPrefill and prefillForm don't exist there; the form tests that pass on #545 are its existing ones plus the three where nothing is expected to happen: unavailable values dropped, greeting required, address without parameters.)

Reverting one part at a time on the final code (hooks/use-form-state.test.ts and components/looking-glass-form.test.tsx, 110 tests); every mutation fails at least one test:

== no prefill call in the form               Tests  12 failed | 98 passed (110)
== parameters not removed                    Tests  2 failed | 108 passed (110)
== removed with history.replaceState         Tests  1 failed | 109 passed (110)
== hash dropped                              Tests  1 failed | 109 passed (110)
== other parameters dropped                  Tests  1 failed | 109 passed (110)
== not waiting for the router                Tests  1 failed | 109 passed (110)
== auto-submit after prefill                 Tests  3 failed | 107 passed (110)
== replace even without parameters           Tests  2 failed | 107 passed (109)
== unknown locations not filtered            Tests  2 failed | 107 passed (109)
== no match by name                          Tests  16 failed | 93 passed (109)
== no match by another location's ID         Tests  2 failed | 107 passed (109)
== type change keeps target and variables    Tests  1 failed | 108 passed (109)
== target applied without a query type       Tests  3 failed | 106 passed (109)
== select target not checked                 Tests  1 failed | 108 passed (109)
== field-less directive gets the target      Tests  1 failed | 108 passed (109)
== variables not checked                     Tests  1 failed | 108 passed (109)
== variables not namespaced                  Tests  10 failed | 99 passed (109)
== no target.display                         Tests  7 failed | 102 passed (109)
== no select target value                    Tests  1 failed | 108 passed (109)

(The 109-test runs predate the "waits for the router" test.)

After the first review fixes (123 tests in the two files):

== unknown type does not stop                Tests  1 failed | 122 passed (123)
== prefill effect above the mirror           Tests  1 failed | 122 passed (123)
== route from window pathname                Tests  2 failed | 121 passed (123)
== parse: `in` instead of Object.hasOwn      Tests  1 failed | 122 passed (123)
== control characters allowed                Tests  5 failed | 118 passed (123)
== withoutPrefill re-serialises              Tests  2 failed | 121 passed (123)
== prefill: no own-property check            Tests  123 passed (123)

The last one survives: an inherited property such as constructor is a function, which never equals an option's string value, so prefillForm already ignored it. The Object.hasOwn there is defensive and states the intent; parsePrefill's check is the one that matters (with in, var.constructor was skipped).

After the second review fix (the query in the form is replaced; 139 tests in the two files):

== fix reverted (previous code)              Tests  7 failed | 132 passed (139)
== no clearing before locationChange         Tests  6 failed | 133 passed (139)
== clearing keeps the query type             Tests  2 failed | 137 passed (139)
== clearing keeps target.display             Tests  6 failed | 133 passed (139)
== clearing keeps queryTarget                Tests  6 failed | 133 passed (139)
== clearing keeps queryVariables             Tests  2 failed | 137 passed (139)

The "type change keeps target and variables" mutation above no longer applies: the query type step only sets the type now, as the target and variables are already empty.

The gallery card test, with location-card.tsx and query-location.tsx from main (before #574) plus only the data-checked attribute added to the card so the test can read it, fails where the reviewer saw the bug: the prefilled card isn't selected.

 FAIL  components/looking-glass-form.test.tsx > LookingGlassForm prefill > shows the location from the link as a selected card that a click toggles
Error: expect(element).toHaveAttribute("data-checked", "true") // element.getAttribute("data-checked") === "true"
 ❯ components/looking-glass-form.test.tsx:916:32
      Tests  1 failed | 55 skipped (56)

With the change, rebased onto main (with #574 and #564): biome format, biome lint and tsc --noEmit are clean; Test Files 33 passed (33), Tests 342 passed (342); the two files above: Tests 144 passed (144). NODE_ENV=production next build (static export, with the UI test fixture as hyperglass.json) succeeded before the restack onto #574: ✓ Exporting (3/3), ○ / ... (Static); not rerun after it.

Changelog

  • A link can fill in the query form: ?location=<id>&type=<id or name>&target=<value>&var.<variable>=<value>, with location repeated for several locations. Values the configuration doesn't offer are left out, the parameters are removed from the address once applied, and the query runs only when the user submits it, so a required greeting still applies (Prefill the query form from URL parameters #554).

Added to CHANGELOG.md under Unreleased → Added. The user guide has a new section, "Link to a filled-in form", with the parameters, an example, encoding, and what happens to invalid values.

Differs from #554

Notes

  • A dismissed required greeting loses the link's values. The parameters are removed as soon as the form is filled, while the greeting modal is open. If the greeting is required and the user dismisses it (Esc or the overlay) and then submits, submitHandler resets the form and reloads the page, as it does today; the reloaded address no longer has the parameters, so the link's values are gone. Acknowledging the greeting keeps them. Keeping the parameters until the greeting is acknowledged would couple the form to the greeting state; I left it as is.

  • Found, not fixed (reported): with fix(ui): keep the query form consistent after location changes and resets #545's locationChange, a select target is kept when the query type moves to the same-named directive of another vendor, even if that directive's options don't include it. The select (which now shows the store's target) then shows nothing chosen, while the form still holds and submits the old value.

  • Not ported from the fork: run=1 (above), and usePrefillNavigate, which belongs to H2/S2.

  • Not verified: a deployment behind a basePath (the app has none; router.replace takes the route from router.pathname and the address from window.location.pathname).

  • Found but not changed: the select target's missing value also meant a select target restored on return from the results wasn't shown; fixed here because prefill needs it, no separate issue.

Part of #554

@jsenecal jsenecal added feature New feature or request frontend Next.js UI and the runtime UI build labels Nov 21, 2026
@jsenecal jsenecal self-assigned this Nov 21, 2026
@jsenecal
jsenecal requested a review from WilhelmZA November 21, 2026 06:17
@jsenecal jsenecal added feature New feature or request frontend Next.js UI and the runtime UI build labels Nov 21, 2026
@github-actions github-actions Bot added the docs Improve documentation label Nov 21, 2026
@coveralls

coveralls commented Nov 21, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 86.804% (+0.08%) from 86.724% — feat/port-p1-url-prefill into main

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 8eed9655.

I read the diff against fix/540-form-state. URL values reach the store only after a check against the configuration: known device ids, offered directive ids or names, select options and variable options. Free-text targets with control or format characters are dropped, which matches the backend check. Nothing submits the form, so a link cannot run a query without a user action, and the values render only as React text and input values. CI gate passes and all four commits are verified.

Before approval:

  • Gallery mode: prefill runs after the form mounts, and components/location-card.tsx reads defaultChecked into state only on mount (#549, still open). Open /?location=<id>&type=...&target=...: the store and the form hold the location and submit sends it, but its card shows no selection and the first click on it does nothing. #554 lists #549 as a dependency. Please land the #549 fix first or stack this PR on it, and add a card selection test for a prefilled location.
  • Closes #554 claims more than the PR does. #554 asks for a repeated target on directives with multiple: true, and this PR accepts one target. Please change the keyword to Part of #554, or amend #554 to drop multiple targets. The base is also not main, so the keyword does not take effect on this merge anyway.

#537 and #545 change the same four form files further down the stack. #564 and #566 also edit CHANGELOG.md.

Nits:

  • hyperglass/ui/components/query-target.tsx: the select target is now controlled and the shared select is clearable, but handleSelectChange ignores a null value. Pressing the clear control leaves the option shown and in form.queryTarget. Handling null there, or passing isClearable={false}, would fix it.

@WilhelmZA WilhelmZA added the reviewing Issue is being reviewed by maintainers label Nov 21, 2026
@jsenecal
jsenecal force-pushed the feat/port-p1-url-prefill branch from 8eed965 to a0cba4d Compare November 21, 2026 11:14
@jsenecal

Copy link
Copy Markdown
Collaborator Author

Thanks.

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at a0cba4d4.

The body now says Part of #554, and the clear control on the select target works through the fix in #545. CI gate passes and all four commits are verified. The validation of URL values against the configuration is unchanged from the earlier review and I found no new issue there.

Before approval:

  • hooks/use-form-state.ts, prefillForm: the target and variables are cleared only when the resolved query type differs from the one already in the form (queryType.id !== get().form.queryType). When they are equal, a link target that is dropped as invalid, or a link with no target, leaves the old target in the form, and the last set merges the link's variables into the old ones ({ ...state.form.queryVariables, ...variables }). Example: the store holds router_one, BGP Route, target 192.0.2.1 and one variable. prefillForm runs with the same location and type and a target that fails the control character check. The form still shows and submits 192.0.2.1 with the old variable. The body says a query already in the form has its type, target and variables replaced, and the test for that covers only a different query type. Please clear queryTarget, target.display and queryVariables once a query type is resolved, before the link's values are applied, and add a test with the same query type already in the form.
  • Gallery mode is still open, as you noted: components/location-card.tsx reads defaultChecked only on mount, so a prefilled location's card shows no selection and ignores the first click until #549 is fixed. This PR stays blocked on #549, and it needs a card selection test for a prefilled location once it is restacked.

@jsenecal

Copy link
Copy Markdown
Collaborator Author

Thanks, good catch. prefillForm now clears the query type, target (with target.display) and variables as soon as a known location is applied, before locationChange. That fixes the same-type case. It also fixes a type that isn't offered and a link with no type, where locationChange kept the old query type and the old values stayed with it. The link's variables now replace the old ones instead of merging into them. A link without a known location still leaves the form alone (def37bc).

New tests cover the same query type already in the form, in the store with an invalid target, no target, and a link variable next to an old one, and in the rendered form, where the input shows an empty value and Submit reports the missing target or variable. The body's steps, tests and mutation table are updated. 09d944b also changes the locationChange comment to "variables and variable options", as you suggested on #545.

Still blocked on #549 for gallery mode, as noted.

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 09d944b9.

The prefillForm point is fixed. The query type, target, target display and variables are cleared before locationChange, the link's variables replace the old ones, and the new store and form tests cover a link whose query type is already in the form. CI gate passes and all six commits are verified.

Before approval:

  • Gallery mode is the one item left. components/location-card.tsx still reads defaultChecked only on mount, so a prefilled location's card shows no selection until #549 is fixed. Once #549 lands and this PR is restacked on it, please add the card selection test for a prefilled location and I will review that head.

@jsenecal
jsenecal force-pushed the feat/port-p1-url-prefill branch from 09d944b to a3edf4a Compare November 21, 2026 14:14

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at a3edf4a2.

This head is the same six commits rebased onto the new #545 head, with no change to the patches reviewed at 09d944b9, and every commit is verified.

Before approval:

  • CI gate fails on this head. The cause is on main: hyperglass/cli/tests/test_healthcheck.py:18 builds CliRunner(mix_stderr=False), and Click 8.5.1 from #535 no longer accepts mix_stderr, so both backend test jobs stop at collection. It needs a fix on main and a rebase. The details are in my comment on #545.
  • Gallery mode is unchanged: the PR stays blocked on #549, and it needs the card selection test for a prefilled location once it is restacked.

@jsenecal

Copy link
Copy Markdown
Collaborator Author

Restacked on #574, the #549 fix (663bc54). It needs another look.

  • Restack: the six commits are unchanged apart from context. In looking-glass-form.test.tsx, fix(ui): drive the location card's checked state from the form state #574's location cards block and this PR's prefill block are both kept as they were.
  • New test: shows the location from the link as a selected card that a click toggles, in gallery mode. The router becomes ready after mount, as on a first load. The prefilled card shows data-checked="true" and the other cards "false". One click clears it from the card, form and selections, and a second click selects it again.
  • What the test catches: it fails with the pre-fix(ui): drive the location card's checked state from the form state #574 card (plus only data-checked) and with a card that seeds local state once on mount, in both cases at the "selected" assertion.

GitHub keeps main as this PR's base, so until #574 merges the diff here also shows #574's commit. That commit is reviewed on #574. The commits that belong to this PR are the last seven.

@jsenecal
jsenecal requested a review from WilhelmZA November 21, 2026 15:54

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 663bc543.

The prefill commits are the ones reviewed at 09d944b9, restacked on the #549 fix: the range diff shows one context-only difference in a test hunk. The new gallery-mode test applies the prefill after the cards mount, as the page does, and checks the selected card and that one click removes the location and a second restores it. It fails without the card fix. CI gate passes on this head and all eight commits are verified. The body says Part of #554, which matches the single-target scope.

Before approval:

  • #564 has merged and CHANGELOG.md now conflicts with main.
  • This branch carries #574's commit and has no Closes #549. Please merge #574 first, then rebase this branch onto main, so #549 closes through #574 and this diff shrinks to the prefill change. I will approve that head once CI gate passes on it.

@jsenecal
jsenecal force-pushed the feat/port-p1-url-prefill branch from 663bc54 to 68cb475 Compare November 21, 2026 16:08
@jsenecal

Copy link
Copy Markdown
Collaborator Author

Rebased onto main after #574 and #564 merged (68cb475).

@jsenecal
jsenecal requested a review from WilhelmZA November 21, 2026 16:08
WilhelmZA
WilhelmZA previously approved these changes Nov 21, 2026

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 68cb4755.

#574 has merged, and this branch is now the seven prefill commits on main. They are the patches reviewed at 663bc543; the range diff shows only CHANGELOG.md context from #564. The branch contains current main, CI gate passes on it and all seven commits are verified. Part of #554 matches the single-target scope.

A link such as /?location=<id>&location=<id>&type=<id or name>&target=<value>&var.<variable>=<value> fills in the form once the router is ready. prefillForm applies each value through the same steps as the user's input (locationChange, query type, target, variables), so values the configuration doesn't offer are left out. The query type matches by ID, then by name. The parameters are then removed from the address through the router. The form is never submitted from a link.

The select target now shows the store's target, so a target set without the select shows as chosen.
- An unknown query type stops the prefill also when the locations offer one query type and locationChange chose it, so the link's target isn't applied to it.
- The prefill effect runs after the store mirror, so a no-common-query-types error survives a mount with the router already ready.
- router.replace gets the page's route and the address separately, so a page served as /index.html stays on the shallow path.
- Variables are read as own properties, so IDs such as constructor or toString can be prefilled.
- A target with control characters or line separators is left out; the backend rejects it.
- The parameters left in the address keep their original text.
- Tests mount the form before the router is ready, as on a first load.
prefillForm cleared the target and variables only when the link's query
type differed from the one in the form. With the same query type, a
target left out (or missing) kept the old one, and the link's variables
were merged into the old ones; a link without a resolvable query type
kept the old query type when the new locations still offered it.

Clear the query type, target, its display and variables once a known
location is applied, before locationChange, so the result depends only
on the link.
The backend doesn't check a select target against a directive's options,
so only the variables and their options must match.
A prefilled location shows as a selected card, one click removes it from the
card and the store, and a second click selects it again. The other cards stay
unselected.
@jsenecal

Copy link
Copy Markdown
Collaborator Author

Rebased onto main after #565 and #566 merged (68a96ae), sorry for another round. The only conflict was CHANGELOG.md. #566 added ### Added, so this PR's bullet now sits under that heading instead of adding a second one. Commits 2–7 are = in the range-diff, and the diff is the same 7 files. Frontend: 36 files, 353 tests pass.

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 68a96aea.

This is the rebase onto main after #565 and #566. The seven commits are the patches approved at 68cb4755; the range diff shows only CHANGELOG.md context, where the entry now follows the forced refresh entry under Added. The branch contains current main, CI gate passes on it and all seven commits are verified.

@jsenecal
jsenecal merged commit 455c68a into main Nov 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improve documentation feature New feature or request frontend Next.js UI and the runtime UI build reviewing Issue is being reviewed by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A location card stays selected after a reset and needs two clicks

3 participants