feat(files): resolve paths before inspect and support protocol URL #2465
+355
−85
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.
This PR fixes various papercuts around putting URIs and IPNS paths into webui/desktop app, and not getting useful error, just blank screen or infinite spinner.
Changes
/ipfs/and/ipns/paths to their final CID before opening IPLD Exploreripfs://andipns://protocol URLs (auto-converted to paths)ipfs://andipns://URLsipfs.resolvewithrecursive: truefor all paths on InspectTest
Good path
/ipns/cid.ipfs.tech/assetsand click Inspect - resolves to final CIDipfs://bafy...- validates and works with both buttonsError paths
/ipns/cid.ipfs.tech/404and click Browse → 404 error/ipns/google.comand click Browse → missing DNSLink errorImproved generic error for 404 and other error paths
Nothing was displayed on error paths before.
Added basic UI, PRs welcome to improve it, for now it looks like this: