The scenario
State ownership, event ordering and public props must remain compatible.
Required context: a selected repository matching this scenario, relevant task evidence, and access to its instructions and checks. Use redacted or synthetic data where appropriate.
Adapt the complete prompt
Edits stay in this browser tab. Saving bookmarks the original example; export your edited version to keep it elsewhere.
Why this is a strong example
It gives the refactor a concrete boundary and includes interaction semantics that compilation would miss.
A concrete outcome
Extract the clearly separable display section from the large component while preserving behavior and appearance.
The result can be assessed against an observable task rather than prompt length or confidence.
Boundaries and a method
Identify a small boundary from the existing code, explain it briefly and move only that responsibility. Avoid introducing a global state library or redesigning unrelated sections.
This leaves implementation judgment while constraining the changes that would exceed the task.
Evidence that can disagree
Exercise the affected interaction states and compare representative layouts. Check that callbacks and focus behavior still occur at the same points.
These checks describe what would make acceptance justified; asking for them does not mean they ran.
A safe way to encounter uncertainty
If the repository contradicts these assumptions, required access is unavailable, or a consequential product decision is missing, explain the conflict and pause the dependent work. Preserve unrelated changes.
Consequential uncertainty stays visible rather than being converted into an invented requirement.