Skip to content

feat(ui): markdown editor for agent & automation instructions#3266

Open
rafavalls wants to merge 5 commits intomainfrom
rafavalls/markdown-text-areas
Open

feat(ui): markdown editor for agent & automation instructions#3266
rafavalls wants to merge 5 commits intomainfrom
rafavalls/markdown-text-areas

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented May 4, 2026

What is this contribution about?

Adds a Notion-like markdown editor for the Instructions field in both agents and automations. Typing # Title transforms inline into a heading and pasting raw markdown is parsed via marked into proper nodes (headings, lists, blockquotes, code blocks, tables, strikethrough). The agents Instructions area swaps a plain <Textarea> for a new MarkdownEditor component; the automations editor reuses the existing TiptapProvider behind an enableHeadings flag so the chat input stays unchanged. Section titles in automations were also aligned to match the agent settings styling.

Screenshots/Demonstration

UI changes — please test in the running app.

How to Test

  1. Open any agent → Instructions: type # , ## , - , etc., should transform inline.
  2. Paste a markdown blob (e.g. with headings, bold, code, ~~strike~~, tables) → should render as formatted content, not raw text.
  3. Open any automation → Instructions: same behavior; mentions (@) and slash commands (/) should still work.
  4. Save and reload — content should round-trip back to markdown text without loss.
  5. Section titles in automations ("Starter", "Instructions") should now match the agent settings styling (text-sm font-medium text-foreground).

Migration Notes

Adds @tiptap/extension-table, -table-row, -table-cell, -table-header (3.20.2) to apps/mesh. Existing agent instructions stored as plain text continue to work — they're parsed through marked on load.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

🤖 Generated with Claude Code


Summary by cubic

Add a Notion-like markdown editor to the Instructions field for agents and automations, with inline shortcuts and paste-to-format for headings, lists, quotes, code, tables, and strikethrough. Automations enable rich formatting via enableHeadings on TiptapProvider, and section titles now match agent styling.

  • New Features

    • Agents: replace textarea with MarkdownEditor; type #, -, etc. to format live; pasted plain text is always parsed as markdown; content round-trips as markdown (including tables).
    • Automations: TiptapProvider with enableHeadings turns on headings, blockquote, code blocks, HR, and tables; markdown paste supported; @ mentions and / commands still work; section title and editor styles aligned with agents.
  • Bug Fixes

    • Sandbox test: increase a flaky test timeout to 15s to match the internal deadline and stabilize CI.

Written for commit 32810dc. Summary will update on new commits.

Adds a Notion-like markdown editor (Tiptap-based) for the Instructions
field in both agents and automations. Typing `# Title` transforms inline
into a heading, and pasting raw markdown is parsed via marked into proper
nodes (headings, lists, blockquotes, code blocks, tables, strikethrough).
Tables, blockquotes, code blocks, and horizontal rules are now enabled in
the underlying TiptapProvider behind an `enableHeadings` flag, so the chat
input is unaffected. Also aligns the section title styles in automations
to match the agent settings page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Release Options

Suggested: Minor (2.311.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.310.12-alpha.1
🎉 Patch 2.310.12
❤️ Minor 2.311.0
🚀 Major 3.0.0

Current version: 2.310.11

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

rafavalls and others added 4 commits May 4, 2026 13:30
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…xt-areas

# Conflicts:
#	apps/mesh/src/web/views/virtual-mcp/index.tsx
#	bun.lock
The "setPhase('cloning') is called before clone, 'clone-failed' on
non-zero exit" test polls up to 15 seconds, but bun's default test
timeout is 5 seconds. On Linux CI the clone retry loop (3 retries x 3s
backoff) reliably exceeds 5s before the unreachable host fails, causing
the outer timeout to fire before the test can assert on the failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

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