Skip to content

Use the agent prompt card on template pages - #390

Merged
tnkuehne merged 1 commit into
mainfrom
ui/template-detail-prompt-card
Nov 25, 2026
Merged

tnkuehne merged 1 commit into
mainfrom
ui/template-detail-prompt-card

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Template detail pages showed the setup prompt as a raw code block with a copy button. They now use the same "Set up with your agent" card as the template list.
  • Extracts the card into AgentPromptCard.svelte, shared by TemplateList.svelte and the template detail page.
  • The prompt text only appears when copying fails (selectable textarea) or without JavaScript.

Tests

  • Updated lets a member find a template and copy its setup prompt in auth.spec.ts to cover copy, "Copied", the failure alert and the fallback textarea.
  • Template e2e tests: 2 passed, 1 failed. All assertions touched here pass. The failure is later in the same test at auth.spec.ts:3486: locator(".markdown") matches 3 elements because the required-secret help texts also render .markdown. It is unrelated to this change and was not cross-checked on main.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking copy-feedback regression worth fixing.

Findings

  1. P2 Copy feedback conflicts on retries ▶

Summary

Shares AgentPromptCard.svelte between the template list and detail pages.

  • Template details now use the same prompt-copy card as the template list.

Reviews (1) · Last reviewed commit: "Use the agent prompt card on template pa..." · Reviewed by Greptile

The template page showed its setup prompt as a raw code block with a
copy button. It now uses the same card as the template list, extracted
into AgentPromptCard, which reveals the prompt only when copying fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment on lines +26 to +30
setTimeout(() => {
copied = false;
}, 2000);
} catch {
failed = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Copy feedback conflicts on retries

The detail page loses the resets that CopyButton provided. Clicking twice within two seconds lets the first timer clear the second click’s “Copied” message early. If the second copy fails, copied stays true while the error appears.

Clear the previous timer before each result, reset copied on failure, and clear the timer when the card is removed.

@tnkuehne
tnkuehne merged commit a95e022 into main Nov 25, 2026
16 of 17 checks passed
@tnkuehne
tnkuehne deleted the ui/template-detail-prompt-card branch November 25, 2026 13:12
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