Repository navigation
feat: turn birds into prompt-driven Flight School - #45
theycallmeswift wants to merge 11 commits into
Conversation
The page server copies every new bird.json that passes check-bird.mjs to .flights/NNN.json and serves the latest two as waypoints on the gallery's 1000x850 stage at /flight.json, with the waypoints a revision changed.
The sky renders on the gallery's 1000x850 stage with its bird size, slowdown, and stagger. Each new flight draws its path on, pops in numbered waypoints, then flies; a revision ghosts the previous path and highlights what changed. The Draw again button is gone: Pi reopens the canvas at /?draw.
The page server proxies the gallery's birds.json and bird PNGs same-origin, caching them in TMPDIR, and falls back to a bundled practice flock when no gallery URL is set or the gallery can't give a valid feed.
Pi asks how the bird should fly in the participant's own words, writes at least five in-bounds waypoints, narrates and revises them by number, pushes back on flights that won't fit, and publishes the bird once the participant is happy. The steps become draw-bird, animate, direct-flight, and join-flock.
skip_dialog lists gallery, so publish_gallery_item shares straight away, and gallery.notice_title names the notice that offers the takedown. Both need a boothstrap release newer than the one pinned here.
…back The boothstrap feed sends each bird's own unslowed duration, so /flight.json does too, and the page applies the gallery's 3x slowdown when it plays a flight. Adds tools/seed-birds-workspace.mjs, which seeds a workspace with a sample drawing and two flights for previewing a revision.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
The drawing page crops bird.png to its ink plus 6% padding before saving, and the sky crops every PNG it shows the same way, so birds published untrimmed fill their box too. The participant's bird flies 1.6x flock size with a white halo above the path, and the flock dims to 55% opacity.
The station terminal's font has no circled digits, so they rendered as empty circles. The sky keeps drawing its own numbered markers.
… it does Inserting waypoints renumbers the ones after them, so comparing by number flagged the whole unchanged tail. The sky's dashed old markers now show the previous waypoints that no current waypoint sits on.
Spells out single-letter names, documents the flock's methods and inline helpers, and folds one-use helpers into the transform matrix code.
Flights now start and end off screen, which the checker enforces, and Pi defaults to quicker flights. The perch caption matches the console step. Sharing no longer shows a notice: Pi says the bird can come down and calls withdraw_gallery_item when asked.
|
Warning 1 of 1 test run failed — see "What I ran" below before trusting any clean verdict. This pull request updates BirdsBirdBirds into a prompt-driven "Flight School" challenge where participants describe and iteratively refine bird flight trajectories with Pi using numbered waypoints. The sky page becomes a display-only 1000×850 stage that animates trajectory paths, ghosts previous flights, highlights changed segments, crops drawings to ink bounds, and proxies booth flock birds. All 340 existing unit/integration tests pass cleanly across packages ( 📋 Walkthrough (20 files)
🔍 Code reviewFrom reading the diff — not reproduced in a run.
If a participant erases strokes using the eraser tool and leaves faint anti-aliasing fringes (where Checking Suggested change🎬 What I ran
Was this review useful? React with 👍 or 👎 to help TestDriver improve. |
BirdsBirdBirds becomes Flight School. The attendee describes the flight in their own words and directs revisions by waypoint number, all through Pi. The Chrome page is a display-only sky on the gallery's 1000×850 stage: it draws each flight as a numbered path, ghosts the previous one, and flies the bird among the booth flock. Every flight flies in from off screen and out again. When they're happy, Pi publishes without asking and says it can take the bird down; it does so with
withdraw_gallery_itemif they ask.bird.jsonto.flights/NNN.json, using a debounced watch plus a check on every page poll. It serves the latest two as stage-pixel waypoints at/flight.json, with the waypoints that changed: those no previous waypoint sits on, whatever their number, so inserting a loop leaves the renumbered tail plain. The waypoints come fromcheck-bird.mjs's own parser, which now returns what it read./?draw.bird.pngto its ink plus 6% padding before saving. The sky crops every PNG it shows the same way, cached per URL, so birds published untrimmed fill their box too. The participant's bird flies at 1.6× flock size with a white halo, above the path and markers; the flock dims to 55% opacity with slight desaturation.duration_s, in the feed and in/flight.json, is the bird's own stated duration, unslowed. The page applies the 3× slowdown at playback and staggers flock birds within the slowed flight./flock.jsonproxies<gallery url>/birds.jsonand its PNGs same-origin, with a TMPDIR cache, readingBOOTHSTRAP_GALLERY_URLand thenBIRDSBIRDBIRDS_GALLERY_URL. Every transform and easing must pass the checker's grammar and is written out again. No URL, offline, an error, or a 404 gives a bundled practice flock of 7 SVG birds.node tools/seed-birds-workspace.mjs <dir>seeds a sample drawing and two flights, then prints the command that serves the page showing a revision.draw-bird,animate("Teach it to fly"),direct-flight, andjoin-flock; theanimatehint and the sky's caption both ask for the bird's name, origin, and flight. The manifest setsskip_dialog: ["gallery"], and the skill offers the takedown in chat and callswithdraw_gallery_item.Decide
/flight.jsonflights carrybird_name,origin, andtiming_functionbeyond the agreed{waypoints, duration_s, version}, and waypoints may carryeasing. Recommend: keep them, because the name chip needs the labels and faithful playback needs per-keyframe easing.withdraw_gallery_item), and don't move any event's challenge ref to this change before stations run that release, because stations reject unknownskip_dialognames, which would hide the challenge. The pinned 0.0.2 ignoresskip_dialog, sonpm run verifypasses today;boothstrap dev --verifyfrom a #690 build passes too.Ready gate
npm run verifypassed all 4 packages,npm testpassed 342 of 342, andnpm run lintfound 0 issues in 18 files./flight.jsonduration expectation from 36 to 12, and the new off-screen tests fail without the checker rule./bird.json,Draw again,"fly",Give it a flight,Watch it fly, and circled digits ①–⑳ across the repo: none remain outside checker messages. Searched fornotice,taken_down,86vw, and12sin the package: none remain.intro.md, and the skill.docs/style/. Spelled out single-letter names (n,x,ylocals and iterators), documented the flock's methods and inline helpers, folded one-use helpers into the transform matrix code, and brought the test file's header up to date.