Slot budget (#47) #98
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
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
crowmaki/ai-studio!98
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-47-slot-budget"
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?
Closes #47.
The app fills H3's 9 image and 3 audio slots for every Shot and shows what it dropped (User Stories 64, 88, 89 and 108–116, decisions in #10). The prompt composer (#48) and the job builder (#51) read the filled assignment from
shot_slots.What changed
Schema v19.
shot_slot_item(shot_id, medium, position, candidate_key, placed, arrived)holds an edited Slot list. No rows for a medium means the Shot follows the Project order live.shotgainsboard_per_panelandboard_clean.setup_subjectgainsatlas_group, andsetupgainsatlas_size(nativeor a pixel budget; NULL follows the Project).packed_propis a content-keyed cache likeatlas(ADR-0005).Candidates (
slots.rs). Only locked references count. Images come in the Project category order:Audio is the Voice references of the speakers, by first Line. Silent subjects' voices are listed below the line, so they can be dragged up.
Filling. Items above the line are sent while they fit. Once one doesn't fit, it and everything after it is over budget. A one-slot-per-Panel Board falls back to one tiled slot before anything is dropped. Slot numbers count the sent items in list order, and a per-Panel Board takes consecutive ones.
Edited lists.
set_shot_slot_listsaves a medium's full order with placements, and refuses a list that doesn't name every candidate once.mark_shot_slots_seenclears the badges without changing what is sent. Seen arrivals are stored asarrivedand keep their lower priority until the next edit.reset_shot_slot_listreturns both media to the Project order.Atlases per Setup (
atlas_groups.rs).set_setup_atlas_groupsregroups the Looks within Parity, andset_setup_atlas_sizeoverrides the Atlas size.Packed Prop (
packed_prop.rs). A Prop's snapshot Tiles go side by side in uniform cells sized to the largest Tile, fitted on mid-grey, at most 1 MP, never upscaled. Same snapshot, same bytes.Category order.
set_reference_category_orderis undoable, and the order is onProjectDto.UI.
+N overchip (ADR-0006) on the Shot in the Setups list, on the Board header and on the Board timeline.DragList.svelte), because the webview gives HTML5 drag and drop to file drops.Decisions worth a look
over_budget: u32) so the chip can say+N over, per ADR-0006.arrivedflag. The spec'sis_newis computed, not stored: a candidate with no row is new.arrivedkeeps a seen arrival from overtaking the user's placements, which the first cut got wrong (caught in review).Not in this PR
Known trade-offs
scene_setupsresolve the slots of every Shot to fill the chip. That is fine at slice scale; a cache can come later if it shows up.Testing
crates/studio-core/tests/slot_budget.rshas 20 tests. They cover:src/lib/scenes/slots.test.tsandsetups.test.tscover drag, line and regroup logic.cargo test --workspace --all-features,bun test srcandbun run checkall pass. Clippy is clean apart from an existingtype_complexitywarning inapi.rs.