Skip to content

fix(ui): apply projections picked from the library - #357

Open
frdm666 wants to merge 1 commit into
visortelle:mainfrom
frdm666:fix/339-load-projection-from-library
Open

frdm666 wants to merge 1 commit into
visortelle:mainfrom
frdm666:fix/339-load-projection-from-library

Conversation

@frdm666

@frdm666 frdm666 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Picking a saved projection from the Library had no visible effect (#339):

  • the browse dialog stayed open after picking, so it looked like nothing happened;
  • the projection list looked up the row to replace by the id of the newly picked
    projection, which never matched anything — so the pick was silently dropped.

Consumer sessions were unaffected: their library browser lives in the sidebar and
navigates, instead of editing a list in place.

What changed

  • Close the browse dialog after picking, like Cancel already did.
  • Replace the projection by position instead of by id.
  • Added lib-panel-<itemType> and lib-save test ids — a projection, the projection
    list and a projection's target each own a library panel, so tests must tell them apart.

Test plan

Added CS-33 (CsProjectionLibrarySpec): saves a projection to the library, adds a
second one and applies the saved projection to it — their ids differ, which is
exactly what the old lookup could not handle. Asserts the dialog closes, the second
projection takes the saved label, and the first is untouched.

Note: an earlier version re-picked the same projection and passed even with the bug,
since the ids happened to match. Verified the current test fails without the fix.

LibrarySelectSpec, LibraryBrowseSpec, LibraryCrudSpec — 14 tests, all green.

Fixes #339

Picking a saved projection from the library had no visible effect:

- The browse dialog stayed open after picking an item, so it looked like
  nothing happened. Close it, like the Cancel button does.
- The projection list replaced the edited projection by looking it up by
  the id of the *newly picked* projection, which never matched any item
  in the list, so the picked projection was silently dropped. Replace by
  position instead.

Consumer sessions were unaffected because their library browser lives in
the sidebar and navigates instead of editing a list in place.

Also add test ids needed to drive the library browser from e2e tests.

Fixes visortelle#339
@frdm666
frdm666 requested a review from visortelle as a code owner August 1, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant