Add TapApp Studio single-file no-code UI builder (index.html)#2
Add TapApp Studio single-file no-code UI builder (index.html)#2reodesureodesu wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23c9be726e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ] | ||
| }; | ||
|
|
||
| let state = JSON.parse(localStorage.getItem("tapapp-state") || "null") || defaultState; |
There was a problem hiding this comment.
Guard startup state parsing against invalid localStorage
The bootstrap path parses tapapp-state without a try/catch, so any malformed value in localStorage (for example from manual edits, browser extensions, or stale data from older builds) throws synchronously and prevents the app from rendering at all. This makes the whole editor unavailable until the user manually clears storage.
Useful? React with 👍 / 👎.
Motivation
prompt.localStoragefor resume/edit workflows and enable JSON export for portability.Description
index.htmlthat implements a complete TapApp Studio UI including layout, styles, and client-side logic in a single file.heading,text,button,input,card) with drag-and-drop reorder, inline editing, duplicate, move up/down, add/delete, and live style controls (bg,color,radius,padding,fontSize).callOpenAIandcallHFto fetch JSON-only layout responses,extractJson/applyGeneratedto parse and apply results, and a fallback template when parsing fails.saveState/loadStateusinglocalStorage, JSON export, a Vercel deploy guide alert, and a small bootstrapping routine to restore saved settings.Testing
Codex Task