Skip to content

chore(local-explorer-ui): Refactor KV & sidebar to use route loaders#12779

Open
NuroDev wants to merge 9 commits intomainfrom
NuroDev/local-explorer-tanstack-router-loaders
Open

chore(local-explorer-ui): Refactor KV & sidebar to use route loaders#12779
NuroDev wants to merge 9 commits intomainfrom
NuroDev/local-explorer-tanstack-router-loaders

Conversation

@NuroDev
Copy link
Member

@NuroDev NuroDev commented Mar 5, 2026

Fixes DEVX-2467.

This change refactors the KV routes & sidebar component (Or more specifically the root layout) to take advantage of route loaders to block page rendering until the initial data is ready.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows: This package does not yet contain a test suite (Being implemented in a later PR) to test this change.
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: WIP Experimental feature

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


Open with Devin

@NuroDev NuroDev self-assigned this Mar 5, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 544863a

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

✅ All changesets look good

Comment on lines +60 to +66
useEffect((): void => {
setObjects(loaderData.objects);
setCursor(loaderData.cursor);
setHasMore(loaderData.hasMore);
setError(null);
setLoading(false);
}, [loaderData]);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: We need this effect to ensure that when switching routes the data is revalidated.

@NuroDev NuroDev marked this pull request as ready for review March 5, 2026 23:25
@NuroDev NuroDev requested a review from a team as a code owner March 5, 2026 23:25
@workers-devprod
Copy link
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/local-explorer-ui/src/components/Sidebar.tsx: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/routes/__root.tsx: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/routes/do/$className/index.tsx: [@cloudflare/wrangler]
  • packages/local-explorer-ui/src/routes/kv/$namespaceId.tsx: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 5, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: e6b4fb0

devin-ai-integration[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants