02 — App Behavior Summary
JSON Media Mock App
This is a single-page "JSON Media Mock App" — a tool that fetches a JSON
feed from producingtechnology.com, auto-detects records inside it, and renders
them as a media browser with search, category filtering, item detail views, and raw JSON
inspection.
On load, a hero section shows the pre-filled JSON URL, two action buttons
(Load JSON and Load Demo Data), and a
Dataset Snapshot panel. After loading demo data, the snapshot read:
Items: 3
Fields: 11
Categories: 3
Source: Demo
The interface splits into a left panel (a keyword search input + category
dropdown + scrollable card list) and a right detail panel (hero image,
title, subtitle, tag pills, key-value Record Fields table, and a Toggle Raw button that
reveals the full JSON beneath). The three demo items were: Neon Poster (Visual),
Audio Note (Audio), and Interactive Story (Interactive).
Live search worked correctly — typing "audio" filtered the list to only "Audio Note" in
real time. Clicking a card updated the right panel instantly. The Toggle Raw
button revealed a scrollable raw JSON block for the entire dataset beneath the detail view.
04 — Improvement Prompt
You are improving a single-file JSON Media Mock App. The app fetches a
user-supplied JSON URL, auto-detects records, and renders them as a
searchable media browser: a left card list and a right detail panel.
Make the following fixes and enhancements:
1. FIX BROKEN LOAD UX
When the fetch returns a 4xx/5xx error, clear the Dataset Snapshot
and Items list immediately and display a prominent styled error
banner (not just small red text) with the exact status code and URL
that failed. Do not leave stale demo data visible after a failed load.
2. IMPROVE THE NO-IMAGE FALLBACK
For records with no detectable image field, replace the large empty
placeholder with a compact category-aware icon or colored banner.
If no image exists, collapse the hero region to a minimal height
so record fields are immediately visible without scrolling.
3. LABEL THE SEARCH INPUT
Give the search box a visible placeholder ("Search items…") and a
small magnifying-glass icon so users immediately understand its
purpose. Add an aria-label for accessibility.
4. SHOW ALL RECORD FIELDS
In the Record Fields table, display every key-value pair from the
item's JSON object (excluding structural keys already shown in the
card). If the list is long, use a scrollable container rather than
silently omitting fields. Make the displayed count match the
"N fields" badge on the card.
5. SMARTER URL INPUT
Auto-populate the URL field from a query parameter (?json=URL) so
the app can be deep-linked to a specific dataset. Validate the URL
format client-side before attempting a fetch and show inline
validation feedback before the request is even made.