Agents: show the copied prompt in Describe, and let the trail jump to any step - #910
Merged
Merged
Conversation
… any step Starting from an existing agent copied its instructions into the hidden field and landed on Meet, so the Describe textarea labelled "system prompt" was empty and the copied prompt only surfaced on the Launch summary card, with nowhere to edit it. The same happened after "Draft it for me": the AI rewrite never came back into the textarea. The brief is the system prompt field now, end to end: a copy seeds it with the source's instructions, the draft action writes its rewrite back into it, and the agent-step local carries it into the instructions on any exit from Describe, so a trail jump does what Continue does. Every step in the wizard trail is a jump target, forward too, the way the Workspaces wizard already works. Launch still bounces to Meet when the name is missing. An interactive os-step lifts its title and outlined chip to full contrast on hover so it reads as clickable; the cursor stays the shell's arrow by policy.
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.
What it does
Two fixes to the agent creation wizard in WP Explorer, plus a hover state for
<os-step>.The system prompt was invisible for copied and drafted agents. "Start from someone" copied the source's instructions into the hidden
instructionsfield and landed on Meet, so the Describe textarea labelled "What should this agent do? (system prompt)" was empty. The copied prompt only surfaced on the Launch summary card, with nowhere to edit it. "Draft it for me" had the same gap: the AI rewrite never came back into the textarea.The trail only went backwards. Steps ahead of the current one were inert. From Meet, Powers / Summon / Launch looked like tabs and did nothing.
Rationale
This is not a regression. The Describe textarea has been the system prompt since the guided flow replaced the expert form (#635), and editing an existing agent still has its own Instructions field in the Define pane. The bug was that the copy and draft paths bypassed the one place the wizard lets you see and edit the prompt.
The trail change mirrors what #882 did for the Workspaces wizard.
Implementation
agent-startwith a source seeds it with the source's instructions; the PHPagent-draftaction writes its rewrite back into it; theagent-steplocal carries it intoinstructionson any exit from Describe, so a trail jump does exactly what Continue does. The view's ownseedFromBriefis gone in favour of the reducer.interactive. Launch's create still bounces to Meet when the name is missing.<os-step interactive>lifts its title (and an outlined chip) to full contrast on hover, through a new--os-ui-step-title-hover-colortoken falling back to the foreground colour. Filled chips have no border to recolour and keep their fill. The cursor stays the shell's arrow: the no-pointer policy indesktop.cssis deliberate and left alone.Testing instructions
Tests: the wizard locals and Describe render in
apps/my-wordpress/parts/agents.test.ts, and the draft-action test intests/phpunit/tests/myWordPressAppAgents.php.