Skip to content

feat(views): relink broken View sources from the Views table and on Data Link create - #458

Open
allison-truhlar wants to merge 5 commits into
ngviews-11-layer-identityfrom
ngviews-12-relink-ui
Open

allison-truhlar wants to merge 5 commits into
ngviews-11-layer-identityfrom
ngviews-12-relink-ui

Conversation

@allison-truhlar

@allison-truhlar allison-truhlar commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Editable-Views branch 12: the frontend for relinking broken Views. It consumes the API from #457 (relinked_views on Data Link create, GET /api/neuroglancer/views/relinkable, POST /api/neuroglancer/views/relink, and ViewLayer.sharing_key/url_prefix). Spec: docs/superpowers/specs/2026-09-29-ngviews-editable-design.md §6.1.

What changed

  • Automatic relink toast: creating a Data Link that repairs the owner's broken Views on the same dataset shows "Relinked N broken View(s)". Explicit relinks use the same toast.
  • Consent notice: when automatic Data Links are off, the create dialog lists the broken Views the new link will repair, in an info-styled inset that mirrors the delete dialog's warning inset.
  • Relink button: in the Views table, a broken source whose dead Data Link key and prefix are known gets a Relink button. It opens a new RelinkDialog, which relinks onto the owner's existing Data Link for that dataset if there is one, and otherwise offers "Create Data Link". Sources that can't be relinked keep the plain icon, with the tooltip "Can't relink — recreate this View".
  • Consistent link URLs: Data Links created from the Relink dialog follow the subpath-mode preference. The prefix logic moved from useDataToolLinks into a shared defaultUrlPrefix.
  • No duplicate links: the Relink dialog's action stays disabled until the Data Links and file share lists have loaded. Without that, a click right after opening could create a second link for a dataset that already has one.
  • Even spacing in Sources: source rows in the Views table have a fixed height and vertical padding, so a Relink button doesn't change the spacing.

RelinkDialog takes a RelinkTarget so that the viewer banner planned for branch 14 can reuse it.

Testing

Frontend suite green (472), prettier and eslint clean, node-check at the known 5-error baseline. Checked the Views table spacing and dialogs by hand in the dev app. Playwright suite not run for this branch.

@krokicki

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