feat: add preference to show full file path in data links; add labels for UI display to data links#344
Merged
feat: add preference to show full file path in data links; add labels for UI display to data links#344
Conversation
Collapse /files/{key}/{sharing_name}/{path} into /files/{key}/{path}. _get_file_proxy_client now resolves subpath by matching captured_path against stored path or basename with boundary guards. This is backwards compatible with existing links because {sharing_name} used to just be the name of the directory the data link was being created for (now called a non-transparent link)
also needed to update the mock for /api/proxied-path for the DataLinkDialog test
New mutation with optimistic rollback for PUT /api/proxied-path/:key.
also change the column heading on the data link table from "name" to "label"
krokicki
reviewed
Apr 9, 2026
Member
krokicki
left a comment
There was a problem hiding this comment.
I like the data labels!
For the transparent URLs, it shows me that the link will look like this:
https://.../<key>/annotations/jrc_P3-E5-D1-N2_v2_destreaked/crop12/crop12cell_labels_for_ML/amira_export.zarr
It needs to include the full path (i.e. mount path of the FSP at the beginning) to be fully transparent.
| sharing_key: proxiedPathByFspAndPathQuery.data!.sharing_key, | ||
| sharing_name: newLabel | ||
| }); | ||
| toast.success('Data link label updated'); |
Member
There was a problem hiding this comment.
I think this is the same code as handleConfirmLabel in linksColumn. Is there a way to reuse it?
Replace the boolean is_transparent flag with a free-form url_prefix string that stores the exact URL path segment appearing after the sharing key. This allows data links to use any arbitrary subpath (directory name, full path, or custom string) rather than being limited to two hardcoded modes.
Replace the transparentDataLinks boolean preference with a
dataLinkSubpathMode preference ('name' | 'full_path' | 'custom').
The preferences page and create data link dialog show a radio group.
When custom mode is selected, the dialog shows an editable text input.
When automatic links + custom mode are both enabled, a dialog is shown
instead of silently creating the link.
The data link "label" is now always set to the url_prefix at creation time and is no longer separately editable. Remove the EditDataLinkLabel dialog, the edit label menu action, and the useUpdateProxiedPathMutation hook. Rename the table column from "Label" to "Name".
- this is only for now - the sharing_name always equals url_prefix. The put mutation is not included on the frontend for now, so this code is never accessed
Encodes the default url_prefix derived from basename, and also encodes an explicitly provided url_prefix if it contains invalid characters. Avoids double-encoding values already encoded by the frontend.
krokicki
approved these changes
Apr 10, 2026
Member
krokicki
left a comment
There was a problem hiding this comment.
Looks good. I think it would be better if the "Enable automatic data link creation" option was on the bottom, but that's not easy to do with how the options are currently implemented, so we can come back to it later.
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 ids: 86abc1mrr
This PR adds the ability for the user to select between three data link naming formats:
https://.../<key>/directory-namehttps://.../<key>/full/path/to/directory-namehttps://.../<key>/some-custom-string/can/be/path-likeWhatever the string added for the data link name, this is added to the "name" column in the data link table. This value is not editable.