Skip to content

[explorer] add the UI for the dev resource explorer#12288

Merged
emily-shen merged 12 commits intomainfrom
emily/explorer-ui-p1
Feb 4, 2026
Merged

[explorer] add the UI for the dev resource explorer#12288
emily-shen merged 12 commits intomainfrom
emily/explorer-ui-p1

Conversation

@emily-shen
Copy link
Copy Markdown
Contributor

@emily-shen emily-shen commented Jan 29, 2026

a lot of generated files again, diff looks scarier than it is!

This PR adds a UI which lets you view/edit KV namespaces

Currently looks something like this:
Screenshot 2026-02-02 at 13 01 43

How this works:

  • We generate an api client from openapi.local.json in miniflare.
  • We use tanstack router for routing
  • otherwise, its a pretty plain react + vanilla css thing.

This is not being served by miniflare - follow the instructions in the readme to test.

The next PR will make miniflare serve the built output on /cdn-cgi/explorer


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows: see readme. we will add playwright tests towards the end as the ui is still in flux
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: wip experimental thing

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 5c0725b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 29, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12288

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12288

miniflare

npm i https://pkg.pr.new/miniflare@12288

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12288

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12288

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12288

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12288

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12288

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12288

wrangler

npm i https://pkg.pr.new/wrangler@12288

commit: 5c0725b

@emily-shen emily-shen force-pushed the emily/explorer-ui-p1 branch 3 times, most recently from b477054 to 5bb76f9 Compare February 2, 2026 12:49
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 2, 2026

Claude finished @emily-shen's task —— View job


Changeset Review

Reviewing changeset files...

Todos:

  • Read changeset guidelines
  • Review changeset file
  • Check for cute animal
  • Post findings

⚠️ Issues found

Changeset: .changeset/red-towns-brush.md

Issue: Missing experimental feature opt-in note

The changeset description states "This is an experimental WIP package" but doesn't explain how users can opt in or access this experimental feature. According to the guidelines:

Experimental features: Changesets for experimental features should include note on how users can opt in.

Current description:

Set up local explorer UI with a view for KV namespaces

This is an experimental WIP package.

Suggested improvement:

Add information about how users can access or enable this experimental feature. Based on the PR description, this UI is not yet served by miniflare and requires manual testing via the README instructions. The changeset should clarify:

  • That this is not yet user-facing/accessible in normal workflows
  • How users will eventually access it (e.g., "will be available at /cdn-cgi/explorer in a future release")
  • Or, if this is purely internal and not meant for users yet, consider whether a changeset is needed at all

Example improved description:

Set up local explorer UI with a view for KV namespaces

This adds an experimental UI for viewing and editing KV namespaces during local development. This feature is not yet exposed to users - it will be served at `/cdn-cgi/explorer` in a future release. The UI is currently under active development.

@emily-shen emily-shen force-pushed the emily/explorer-ui-p1 branch from 9709bce to eedfbc7 Compare February 2, 2026 12:59
@emily-shen emily-shen marked this pull request as ready for review February 2, 2026 13:00
@emily-shen emily-shen requested a review from a team as a code owner February 2, 2026 13:00
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View issues and 5 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx
Comment thread packages/local-explorer-ui/src/components/KVTable.tsx Outdated
@emily-shen emily-shen marked this pull request as draft February 2, 2026 15:04
@emily-shen emily-shen force-pushed the emily/explorer-ui-p1 branch 3 times, most recently from 5a73021 to c7b1c8a Compare February 2, 2026 16:06
@emily-shen emily-shen marked this pull request as ready for review February 2, 2026 16:06
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View issues and 9 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx Outdated
Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx Outdated
Comment thread packages/local-explorer-ui/package.json Outdated
Copy link
Copy Markdown
Member

@NuroDev NuroDev Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to try and get the icons to match the Cloudflare dashboard or workers.cloudflare.com if possible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the KV icon is taken from the dash, and i think the rest are generic enough not to matter?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency sake I would say it would be better but I'll let you make the call.
I just think for adding future icons it'd be easier to use the same packaged icon library than adding SVGs one-by-one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the icon library is in kumo so we would have to migrate anyway

Comment thread fixtures/worker-with-resources/src/index.ts
Comment thread packages/local-explorer-ui/public/favicon.svg
const [copied, setCopied] = useState(false);

const handleCopy = async () => {
await navigator.clipboard.writeText(text);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While unlikely, can we wrap this in a try / catch so if it does fail to write the text to clipboard we don't lie to the user saying it did.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it won't right? if that line throws, it won't set copied to true?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but if it does throw (Again, unlikely but could happen) do we not want to warn the user that them clicking the "Copy to clipboard" failed?

Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx Outdated
Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx Outdated
Comment thread packages/local-explorer-ui/src/routes/__root.tsx
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not be easier to use Tailwind CSS here as it would make migrating existing migrating existing internal styles easier, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think it'll make a difference when we switch to kumo components as they bring the tailwind styling with them. kumo also doesn't use tailwind classes directly, it has its own semantic class extensions, so if we used plain tailwind we would have to refactor it anyway.
the only advantage to using tailwind now would be if it was just nicer to develop with tailwind, and i don't (personally) think its worth it. tailwind makes the rest of the code more unreadable, in exchange for ergonomics when writing css. as i'm not really writing css by hand (thanks ai), that doesn't really matter (to me) anymore. happy to hear arguments against.

Comment thread packages/local-explorer-ui/vite.config.ts
Comment thread packages/local-explorer-ui/src/components/AddKVForm.tsx Outdated
Comment thread packages/local-explorer-ui/src/components/KVTable.tsx Outdated
Comment thread packages/local-explorer-ui/src/components/KVTable.tsx
Comment thread tools/deployments/__tests__/validate-changesets.test.ts Outdated
Comment thread packages/local-explorer-ui/src/components/KVTable.tsx
Comment thread packages/local-explorer-ui/README.md Outdated
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View issue and 9 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing about React 😅 but this LGTM

Comment thread packages/local-explorer-ui/src/components/KVTable.tsx
Comment thread packages/local-explorer-ui/src/components/KVTable.tsx Outdated
Comment thread packages/local-explorer-ui/src/components/Sidebar.tsx
Comment thread packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx
@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Feb 3, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View issue and 14 additional flags in Devin Review.

Open in Devin Review

Comment thread fixtures/worker-with-resources/src/index.ts
- Add Sidebar component with KV namespace list
- Add root layout with sidebar and main content area
- Add index page with welcome message
- Add base CSS with design tokens and shared styles
- Add layout CSS for sidebar and breadcrumbs
- Add Cloudflare logo SVG
actually a great catch from devin
@emily-shen emily-shen force-pushed the emily/explorer-ui-p1 branch from 159ab3a to 5c0725b Compare February 4, 2026 10:58
@emily-shen emily-shen merged commit 60eaf16 into main Feb 4, 2026
35 checks passed
@emily-shen emily-shen deleted the emily/explorer-ui-p1 branch February 4, 2026 11:27
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants