Skip to content

Storage inspector experimental#8299

Merged
Light2Dark merged 18 commits intomainfrom
sham/storage-endpoints
Feb 23, 2026
Merged

Storage inspector experimental#8299
Light2Dark merged 18 commits intomainfrom
sham/storage-endpoints

Conversation

@Light2Dark
Copy link
Copy Markdown
Collaborator

@Light2Dark Light2Dark commented Feb 13, 2026

📝 Summary

Adds storage inspector feature under a feature flag.

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 21, 2026 0:25am

Request Review

Comment thread marimo/_data/_external_storage/models.py
Comment thread marimo/_runtime/runtime.py Outdated
Comment thread marimo/_messaging/notification.py
Comment thread marimo/_server/api/router.py Outdated
@Light2Dark Light2Dark changed the title external storage endpoints add external storage endpoints Feb 13, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 20, 2026
@Light2Dark Light2Dark changed the title add external storage endpoints Storage inspector experimental Feb 21, 2026
Light2Dark and others added 7 commits February 21, 2026 20:24
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR closes any issues, list them here by number (e.g., Closes
#123).
-->
- Adds a feature flag to enable storage inspector
- Implements frontend features for storage inspector including:
     - Downloading a file
- Searching a file (must have been expanded, only client-side search).
This is consistent with cloudflare / aws where they do client-side
searching rather than server-side search which can be expensive.
     - UI display for file types, file size, last modified
- Refactors UI components across session-panel for reuse here.

<img width="437" height="537" alt="image"
src="https://github.com/user-attachments/assets/21f3230b-5444-4359-949c-16dbff845b6b"
/>


https://github.com/user-attachments/assets/96bedd6a-ee0e-44cb-967e-8d71e1a42d67

**Future improvements**
- ~Add 'copy' feature, copy the full URL~. Maybe 'copy Python snippet'
to read locally in Python
- Preview file (open file in external browser / sidepanel / expanded)
- ~Refresh connection~

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [x] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [x] Tests have been added for the changes made.
- [ ] Documentation has been updated where applicable, including
docstrings for API changes.
- [x] Pull request title is a good summary of the changes - it will be
used in the [release
notes](https://github.com/marimo-team/marimo/releases).
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR closes any issues, list them here by number (e.g., Closes
#123).
-->
adds docs + link to docs from the editor. small fix to capitalize the
display_name of storages.

<img width="1512" height="824" alt="image"
src="https://github.com/user-attachments/assets/077c8dcd-e50c-4f9a-b128-5853cef5ee45"
/>

video


https://github.com/user-attachments/assets/d3f7d33c-4fb8-4290-a9b7-054662d33f30

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [x] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] Tests have been added for the changes made.
- [x] Documentation has been updated where applicable, including
docstrings for API changes.
- [x] Pull request title is a good summary of the changes - it will be
used in the [release
notes](https://github.com/marimo-team/marimo/releases).
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an experimental “Storage Inspector” (remote storage browser) behind a feature flag, wiring new backend storage commands/notifications through to new UI state, panel, and API endpoints.

Changes:

  • Add runtime/server support for listing and downloading external storage entries (commands, callbacks, notifications, HTTP endpoints, OpenAPI updates).
  • Add frontend storage state + request registry and a new Storage Inspector UI in the Files panel under an experimental flag.
  • Add docs + examples and comprehensive unit/integration tests across backend and frontend.

Reviewed changes

Copilot reviewed 49 out of 52 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/_session/state/test_session_external_storage.py Adds SessionView tests for merging/filtering storage namespaces and notification behavior.
tests/_server/api/endpoints/test_storage_endpoints.py Adds endpoint tests for storage list/download and read-mode authorization.
tests/_runtime/test_virtual_file.py Adds tests for VirtualFile.create_and_register behavior with/without context and empty buffers.
tests/_runtime/test_runtime_external_storage.py Adds runtime tests for storage list/download success and error paths (incl. thread dispatch).
tests/_data/_external_storage/test_storage_models.py Adds tests for download_file() and display_name behavior for storage backends.
tests/_data/_external_storage/test_get_storage.py Updates namespace conversion expectations to use backend display_name; removes nullable-name case.
pyproject.toml Removes default enabling of storage_inspector under experimental config.
packages/openapi/src/api.ts Adds storage endpoints + storage command/notification schemas; updates StorageNamespace.name to required string.
packages/openapi/api.yaml Adds storage endpoints + schemas mirroring runtime/server changes; updates StorageNamespace.name to non-null.
mkdocs.yml Renames nav group and adds Remote Storage guide to “Working with data”.
marimo/_session/state/session_view.py Stores/merges StorageNamespacesNotification and filters namespaces by variable scope.
marimo/_server/models/models.py Adds request models for storage list/download that map to kernel commands.
marimo/_server/api/router.py Registers new /api/storage router.
marimo/_server/api/endpoints/storage.py Adds /list_entries and /download endpoints dispatching control requests.
marimo/_runtime/virtual_file/virtual_file.py Adds VirtualFile.create_and_register helper with fallback to data URLs.
marimo/_runtime/runtime.py Registers new storage commands and implements ExternalStorageCallbacks (list/download).
marimo/_runtime/commands.py Introduces StorageListEntriesCommand and StorageDownloadCommand in the command union.
marimo/_messaging/notification.py Adds StorageEntriesNotification and StorageDownloadReadyNotification to notification union.
marimo/_data/_external_storage/models.py Makes namespace name non-null; adds DownloadResult, download_file(), and display_name mapping.
marimo/_data/_external_storage/get_storage.py Uses backend display_name when building StorageNamespace.
marimo/_cli/development/commands.py Includes storage request models in generated server API schema.
frontend/src/core/websocket/useMarimoKernelConnection.tsx Handles storage notifications and resolves deferred storage requests; filters storage by in-scope variables.
frontend/src/core/wasm/bridge.ts Adds unimplemented stubs for storage requests in wasm bridge.
frontend/src/core/storage/types.ts Adds storage types/utilities including storage path keys and URL construction.
frontend/src/core/storage/state.ts Adds Jotai reducer/atoms and useStorageEntries hook for lazy entry loading + caching.
frontend/src/core/storage/request-registry.ts Adds deferred request registries for list/download storage operations.
frontend/src/core/storage/tests/useStorageEntries.test.tsx Tests useStorageEntries caching/fetching behavior.
frontend/src/core/storage/tests/types.test.ts Tests storage key helpers and URL composition.
frontend/src/core/storage/tests/state.test.ts Tests storage reducer actions: namespaces, entries caching, and filtering.
frontend/src/core/network/types.ts Extends request client types with storage list/download requests.
frontend/src/core/network/requests-toasting.tsx Adds toast messages for storage request failures.
frontend/src/core/network/requests-static.ts Adds static-mode “not in edit mode” stubs for storage requests.
frontend/src/core/network/requests-network.ts Implements network POSTs for /api/storage/list_entries and /api/storage/download.
frontend/src/core/network/requests-lazy.ts Ensures storage requests wait for websocket connection.
frontend/src/core/islands/main.ts Marks new storage notifications as unsupported in islands mode.
frontend/src/core/islands/bridge.ts Adds unimplemented stubs for storage requests in islands bridge.
frontend/src/core/config/feature-flag.tsx Adds storage_inspector experimental feature flag (default false).
frontend/src/components/storage/storage-inspector.tsx Implements the Storage Inspector UI: namespaces, tree browsing, searching, copy URL, download.
frontend/src/components/storage/components.tsx Adds protocol and file-type icon helpers for storage inspector UI.
frontend/src/components/editor/file-tree/tests/file-explorer.test.ts Adds tests for filtering hidden files/directories in file explorer tree.
frontend/src/components/editor/chrome/panels/session-panel.tsx Refactors to shared panel accordion components.
frontend/src/components/editor/chrome/panels/file-explorer-panel.tsx Adds remote storage accordion section above Files panel under feature flag.
frontend/src/components/editor/chrome/panels/components.tsx Introduces shared styled accordion components for sidebar panels.
frontend/src/components/databases/icons/google-cloud-storage.svg Adds Google Cloud Storage icon asset for protocol rendering.
frontend/src/components/databases/engine-variable.tsx Stops propagation on click to avoid toggling parent accordion/row interactions.
frontend/src/components/app-config/user-config-form.tsx Adds Settings toggle for experimental Storage Inspector.
frontend/src/mocks/requests.ts Extends request client mocks with storage request methods.
examples/storage/general.py Adds example notebook/script demonstrating storage backends.
docs/guides/working_with_data/remote_storage.md Adds Remote Storage guide for using the Storage Inspector.
docs/guides/working_with_data/index.md Updates “Working with data” index to include Remote Storage.
docs/guides/editor_features/panels.md Updates Files panel description to mention remote storage inspection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/core/storage/types.ts
Comment thread docs/guides/working_with_data/remote_storage.md

name: ClassVar[str] = "storage-download-ready"
request_id: RequestId
url: Optional[str] = None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i dont know if the file in sharememory will be cleaned up, but something to monitor. because taking out of GA, we may want to check and instead just pass the raw bytes
cc @dmadisetti

return return_data_url()

vfile = VirtualFile(filename=vfile_name, buffer=buffer)
ctx.virtual_file_registry.add(vfile, ctx)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we may never remove this, so could lead to a leak

_, sep, suffix = filename.rpartition(".")
ext = suffix if sep and suffix else "bin"
return DownloadResult(
file_bytes=file_bytes,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

another approach would would relieve some memory pressure in the marimo server and handle larger files (but also wont work for all cases), is creating a a signed url to hand back to the frontend:

https://developmentseed.org/obstore/latest/api/sign/#obstore.sign

(something to consider for a followup)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah.., maybe you are right to not rely on vfiles, and return bytes as a fallback.

@Light2Dark Light2Dark merged commit 82fa744 into main Feb 23, 2026
61 of 77 checks passed
@Light2Dark Light2Dark deleted the sham/storage-endpoints branch February 23, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash documentation Improvements or additions to documentation enhancement New feature or request preview Experimental or preview-only feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants