Build single-page web UI in static/index.html #4
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: tilltheend/unwrap-clothes#4
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Parent Map: #1 (Garment Photo Cleaner Web App [Map])
Blocked by
Blocked by: "Implement FastAPI backend and /api/clean endpoint in app.py"
Question
How should the single-page web UI in
static/index.htmlbe structured and styled (drag-and-drop file upload, thumbnail preview, preset selector buttons for warm beige / bright white, editable prompt, processing indicator, side-by-side before/after comparison, cost display, and download button) without any frontend build tools?Resolution
Created the complete single-page web interface in
static/index.htmlwith zero build dependencies or npm requirements.Key features and design decisions
<style>, and vanilla JS in<script>hosted directly by FastAPI at/and/static/index.html.FileReader, and instant dimension calculation via Image natural dimensions.meta/muse-image, optional API key input with env fallback indication, and restore resolution checkbox.POST /api/clean, handles in-flight states with disabled submission, spinner animation, elapsed timer, and inline error banner extraction for 400/502 errors.<filename>_clean.jpg.tests/test_ui.py.