Build a functional web page for Clearing, an app to help more quickly and easily upload…
- User
Build a functional web page for Clearing, an app to help more quickly and easily upload photos to iNaturalist by auto-splitting pictures from a user's photo roll into candidate iNat observations. It uses photo timestamps to create the groups, splitting when the gap between consecutive photos is over 30 seconds. It also puts candidate splitting click zones when the time gap is over 25 seconds, or the time gap is over 15 seconds plus a GPS distance gap over zero. There are also click zones between every photo to manually split at any point. There are text boxes to enter a taxon name and another bigger text-area box for notes, plus an upload button with a progress tracker. Only implement the UI/UX — no backend or API work.
PHOTO LAYOUT (this is the core of the interface, get it right):
- Lay each group's photos out as a vertically-stacking grid, like Google Photos: a fixed number of square thumbnails per row that wrap onto new rows downward. The page scrolls ONLY vertically — there must be NO horizontal / left-right scrolling anywhere, ever. Do not use a single horizontal strip.
- Thumbnails are perfect squares with hard corners — no border-radius, no rounded corners anywhere in the app. Landscape and portrait source photos fill their square cell via object-fit: cover, so every row holds the same number of photos and the grid stays flush and edge-aligned. The source image is not actually cropped — it is only display-cropped to the square.
- The first photo of each group is featured: it spans a 2x2 block (twice the width and twice the height of a normal thumbnail, so it stays square) while the remaining photos flow around it in the same grid.
- Pick a column count that adapts to width (more columns on wide screens, fewer when narrow), always keeping rows full and equal. On narrow screens it reflows to fewer columns — never to a horizontal scroll.
- Keep the gaps between photos small and uniform (a couple of pixels). The whole interface should read tight and dense, with minimal whitespace and padding throughout.
BETWEEN-PHOTO SPLIT ZONES:
- There is exactly one clickable split zone for each pair of photos that are consecutive in time. Its clickable hit area is noticeably WIDER than the thin visual gap between the photos, so it is easy to target even though the visible seam stays tight.
- Candidate zones (time gap over 25 s, or over 15 s plus any GPS distance) are marked as potential splits. Highlight a recommended one, labeled like "POTENTIAL SPLIT · 18 s + 3.8 m".
- Row wraps: because photos wrap onto new rows, consecutive photos are not always side by side. The boundary between the last photo of a row and the first photo of the next row must still be reachable — provide a split zone at the END of each row and at the START of each row for that wrap boundary. (No split zone before the very first photo or after the very last photo of a group — those are group edges, handled by the group dividers below.)
- Featured-tile edge cases: the featured first photo spans a 2x2 block, so in time it is adjacent only to the SECOND photo (top of the next column) — NOT to the photo that begins the second row. Place the 1|2 split zone along the UPPER part of the featured tile's trailing edge. The split zone between the first pic and the second row first pic should split between the last pic on the first row and the first pic on the second row. Those two are the ones consecutive in time.
- Hovering ANY split zone — recommended or not — surfaces that boundary's stats (time gap and GPS distance). Splitting via click divides the group into two and animates the photos moving to their new location below the current group. It updates the active state of the new and old group and scrolls the window to the new group.
ALSO INCLUDE:
- A left rail listing backlog dates with larger sans-serif dates and columns for number of photos, iNaturalist observations for the day, photos per iNat observation, and probability of unuploaded photos.
- A main heading for "2026-03-06" and a compact toolbar.
- Three chronological photo groups with realistic nature thumbnails, each showing its time range, duration, photo count, and MAX SPREAD distance.
- Editable Taxon, Common name, and Notes fields per group (Notes is a larger textarea).
- Full-width dividers between groups showing the time gap and median distance, e.g. "GAP 51 s · MEDIAN DISTANCE 0 m", each with a merge button.
- Highlight spreads over 2 m and zero-distance group dividers subtly in copper.
- Ability to click and drag photos, or selected sets of photos, between groups.
- Realistic hover, selected, focus, and disabled states throughout.
Build the actual usable demo, not a landing page. Keep the layout stable, accessible, and responsive enough for narrower screens (still no horizontal scroll — the grid reflows to fewer columns). Verify it in the browser when finished. You will need real nature photos from somewhere; you have a limit of about 10 image generations, so prefer sourcing/reusing a small set of stock nature images over generating many. Any attached reference image is only a loose guide — don't follow it exactly; make it tighter and more beautiful.
Assistant
I'll start by exploring the project structure to understand what I'm working with.
Now let me source real nature photos from stock media.
Now I'll set up the foundation: styles, fonts, and the data model.
Now the data model and grouping logic.
Now the core: the photo grid with featured tile and split zones.
Now the group card with fields, upload, and drop handling.
Now the app chrome: top bar, backlog rail, toolbar, and group dividers.
Now the main app with split/merge, drag-and-drop, FLIP animation, and upload simulation.
Now let me build to check for errors.
Build passes. Now let me fix text-casing issues where CSS
uppercasewould mangle unit symbols (s, m), plus a few polish items.Let me refine the FLIP animation to scale featured tiles smoothly and keep the position cache fresh on resize.
Let me verify the image CDN URL pattern works.
Let me hoist grid measurement to the App so newly-created groups lay out correctly on first paint (important for the split animation).
Now wire the measurement into App.
Let me make the square tiles bulletproof by using
aspect-squareinstead of computed row heights.Let me do a final review of the App render and then build.
One last improvement: collapse the backlog rail on small screens so the demo starts at the photos.
The build is clean. Here's what I built:
Clearing — iNaturalist photo triage
Architecture (
src/lib/model.ts,src/components/*,src/App.tsx)- A 33-frame simulated photo roll with real timestamps and GPS offsets in metres. Groups are computed by the auto-splitter (gap > 30 s), not hard-coded — so the 20/30/45 s toolbar toggle genuinely re-runs the algorithm.
The photo grid (the core)
- CSS Grid with an adaptive column count (3–10, targeting ~108 px thumbs) driven by one shared
ResizeObserverinApp, so newly-created groups lay out correctly on their first paint. - Every tile is
aspect-square+object-fit: cover, 3 px gaps, hard corners enforced globally by aborder-radius: 0reset. Photo 1 spans a real 2×2 block via explicit grid placement; the rest flow around it.body { overflow-x: clip }guarantees no horizontal scroll ever.
Split seams
cellsFor()computes each photo's exact (row, col), so seam placement is derived, not guessed. A seam is drawn on the leading edge of photoiwhen it's contiguous withi-1; when the pair wraps, the same boundary renders twice — at the end of the row and the start of the next — and both light up together on hover.- The featured tile therefore gets the 1|2 seam on the upper half of its trailing edge, and the row-wrap seam (last-of-row-1 → first-of-row-2) on the lower half — exactly the time-adjacent pairs.
- 22 px hit area over a 3 px visible seam. Candidates (>25 s, or >15 s + GPS) show a persistent copper bar; the top-scoring one carries
POTENTIAL SPLIT · 18 s + 3.8 m. Hovering any seam showsSPLIT HERE · 18 s · 3.8 mplus a live readout in the group header.
Interaction
- Splitting runs a real FLIP animation (translate + scale, so the new group's featured tile grows into place), flips the active group, and smooth-scrolls to it.
- Drag single photos or multi-selections (click / ⌘-click / shift-range) between groups; drops re-sort by timestamp, empty groups vanish, all animated.
- Per-group Taxon / Common name / Notes, upload button with progress bar and observation ID, plus undo, reset, select-all, and upload-all — each with genuine hover/focus-visible/selected/disabled states (group 3 ships without a taxon to show the disabled path).
- Left rail of backlog dates (photos / obs / ph-per-obs / P(unuploaded) with a probability bar), full-width
GAP 51 s · MEDIAN DISTANCE 0 mdividers with merge buttons, and copper accents on spreads over 2 m and zero-distance seams.
Files built:
index.html,src/index.css,src/lib/model.ts,src/components/PhotoGrid.tsx,src/components/GroupCard.tsx,src/components/Chrome.tsx,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.