Skip to content

feat(renderer): set table download size policy at init#554

Open
kirangadhave wants to merge 2 commits into
mainfrom
kg/table-download-policy
Open

feat(renderer): set table download size policy at init#554
kirangadhave wants to merge 2 commits into
mainfrom
kg/table-download-policy

Conversation

@kirangadhave
Copy link
Copy Markdown
Member

@kirangadhave kirangadhave commented May 12, 2026

Closes #542

Sets downloadSizeLimitAtom (introduced in marimo PR marimo-team/marimo#9510) to a 50 MB cap with a VS Code–specific message, so the table Export button disables up-front with a tooltip instead of silently failing inside the sandboxed NotebookRenderer.

Why 50 MB

Empirically the sandbox download path and clipboard string limit start failing below 70 MB in testing. 50 MB is the conservative safe ceiling. The size gate uses JSON-serialized size (largest format we support) so if it fits, CSV/Parquet definitely fit.

Screen.Recording.2026-05-12.at.11.28.34.AM.mov

Test plan

  • Big table (> 50 MB JSON) in VS Code notebook → Export button disabled, tooltip shows the message
  • Small table → Export button enabled, downloads work
  • Older marimo backend (no `size_bytes` in render payload) → fail-open, button enabled
  • `marimo edit` in browser unaffected (atom not set there)

@kirangadhave kirangadhave added the bug Something isn't working label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Coverage Report

Area Lines Branches Functions
Python 48.17% (503 / 988) 37.97% (101 / 266)
TypeScript unavailable

@kirangadhave kirangadhave marked this pull request as ready for review May 12, 2026 19:35
@kirangadhave kirangadhave requested a review from manzt as a code owner May 12, 2026 19:35
@kirangadhave kirangadhave changed the title feat(renderer): set table download size policy at init [DO-NOT-MERGE] feat(renderer): set table download size policy at init May 12, 2026
@kirangadhave kirangadhave force-pushed the kg/table-download-policy branch from 2f32823 to e765461 Compare June 1, 2026 23:21
Copilot AI review requested due to automatic review settings June 1, 2026 23:21
@kirangadhave kirangadhave changed the title [DO-NOT-MERGE] feat(renderer): set table download size policy at init feat(renderer): set table download size policy at init Jun 1, 2026
Copy link
Copy Markdown

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

Updates the VS Code notebook renderer to proactively disable large interactive table exports by configuring marimo’s table download size policy during renderer activation, and bumps the bundled marimo dependency to a newer release.

Changes:

  • Bump bundled marimo from 0.23.60.23.8 (and update lockfile / .marimo-version accordingly).
  • Configure downloadSizeLimitAtom in the VS Code renderer to cap table exports at 50 MB with a VS Code–specific tooltip message.
  • Re-export downloadSizeLimitAtom/store (and related type) from the typed marimo frontend boundary to allow the renderer to set the policy.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Updates resolved marimo version and adds new dependency entries introduced by the bump.
pyproject.toml Pins marimo==0.23.8 for the Python package environment.
extension/src/renderer/renderer.tsx Sets the table download size policy on activation to disable export for large tables.
extension/src/renderer/marimo-frontend.ts Adds typed imports/exports for the new download policy atom (and exports store).
.marimo-version Updates the tracked bundled marimo version to 0.23.8.

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

Comment thread extension/src/renderer/marimo-frontend.ts Outdated
Comment thread .marimo-version
Sets downloadSizeLimitAtom to a 50 MB cap with a VS Code-specific message so marimo's table Export button disables up-front instead of silently failing inside the sandboxed NotebookRenderer.
@kirangadhave kirangadhave force-pushed the kg/table-download-policy branch from e765461 to e6f345c Compare June 1, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table export does not work

2 participants