Skip to content

[WIP] Mitosheet - Column Cards#2344

Open
ngafar wants to merge 12 commits into
devfrom
feat/mitosheet-column-cards
Open

[WIP] Mitosheet - Column Cards#2344
ngafar wants to merge 12 commits into
devfrom
feat/mitosheet-column-cards

Conversation

@ngafar

@ngafar ngafar commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds the ability to create cards for a column. Cards provide an "at a glance" overview of the column, and quickly explore the data.

Testing

Right click on a column header, and look for the Create Card option. You have to provide a brief description of what the card should contain. Once created, you can click on a cell to see the card.

Note that sometimes the card creation fails. If you re-submit it should work.

Documentation

Yes


Note

High Risk
Runs LLM-generated Python via exec/eval (restricted builtins but still arbitrary logic on sheet data) and expands persisted analysis state; explore view transpile uses a naive df string replace.

Overview
Adds column cards: per-column “at-a-glance” summaries when you select a cell, plus optional explore links that open related filtered sheets.

Backend: New column_cards on State (serialized to the frontend as columnCards). get_card_template uses the existing LLM stack to return Streamlit-style card code and explore view_code entries; get_card_content runs that code via a StreamlitCardRecorder (exec with a restricted __builtins__) and returns UI blocks. set_column_card / add_explore_view steps persist definitions and materialize explore views (eval on view_code, new sheet with DATAFRAME_SOURCE_EXPLORE). Card definitions can be plain code or JSON {code, explore}.

Frontend (in repo, not fully in diff): SelectionCard overlay, CardsTaskpane, and extensive mito.css for card metrics/tables/alerts; wired through Mito.tsx and API types.

Lifecycle: column_cards is cleared on sheet overwrite and popped on dataframe delete.

Reviewed by Cursor Bugbot for commit 72742d1. Configure here.

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
monorepo Ready Ready Preview, Comment Jun 4, 2026 5:51pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 72742d1. Configure here.

self.table(arg)
continue
content = _write_args_to_string(args, kwargs)
self._append_text(content)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

st.write duplicates structured blocks

Medium Severity

In StreamlitCardRecorder.write, arguments that already produce a dataframe or table block are still serialized and appended as a plain text block, so cards can show the same data twice (formatted table/grid plus a raw dump).

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 72742d1. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant