The page under review is: https://producingtechnology.com/65-apps/zhaothomas_184911_15200407_Json%20app.html (reached as page 129/143 inside TERMINAL_VIEWER).
On load the app fetches a remote JSON file from
https://producingtechnology.com/a1/15-json/zhaothomas_184911_14904047_wz478.json
and renders its entire UI from that data.
FocusFlow is a single-file, read-only "calm planner" that visualizes a JSON document describing one user's projects, tasks, habits, events, and notes. The visual language is a dark glassy card layout with soft purple accents. Top-of-page the app renders four summary tiles (Projects, Tasks, Habits, Events) computed from array lengths in the JSON.
Below the hero is the only interactive control: a text input pre-filled with the default JSON URL and a Load JSON button, with a small status label ("Loaded successfully." / "Failed to load JSON.") next to it.
The rest of the page is three read-only sections. User & Preferences shows the user's name, id, timezone, and three pill badges (Theme, Planning day, Notifications), plus an App Details sub-card with version, schema name, and generation timestamp. Projects & Tasks lists each project with its status, tag, and task completion ratio; each task shows priority, due date, estimated minutes, and status (done/todo); below the tasks a "Trip constraints" note is pinned. Habits, Events & Notes shows each habit with its scheduled weekdays, target duration, current streak, best streak, and a gradient progress bar; each event shows start→end times and any linked task; and a Quick Notes list surfaces any standalone notes with their timestamps.
The sample data describes a Spring-Break-trip project with two tasks, a "Daily walk" habit (3-day streak, best 12), a "Study block" event linked to "Book flights", and a pinned "Trip constraints" note.
Theme: light, but the page is rendered in dark mode
regardless. Either the pill should reflect the active theme or the JSON
value should actually switch themes.
browser.html)
surfaces the literal parser message "Unexpected token '<', <!DOCTYPE ...
is not valid JSON" inside the Projects card — an unexpected place for
a low-level error string.
YYYY年M月D日 with no locale
control. Useful for the author but inconsistent with the English
UI copy; a single locale setting would make this less jarring.
Refactor the FocusFlow single-file mock app (
zhaothomas_184911_15200407_Json app.html) with the following fixes and feature additions. Keep it a single self-contained HTML file with vanilla JS and preserve the dark glassy card aesthetic.
- Make it an actual planner, not just a viewer. Add click handlers so task status toggles between todo and done, habit streaks can be incremented with a "Log today" button, and notes can be added/edited/deleted. Persist mutations in
localStoragekeyed by user id so changes survive reloads; add an "Export JSON" button that downloads the current state in the same schema.- Respect the theme preference. Apply the JSON's
themevalue (light/dark/auto) to the root element on every load, and add a visible theme toggle that updates both the UI and the preference pill. Include a proper light-mode palette with sufficient contrast.- Harden JSON loading. Show a spinner while fetching. Validate the parsed object against a small schema (required fields for user, projects, tasks, habits, events, notes). On any failure, display a single top-level inline banner with a friendly message, the HTTP status, and a "Retry" + "Restore default URL" pair of buttons — never surface raw parser errors inside content cards.
- Reset stats on error. When a load fails, zero out the Projects/Tasks/Habits/Events tiles (or clearly mark them as stale) so the header can't disagree with the body.
- Add empty states. For each section, render a friendly placeholder ("No projects yet. Add one →") when the relevant array is empty instead of showing an empty card.
- Improve dates and time handling. Format all dates using
Intl.DateTimeFormatwith a locale selector (en-US, zh-CN, ja-JP), compute relative labels like "in 3 days" / "overdue by 1 day", and highlight overdue tasks in an accent color.- Make habit progress legible. Label the gradient bar (e.g. "3 of 7 scheduled days this week"), add a 7-day dot strip showing which days have been completed, and add
aria-valuenowfor screen readers.- Filter and sort. Above Projects & Tasks add quick filters (All / Today / This week / Overdue) and a sort toggle (Due date / Priority / Duration).
- Accessibility pass. Add a skip link, a single
<h1>, visible focus rings, proper labels on the URL input, and ensure the dark theme meets WCAG AA contrast.- Clean up stray copy. Remove the literal "Stop Claude" string currently appended to the end of the body, and audit the file for any other leftover debug text.