Stop demo annotations from burying the nodes underneath them - #60
Merged
Merged
Conversation
Business Cycle laid its "CIRCULAR FLOW" note across the dashboard row. The note box ran 140..440 x 130..280 and the gdp register sits at (300, 200), so gdp was completely underneath it. Notes and charts paint above nodes and win the hit test, so gdp could not be clicked, selected or inspected: the properties panel opened the note instead. The right-hand note did the same to rate, and the chart at (1140, 790) did it to the Investment pool. Checking the rest of the demos for the same shape turned up two more, both charts over a node: Rarity Roll in F2P and prodYield in Civ. Five buried nodes across three demos, one defect. The captions now sit above their group rather than inside it, and the three charts move clear of the rows they crossed. Nothing else about the layouts changes. There was no room to slide the notes along the dashboard row: the widest gap between registers there is 169px against a 300px note, so above the group is where they go. fitView handles the negative y that puts them there. Covered by a smoke test that sweeps every demo and requires a hit test at each node's own position to return that node. Without this change it names all five, which is also how the other two demos were found. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SH7ouoNymubArm7VEgALHg
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.
The bug
Notes and charts paint above nodes and win the hit test, so an annotation laid over a node makes it genuinely unreachable: it cannot be clicked, selected or inspected, and the properties panel opens the annotation instead.
Business Cycle laid its
CIRCULAR FLOWnote across the dashboard row. The note box ran140..440 x 130..280and thegdpregister sits at(300, 200), sogdpwas completely underneath it.It was not one node
Checking every demo for the same shape found five buried nodes across three demos:
gdprateInvestmentRarity RollprodYieldThe fix
The two Business Cycle captions now sit above their group rather than inside it, and the three charts move clear of the rows they crossed. Nothing else about the layouts changes.
There was no room to slide the notes along the dashboard row: the widest gap between registers there is 169px against a 300px note, so above the group is where they go. That puts them at negative y, which
fitViewhandles (verified: finite scale and pan).Scope
The reported finding was Business Cycle, and all three of its buried nodes are fixed here. F2P and Civ are also fixed. The regression net for this is a sweep across every demo, and a sweep that has to whitelist two known-broken demos is not much of a net; they are the identical defect and one coordinate each. Happy to split them out if that is preferred.
Files
js/app-demos.js— two note positions, three chart positionstest/smoke.js— regression sweepDemo layout data and a test. No change to
model.jsorengine.js, no serialized fields, no behaviour outside the demos.Testing
node test/run.js→ 235 passed, 0 failed (unchanged)npm run smoke→ SMOKE PASSED, no console or page errorsThat sweep is how the F2P and Civ cases were found; the original finding named only Business Cycle.
Generated by Claude Code