feat(blocks): add video, plan, and task_card block support#73
Merged
Conversation
Adds builder support for the three remaining Slack block types the validator already understands but the palette and editor surface didn't expose: `video` (embedded player with provider metadata), `plan` (agent checklist), and `task_card` (tracked agent step with sources). New palette variants ship in the Agents and Video sections; the per-block popover editor dispatches to a typed form for each. All factory variants round-trip through `toSlackBlocks` and pass `validateBlockKit` in the existing `public-api` palette test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
block-kitchen | e26c057 | Commit Preview URL Branch Preview URL |
May 20 2026, 04:41 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds builder support for the three remaining Slack block types the validator already understands but the palette and editor surface didn't expose:
video,plan, andtask_card.Why
The validator schema already accepts
video,plan, andtask_card, andslack-blocks-to-jsxalready renders them, but block-kitchen had noSupportedBlockTypeentry, palette variant, or editor for any of them. That gap meant users couldn't compose the standard Slack media block (video) or the newer agent-facing blocks (plan,task_card) from the builder — they had to hand-roll the payloads.This PR closes the gap so the builder covers Slack's full app-sendable surface (everything except
file, which Slack only emits when reading messages and apps cannot send outbound).What changed
src/types.ts): newVideoBlock,PlanBlock,TaskCardBlock,TaskCardStatus, andUrlSourceElementinterfaces; expandedSupportedBlockTypeandSupportedBlockunions.src/lib/default-blocks.ts):Plan,Task card, andTask card with sourcesvariants.Videosection withBasicandWith metadatavariants.labelForBlockTypegets cases for the three new types.video-editor.tsx,plan-editor.tsx,task-card-editor.tsx. Plan and task_card use aRadioGroupfor status; task_card includes a sources sub-editor (add/remove rows of label + URL).block-editor.tsxdispatch cases,block-row.tsxlabel map, andsrc/index.tspublic type exports.The rich-text
detailsandoutputfields ontask_cardround-trip on the payload but aren't editable inline in v1 — palette variants that include them keep them on save. ATaskCardEditorhelp line calls this out.Test plan
pnpm typecheckpnpm lintpnpm test— 217/217 pass, including theevery default palette factory produces a payload that validatescheck, which exercises each new factory throughtoSlackBlocks→validateBlockKit.pnpm demo:dev:slack-blocks-to-jsx.Notes for reviewer
slack-blocks-to-jsx'svideorenderer puts a<p>containing a<div>, which React flags as a hydration warning in the console. The warning originates inside the library's ownvlcomponent (not our payload) and the block renders correctly; not addressed here.🤖 Generated with Claude Code