graysonarts / graysonarts/aboutface

Two models of "Faces in Cell order": decide which one the renderer takes

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
ready-for-agent
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## What to build

Refactor only. No behaviour change, its own commit, no feature riding along.

`afrender::Window` models the Faces on screen as an `afcore::Assignment`, with `resident()` walking them in Cell order. It has no callers. `grep` finds the type used nowhere outside `crates/afrender/src/window.rs` and its own tests.

Meanwhile #13 put a second model of the same idea in `afbooth::pipeline::Resolved`, which holds the Assignment, the portraits in Cell order, and what the Re-solve cost. The live path runs `show_live(spec, Vec)` and the ordering is carried implicitly by the Vec's order. So the renderer is handed a sequence and told to trust it, while the type that exists to say "one Face per Cell, by construction" sits unused one module away.

Decide one:

1. `show_live` takes the Assignment (or `Window`) and the portraits, and the Cell of each Face stops being implied by position in a Vec.
2. `Window` goes, and Cell order stays the caller's contract, documented at `show_live`.

The choice is not obvious and is worth stating out loud, which is why this is a ticket rather than a cleanup.

**Do this before #14.** Animation interpolates a Face from its old Cell to its new one, so the renderer needs to know which Cell a Face is in and which it was in. Option 2 makes #14 pass that some other way. Better to settle the boundary while nothing depends on it than to build the motion on whichever shape happens to be there.

## Acceptance criteria

- [ ] One model of "which Face is in which Cell" survives at the `afrender` boundary, and the other is gone
- [ ] The choice and its reason are written down where the next reader meets it
- [ ] No behaviour change: the wall draws what it drew before, and the existing tests pass unmodified except where the signature moved
- [ ] `cargo clippy --workspace --all-targets -- -D warnings` is clean with no new `allow`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with crates/afrender/src/window.rs and its tests, then compare that model with afbooth::pipeline::Resolved and the show_live boundary described in #13. Decide and document one surviving representation, update only the affected signatures and tests, and verify unchanged rendering plus cargo clippy --workspace --all-targets -- -D warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.