Repository navigation
Fix the two checks the shader plate failed - #387
Merged
drehtuer merged 1 commit intoOct 5, 2026
Merged
Conversation
SonarCloud's quality gate failed on reliability (kotlin:S899): ShaderTimingStore ignored what File.delete returned when it gave up a partial write. It now discards the file the way MaterialCache does, deleting it on exit when it cannot be deleted now. The Documentation job failed to parse the shader plate's sequence diagram: mermaid ends a statement at a semicolon, even inside a Note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
drehtuer
merged commit Oct 5, 2026
5cae2a2
into
feature/designer-material-and-roundness
9 checks passed
drehtuer
added a commit
that referenced
this pull request
Oct 5, 2026
Answers the owner's face-designer feedback from the Pixel 10a: three bugs fixed, a body colour, an edge-rounding slider, and the designer split into three steps. **Based on #387** (`fix/shader-plate-checks`), stacked as `.claude/CLAUDE.md` asks. ## Bugs, each with a regression test - **"Rolling from the face designer adds numbers to the die."** - *Cause:* every face was printed, and the artwork was laid over the print by its alpha (decision 59), so any clear part of a drawing showed the set's number through it. - *Fix:* a face is now **drawn or printed, never both**. The decoded atlas says once which cells hold anything (`AtlasImage.drawnCells`, `AtlasCoverage`). The renderer leaves those cells out of the printed numbers (`Stage.drawnCells`, `DieNumbers.fieldOf(drawn)`, `PrintedDice` keyed by die and drawn faces). Undrawn faces keep their numbers. - This also changes third-party sets whose artwork leaves gaps around a printed number; they now show the artwork alone. **Decision 96**, and `docs/dice-sets.md` is updated. - **"The rendered spinning die only shows blank faces."** - *Cause:* the Solid view deliberately left every pen stroke out. - *Fix:* strokes are now drawn as the shapes their ink covers (`StrokeOutline`), projected onto the turning die, and the eraser paints the body colour. - **"Loading an image has no effect."** There is no image-loading option in the designer. - *What it was:* the guide toggle, drawn with the prototype's framed-landscape glyph. In the dark theme the guide was pale grey on white paper, so it looked like it did nothing. - *Fix:* the guide is drawn in whichever of black or white reads on the paper (`PaperInk`), and the switch now says **Guide**, as in the prototype. - Putting a photo on a face would be a new feature. - **"Edges 1–4 only make sense for the d4."** - *Not the solver:* every shape but the d4 gets the full radius. - *Cause 1:* the designer always drew its turning die sharp, so the steps changed nothing on screen. - *Cause 2:* how much rounding *shows* depends on the shape. Over 1.5–12 % a d4's corners move 2 mm, a d20's 0.5 mm. The table is in `docs/face-designer.md`. ## New - **Body colour (decision 97):** - A die-level colour from the pen's twelve or the shared `ColourPicker`. - Numbers switch automatically to black or white so they read on it. - Written as the existing per-die `color` / `number_color` keys, so the format and the validator are unchanged. - The canvas, strip and turning die are all drawn on it. - **Edges slider (decision 98, amending 94):** - Covers 1.5–12 % in 0.5 % steps, and says the share and the millimetres, which TalkBack reads too. - The turning die is drawn rounded (`RoundedSolid`). - **The range is still the set file's**: the phone runs that would measure it were not made. See the open box in `docs/TODO.md` 4.6. - **Three steps (decision 99): Shape → Material → Faces.** - One screen and one presenter, with a step bar under the title that goes to any step. - The footer has Back and Next on the first two steps, and Back, Save to set and Roll it on the last. - The draft is written whenever a step is left. - A route that names a die (quick mode, the way back from a test throw) opens on Faces. - The phone's Back leaves the designer from any step, as before. - **Docs and design:** - The prototype `design/dInfinityPhone.dc.html` shows the steps, the colour row and the slider. - Updated: `design/README.md`, the README feature line, `docs/face-designer.md`, `docs/architecture.md` decisions 96–99, `docs/physics-and-rendering.md` ("How round a die may be"), `docs/STATUS.md` and `docs/TODO.md`. ## Tests and coverage - New test files: `StrokeOutlineTest`, `RoundedSolidTest`, `PaperInkTest`, `DesignerGuideTest` and `DesignerStepsTest`. - Extended: tests in designer, feature/designer, render/filament, core/model and app. - New device test: `AtlasTextureTest.theStageSaysWhichFacesTheUploadedAtlasDrawsOn`. It compiles but has not been run yet. | Module | Function | Branch | |---|---|---| | designer | 97.4 → 98.0 % | 88.0 → 88.7 % | | feature/designer | 98.1 → 98.7 % | 65.7 → 66.1 % | | render/filament | 76.6 → 76.6 % | 73.3 → 73.6 % | | core/model | unchanged | unchanged | Locally in the devcontainer: - `./gradlew build test coverageReport lint detekt ktlintCheck` is green. - The Documentation job's mermaid and markdownlint checks pass: 21 diagrams parse, 0 lint errors. ## Not done: needs the phone - **The edge-rounding range.** The harness and `FairnessTest` runs at 1.5 %, 3 % and 12 % on d4, d6 and d20 were not made; the commands are in `docs/TODO.md` 4.6. The permission settings blocked the agent's attempt. - **For the owner to judge:** - Walk the three steps. - Roll a die drawn on some faces only. - Try a dark body colour. - Watch the pen's lines on the Solid tab. - Toggle **Guide** in the dark theme. - Drag the slider on a d6 and on a d20. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



#384 was merged into
feature/designer-material-and-roundnesswith two checks red. This PR fixes both.kotlin:S899atShaderTimings.kt:113and:115:ShaderTimingStore.saveignored whatFile.delete()returned when it gave up a partial write. It now uses adiscardhelper, the same oneMaterialCachehas, which falls back todeleteOnExit. The existingShaderTimingsTestcases (a directory in the way, partial-file cleanup) already exercise both paths.docs/architecture.md. Mermaid ends a statement at a;even inside aNote, soplate up; bar follows …becameplate up, bar follows ….Checks, run locally in the devcontainer:
:render:filamenttest, detekt, ktlint and lint are green.mermaid-cliimage) parses all 21 diagrams.🤖 Generated with Claude Code