Don't make your coding agent read screenshots — assert visuals in code
victormustar · x · 2026-12-01
victor shares an HF dataset containing a practical guide for coding agents: screenshots are for humans, not for the agent. Instead of reading PNGs back to verify UI claims, translate each visual assertion into a code check — e.g. modal visibility via getComputedStyle, animation via canvas hashes 500ms apart, wall bounce via sign flips in velocity, color via getImageData, layout overlap via bounding-rect intersection. Genuinely subjective judgments (does the generative art look pretty) should be saved as screenshots and left to the user.
More from coding & agent
- Code Mode: turning MCP tools into TypeScript APIs cut agent context from 150k to 2k tokens — blaizedsouza · 2026-12-01
- Fortune 500 Firms Spend 6 Months Picking AI Tools They'll Replace Within a Year — blaizedsouza · 2026-12-01
- One detail worth stealing from negotiation bots: name the supporting alternative — hey_abusiddik · 2026-12-01
- 70 Enterprise Use Cases That Were Impossible Before AI: Reconciliation, Month-End Close, Capital Calls — alex_verem · 2026-12-01
- Experts: nobody can review all agent code — "we're making it up as we go along" — hugobowne · 2026-12-01
- sqlite-utils 4.2.2 fixes silent data-loss bug in upsert_all with mixed keys — JeremyCMorgan · 2026-12-01