Repository navigation
Add a View Cards app that shows a view as a card - #32466
FelixMalfait wants to merge 4 commits into
Conversation
The `show-view` tool, exposed over MCP as `app_show_view`, displays a view's first records as a card in Twenty's AI chat and in MCP Apps hosts such as Claude: the view's visible columns in order and at their width, each value displayed as its field type is in the record table, record chips that open the record in Twenty, and an "Open view" button. - The tool reads nothing. The card loads the view with the access of the member reading it, through `view_id` on REST find-many, so the server applies the view's filters, search and sorts and the card only shows what that member can see. - Built from existing twenty-ui primitives (Chip, Avatar, Tag, Button, Skeleton, OverflowingTextWithTooltip), laid out like the call recorder's meeting card, and following DESIGN.md: dates without times, compact counts, `+N` for chip lists, a single tertiary row for an empty table. - Requires Twenty 2.68, which serves front components as MCP Apps and lets find-many read records through a view.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
That job will pass once 2.68 is on Docker Hub. The Generated by Claude Code |
…ix/wizardly-sagan-upeo1x-show-view
…and wait for the full view id
|
🚀 Preview Environment Ready! Your preview environment is available at: https://suse-elizabeth-tracking-princeton.trycloudflare.com This environment will automatically shut down after 5 hours. |
…ix/wizardly-sagan-upeo1x-show-view
Stack (MCP Apps, Twenty as an MCP Apps server), merge in order: 1. runtime → 2. resources → 3. tool binding → 4. generic mode → 5. findMany through a view → 6. View Cards app.
What
Adds a public app, View Cards (
packages/twenty-apps/public/view-cards). Itsshow-viewtool, exposed over MCP asapp_show_view, displays a view's first records as a card in Twenty's AI chat and in MCP Apps hosts such as Claude:How
view_idon REST find-many (Add Navbar on Application #5 in the stack), so the server applies the view's filters, search and sorts. The card shows only what that member can see.+Nfor chip lists;Verified end to end
I built the server and CLI from this stack and ran them locally the way the
localCI job does. Results:yarn testpasses: it installs the app and checks that the tool is bound to a non-headless card./mcpas a member:tools/listshowsapp_show_viewwith_meta.ui.resourceUri;resources/readreturns thetext/html;profile=mcp-appdocument with its CSP;AppBridgetest host:/objects/companies?viewId=…and a record chip opens/object/company/{id}throughopenLink.Notes
engines.twenty >=2.68.0), since it depends on the rest of the stack. The app pins the published 2.67.0 SDKs, as its siblings do. Itsdockerhub-latestintegration job will fail until 2.68 ships; thelocaljob runs this branch.{ success, message, result }. The card therefore reads the tool input rather than the output, which also lets it start loading before the function returns.https://claude.ai/code/session_01BC19MT31DvLYvxzeBBUKWi
Generated by Claude Code