fix(skills): render markdown previews instead of mono raw text #927

Merged
charles merged 3 commits from fix/skill-preview-render-markdown into main 2026-05-07 19:42:25 +00:00
Collaborator

Summary

Three preview panes still showed skill / prompt bodies as mono whitespace-pre-wrap text instead of rendered markdown — clicking "Preview" on a skill row gave a wall of raw template text. Swap each for <Markdown> so previews match what the agent will actually see.

  • Skill preview modal (agent-db-skills-tab.tsx) — the modal opened from the "Preview" button on each skill row.
  • Prompt template preview (features/agents/sections.tsx) — the live block under the system-prompt template editor.
  • Setup wizard skill preview drawer (agents.$type.setup.tsx) — the per-skill preview panel during onboarding.

watchdog-panel.tsx deliberately untouched — that pane shows raw git diff output, not markdown.

Test plan

  • just qa clean — 3263 server tests + lint + typecheck + paraglide-check + i18n-string-check
  • Empty / fallback states preserved (e.g. "Enter a template to preview." span)

Closes #882 follow-up.

## Summary Three preview panes still showed skill / prompt bodies as mono `whitespace-pre-wrap` text instead of rendered markdown — clicking "Preview" on a skill row gave a wall of raw template text. Swap each for `<Markdown>` so previews match what the agent will actually see. - **Skill preview modal** (`agent-db-skills-tab.tsx`) — the modal opened from the "Preview" button on each skill row. - **Prompt template preview** (`features/agents/sections.tsx`) — the live block under the system-prompt template editor. - **Setup wizard skill preview drawer** (`agents.$type.setup.tsx`) — the per-skill preview panel during onboarding. `watchdog-panel.tsx` deliberately untouched — that pane shows raw git diff output, not markdown. ## Test plan - [x] `just qa` clean — 3263 server tests + lint + typecheck + paraglide-check + i18n-string-check - [x] Empty / fallback states preserved (e.g. "Enter a template to preview." span) Closes #882 follow-up.
fix(skills): render markdown previews instead of mono raw text
Some checks failed
qa / dockerfile (pull_request) Successful in 9s
qa / i18n-string-check (pull_request) Successful in 10s
qa / sql-layer-check (pull_request) Successful in 17s
qa / db-schema (pull_request) Successful in 19s
qa / qa-1 (pull_request) Failing after 8m59s
qa / qa (pull_request) Failing after 0s
a9e2253ec3
Three preview panes still showed skill / prompt bodies as mono
`whitespace-pre-wrap` text:

- Skill preview modal in `agent-db-skills-tab.tsx` (the "Preview"
  button on each skill row in the agent settings drawer)
- Prompt template preview in `agents/sections.tsx` (the live preview
  block under the system-prompt template editor)
- Skill preview drawer in `agents.$type.setup.tsx` (the wizard's
  per-skill preview panel)

Swap each `<pre>` for a `<div>` containing `<Markdown>{body}</Markdown>`,
so the operator sees the markdown rendered the same way the agent's
skill body would render in chat. Caller's empty / fallback handling
preserved (e.g. "Enter a template to preview." span).

`watchdog-panel.tsx` left as-is — that pane shows raw git diff output,
not markdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.
ci: retrigger
Some checks failed
qa / sql-layer-check (pull_request) Successful in 12s
qa / dockerfile (pull_request) Successful in 15s
qa / db-schema (pull_request) Successful in 19s
qa / i18n-string-check (pull_request) Successful in 22s
qa / qa-1 (pull_request) Failing after 7m0s
qa / qa (pull_request) Failing after 0s
ec7a6d2eb9
Collaborator

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.
test(web): bump waitFor timeout for ReposStep pagination test
Some checks failed
qa / sql-layer-check (pull_request) Successful in 11s
qa / i18n-string-check (pull_request) Successful in 11s
qa / db-schema (pull_request) Successful in 13s
qa / dockerfile (pull_request) Successful in 16s
qa / qa-1 (pull_request) Failing after 8m26s
qa / qa (pull_request) Failing after 0s
ce0f86f8d9
CI runs vitest in a heavily-loaded forge runner where the same suite
takes ~243s vs ~1.7s on the dev box. The page-2 pagination test
called \`waitFor\` with the default 1 s timeout, which flaked under
that slowdown — React's state transition + refetch round-trip after
the Next click sometimes landed on the wrong side of the deadline.

Bump that one waitFor to 5 s. Local stays fast, CI gets breathing
room.
Collaborator

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.

🚫 Dispatch aborted: skill 'fix-ci' missing for agent type 'claude-desktop'. Seed it at /agents/claude-desktop/skills.
charles deleted branch fix/skill-preview-render-markdown 2026-05-07 19:42:26 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!927
No description provided.