Skip to content

feat(files): resolve paths before inspect and support protocol URL - #2465

Merged
lidel merged 7 commits into
mainfrom
feat/inspect-ipns-resolve
Jan 26, 2026
Merged

feat(files): resolve paths before inspect and support protocol URL#2465
lidel merged 7 commits into
mainfrom
feat/inspect-ipns-resolve

Conversation

@lidel

@lidel lidel commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

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

  • Inspect button now resolves /ipfs/ and /ipns/ paths to their final CID before opening IPLD Explorer
  • Explore form accepts ipfs:// and ipns:// protocol URLs (auto-converted to paths)
  • Browse button preserves full paths (Files handles IPNS and subpaths natively)
  • Added path normalization for ipfs:// and ipns:// URLs
  • Uses ipfs.resolve with recursive: true for all paths on Inspect
  • Fixed grid view keyboard handler stealing focus from text inputs

Test

Good path

  1. Enter /ipns/cid.ipfs.tech/assets and click Inspect - resolves to final CID
  2. Enter ipfs://bafy... - validates and works with both buttons
  3. Grid view arrow navigation still works
  4. Can type in explore form input while in grid view

Error paths

  • Enter /ipns/cid.ipfs.tech/404 and click Browse → 404 error
  • Enter /ipns/google.com and click Browse → missing DNSLink error

Improved 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:

image

lidel added 4 commits January 23, 2026 17:02
the Inspect button now resolves `/ipns/` paths to `/ipfs/` CIDs
before passing them to the IPLD explorer, which cannot parse
IPNS names directly.

shows loading state during resolution and displays error message
if resolution fails.
- add normalizeToPath helper to convert protocol URLs to paths
- update validation to accept ipfs:// and ipns:// URL inputs
- use ipfs.resolve for all paths (not just IPNS) to get final CID
- preserve full paths when browsing (Files handles IPNS natively)
- rename translation key to inspectResolveFailed for clarity
- fix grid view stealing focus from text inputs
- preserve subpaths when resolving IPNS paths (e.g., /ipns/name/subdir/file)
- catch and display IPNS resolution errors instead of crashing
- fix path mismatch causing blank page when navigating IPNS paths
- add error display on FileNotFound page
- replace generic troubleshooting tips with actionable links
- add links to DAG Explorer, Retrieval Diagnostics, and forums
- show "search the web" tip only when error message is present
- use Box component and match app styling patterns
@lidel

lidel commented Jan 26, 2026

Copy link
Copy Markdown
Contributor Author

Triage: land #2466 first

- add e2e tests for Browse and Inspect buttons using inlined CID
- add browseButton locator for explore form
- remove debug console.warn from FilesPage
- add i18n for error prefix in file-not-found component
- invalid CID shows validation error (client-side check, red outline)
- invalid IPNS name shows error state (daemon-side DNSLink lookup)
@lidel
lidel force-pushed the feat/inspect-ipns-resolve branch from 587a299 to c82047f Compare January 26, 2026 19:21
@lidel
lidel marked this pull request as ready for review January 26, 2026 19:25
@lidel
lidel requested a review from a team as a code owner January 26, 2026 19:25
@lidel
lidel merged commit 74a44d8 into main Jan 26, 2026
12 checks passed
@lidel
lidel deleted the feat/inspect-ipns-resolve branch January 26, 2026 19:26
ipfs-gui-bot pushed a commit that referenced this pull request Feb 5, 2026
## [4.11.0](v4.10.0...v4.11.0) (2026-02-05)

 CID `bafybeidfgbcqy435sdbhhejifdxq4o64tlsezajc272zpyxcsmz47uyc64`

 ---

### Features

* Add search/filter functionality to Files UI ([#2451](#2451)) ([c866be6](c866be6)), closes [#2447](#2447)
* DHT Provide Sweep Diagnostic Screen ([#2463](#2463)) ([fb22ea6](fb22ea6))
* **files:** resolve paths before inspect and support protocol URL ([#2465](#2465)) ([74a44d8](74a44d8))
* **files:** support additional image file extensions ([#2347](#2347)) ([371341a](371341a))

### Bug Fixes

* **ci:** test stability improvements ([#2466](#2466)) ([d11475a](d11475a))
* CLI tutor commands missing some parameters ([#2470](#2470)) ([ed8ad6a](ed8ad6a))
* **diagnostics:** handle Go zero time in DHT provide screen ([dc51cd4](dc51cd4))
* **files:** not found page ([#2455](#2455)) ([18b9b0d](18b9b0d))
* show proper error state in import notifications ([#2452](#2452)) ([391470e](391470e)), closes [#2448](#2448)

### Trivial Changes

* **ci:** skip publishPreview for dependabot PRs ([17f675e](17f675e))
* pull new translations ([#2467](#2467)) ([cc569f4](cc569f4))
* pull transifex translations ([#2464](#2464)) ([8d7a17f](8d7a17f))
@ipfs-gui-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@lidel lidel added the iteration/2026-q1 On maintainer radar for Q1 2026 label Feb 12, 2026
This was referenced Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iteration/2026-q1 On maintainer radar for Q1 2026 released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support DNSLink resolution

2 participants