feat(dashboard): /config form — prompt template editor + preview #458

Closed
opened 2026-04-27 13:50:30 +00:00 by claude-desktop · 1 comment
Collaborator

User story

As an operator, I want a prompt-template editor in /config per agent type with a textarea, a row of clickable ${var} chips that insert at cursor, and a live-preview pane showing the rendered prompt for a sample task, so that I can iterate on prompts and see exactly what the agent will see.

Acceptance criteria

UI

  • Textarea with monospace font for the template
  • Below textarea: chips for available vars (${repo}, ${issue_number}, ${forgejo_url}, ${agent_name}, ${agent_type}, ${pr_number}, ${parent_pr}); clicking inserts at cursor
  • Right side: live preview pane rendering the template against a sample-task fixture (editable inline: the operator can change repo/issue_number etc. via small inputs above the preview)
  • Unknown ${var} rendered as the literal string (mirrors server interpolation) and highlighted with a warning chip
  • Reset button: restores default template for that type

Tests

  • Var-chip insert places ${var} at the caret
  • Preview re-renders on textarea or sample input change
  • Unknown var detection flags ${nope}

Out of scope

  • Diff vs. previous prompt
  • Prompt version history
  • Per-instance override

References

  • Depends on Phase 2b (system_prompt_template schema) — #451
  • Depends on Phase 4a skeleton — #456
## User story As an operator, I want a prompt-template editor in `/config` per agent type with a textarea, a row of clickable `${var}` chips that insert at cursor, and a live-preview pane showing the rendered prompt for a sample task, so that I can iterate on prompts and see exactly what the agent will see. ## Acceptance criteria ### UI - [ ] Textarea with monospace font for the template - [ ] Below textarea: chips for available vars (`${repo}`, `${issue_number}`, `${forgejo_url}`, `${agent_name}`, `${agent_type}`, `${pr_number}`, `${parent_pr}`); clicking inserts at cursor - [ ] Right side: live preview pane rendering the template against a sample-task fixture (editable inline: the operator can change `repo`/`issue_number` etc. via small inputs above the preview) - [ ] Unknown `${var}` rendered as the literal string (mirrors server interpolation) and highlighted with a warning chip - [ ] Reset button: restores default template for that type ### Tests - [ ] Var-chip insert places `${var}` at the caret - [ ] Preview re-renders on textarea or sample input change - [ ] Unknown var detection flags `${nope}` ## Out of scope - Diff vs. previous prompt - Prompt version history - Per-instance override ## References - Depends on Phase 2b (`system_prompt_template` schema) — `#451` - Depends on Phase 4a skeleton — `#456`
Collaborator

🤖 Auto-assigned to dev (heuristic: area:dashboard + body 1341 bytes (≤ 2 KB) — dev). Reply /unassign to reroute.

🤖 Auto-assigned to **dev** (heuristic: area:dashboard + body 1341 bytes (≤ 2 KB) — dev). Reply `/unassign` to reroute.
Sign in to join this conversation.
No milestone
No project
No assignees
2 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#458
No description provided.