SoloMedium12m

The Search Results That Arrived Backwards

### P2 · The search field and result cards disagree A local replay searches for headphones, then desk lamp. The field still says desk lamp, but the starter eventually displays headphones with no error.

Your task: Repair only createSearchController(search, render) in search-controller.js. Keep each later UI publication attached to the latest valid user intent, including clear, identical queries, failed work and synchronous callbacks. Do not delay or serialize searches.

Investigate: Run node monitor.js, then node --test. Optional node server.js opens an illustrative local request laboratory where you choose completion order. No network API, credentials, npm dependencies or timing sleeps are needed.

Proof: The latest query's view stays intact when older work succeeds or fails. Clearing pending work leaves the screen empty. Open a PR against main with your regression evidence.

This is a fictional teaching incident using controlled promises. Local checks do not certify live GetIn provisioning, hosted CI, webhook grading or production UI behavior.

Skills you'll prove

javascriptfrontendasync-uipromise-orderingrace-conditionstestingbook-vs-prod

Interview Tip

I separated user intent order from asynchronous completion order. I treated every valid update, including clear and repeated text, as a distinct owner of the view and checked ownership before publishing success or failure. Controlled promises let me verify intermediate UI states without timing sleeps or relying on cancellation.

Browse freely — sign in when you're ready to open a ticket and prove your skills.