Repository navigation
fix(views): apply data-link naming preferences and external URL mapping at checkout - #496
Open
allison-truhlar wants to merge 5 commits into
Open
allison-truhlar wants to merge 5 commits into
allison-truhlar wants to merge 5 commits into
Conversation
Browsers block credentialed requests to servers that answer with Access-Control-Allow-Origin '*', so reading metadata from such a public bucket failed and checkout built an empty View.
Match the standalone Neuroglancer button: a path an external bucket already serves needs no Data Link, so checkout and the consent count skip it. Saving and the Sources tab now recognize those URLs too.
Match the standalone Neuroglancer button, which names new links by the naming preference. Checkout always used the basename.
Match the standalone Neuroglancer button: in custom naming mode, the dialog asks for a name for each new link and checks it before creating the link.
Bucket and externally mapped datasets have no Data Link, so the properties drawer's "Appears in Views" had nothing to key on. Add GET /api/neuroglancer/views/for-dataset, matching the caller's working layers by (fsp_name, path), and show it for read-only and externally mapped paths.
allison-truhlar
force-pushed
the
fix/views-checkout-link-prefs
branch
from
October 30, 2026 19:01
c8a4994 to
58a4571
Compare
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.
ClickUp: 17tkuw629e8. Stacked on #494.
View checkout (the cart, "Add to this View", and the "Neuroglancer View" button in the Zarr metadata panel) now resolves data access the same way the standalone Neuroglancer button does.
What changed
Data Link naming. Checkout computes
url_prefixwith the samedefaultUrlPrefixcall the file browser uses, so thename,full_path, andcustompreferences apply. Incustommode the consent dialog shows one name field per new link, prefilled with the folder name and validated like the Data Link dialog. With automatic links in custom mode, the dialog asks only for names.External bucket mapping. Checkout resolves the external-bucket mapping before creating a Data Link and builds the layer from that URL. Those datasets don't count toward the consent prompt. The server recognizes external URLs when creating and reconciling View layers, and the viewer sidebar resolves them back to datasets.
Also
credentials: 'same-origin'.includefails CORS against buckets that answerAllow-Origin: *.GET /api/neuroglancer/views/for-datasetendpoint.Why
Checkout sent only
fsp_nameandpathwhen creating a Data Link, so every link got the default basename prefix regardless of preference, and the consent dialog had no field for a custom name. Checkout also skipped the external-bucket mapping for ordinary file shares, creating a Data Link where the standalone button reuses the external URL.Testing
Automated:
pixi run -e test test-backend:bucket_sourcewith external roots, external-layer reconcile,get_views_for_dataset.pixi run test-frontend: prefix per naming mode, custom-name dialog, external URL resolution, dataset variant ofAppearsInViews.Manual, in the dev server:
full_path,name, andcustom(with automatic links on and off), then created a View from a dataset with no link. Each new link got the expected name. Repeated from "Add to this View" and from the draft View button.@krokicki