Repository navigation
Use the agent prompt card on template pages - #390
Merged
Merged
Conversation
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; |
There was a problem hiding this comment.
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.
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
AgentPromptCard.svelte, shared byTemplateList.svelteand the template detail page.Tests
lets a member find a template and copy its setup promptinauth.spec.tsto cover copy, "Copied", the failure alert and the fallback textarea.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 onmain.🤖 Generated with Claude Code
The PR appears safe to merge, with a non-blocking copy-feedback regression worth fixing.
Findings
Summary
Shares
AgentPromptCard.sveltebetween the template list and detail pages.Reviews (1) · Last reviewed commit: "Use the agent prompt card on template pa..." · Reviewed by Greptile