Commit d4936b6
chore: state the DevicePixelRatio contract as a local guarantee
The fixture's class summary and the carried-over sdk7-test-scenes plan both
described DevicePixelRatio as the divisor scenes apply to resolve vh/vw and
virtual-scale sizing. js-sdk-toolchain #1489 (on main 2026-08-12) took the
ratio out of layout entirely: calcOnViewport now resolves vw/vh from width and
height alone and leaves ScaleContext.ratio unread, and scaleFontSize resolves
through that same call. The summary therefore asserted a consumer contract the
consumer no longer honours - the failure mode CLAUDE.md names when it bans
comments that narrate external behaviour, since that behaviour moved without
this file changing. The summary now states only what the system under test
guarantees: it reports the scene panel's own physical-pixels-per-UI-point
density and republishes when that density or the viewport moves.
The same stale premise would have made the skipped scene unfalsifiable: watching
a vw/vh box resize proves nothing about the ratio on a current SDK. FIXNOTES now
has the verification read the printed value, names Label (react-ecs exports no
UiText), and points at src/index.ts, which mirrors only width and height into
the scene's canvasInfo today.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018c638dR1vPysCMbYt2qQg5
Also includes (squashed): fix: publish the ratio the device-pixel-ratio dirty check compared
WriteToCRDT() re-read the live panel through GetDevicePixelRatio() even though
UpdateUICanvasInformationComponent() had computed and cached that same value one
statement earlier, so the gate and the payload were two independent reads of a
mutable panel property - the ratio that passed the dirty check was not necessarily
the ratio scenes received. Initialize() now seeds lastDevicePixelRatio before its
unconditional publish, which lets both write paths emit the cached field and makes
the published ratio the one the gate is keyed on. It also removes a second panel
read per republish.
The fixture now covers the dirty check this change touches: no republish when
neither the viewport nor the panel ratio moves, and a republish carrying the new
ratio when the panel scale does, driven through the injectable UIDocument /
PanelSettings seam. That republish case is also what bounds the unattached-panel
window at startup - a panel that attaches after Initialize() is picked up by the
next tick. The class comment lost its incident narration and its citation of a
local investigation directory that exists in no repo, and the single captured
message became a published-message list, which drops the null-forgiving read.
The SDK-facing half - an sdk7-test-scenes scene plus two-monitor verification
steps for the changed DevicePixelRatio semantics - belongs in that separate public
repo; FIXNOTES.md carries the scene sketch and the manual steps.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018c638dR1vPysCMbYt2qQg51 parent 8dc895d commit d4936b6
2 files changed
Lines changed: 55 additions & 47 deletions
File tree
- Explorer/Assets/DCL/SDKComponents/SceneUI
- Systems/UICanvasInformation
- Tests
Explorer/Assets/DCL/SDKComponents/SceneUI/Systems/UICanvasInformation/UICanvasInformationSystem.cs
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
Lines changed: 53 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
32 | 24 | | |
33 | 25 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 26 | + | |
41 | 27 | | |
42 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
47 | | - | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
| 45 | + | |
52 | 46 | | |
53 | | - | |
54 | 47 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 48 | + | |
| 49 | + | |
59 | 50 | | |
60 | 51 | | |
61 | 52 | | |
| |||
67 | 58 | | |
68 | 59 | | |
69 | 60 | | |
70 | | - | |
| 61 | + | |
71 | 62 | | |
72 | 63 | | |
73 | | - | |
74 | | - | |
| 64 | + | |
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
| |||
80 | 70 | | |
81 | 71 | | |
82 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
83 | 76 | | |
84 | 77 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 78 | + | |
| 79 | + | |
89 | 80 | | |
90 | 81 | | |
| 82 | + | |
| 83 | + | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
| |||
102 | 95 | | |
103 | 96 | | |
104 | 97 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
109 | 103 | | |
110 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
| 120 | + | |
112 | 121 | | |
113 | | - | |
114 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
115 | 125 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 126 | + | |
| 127 | + | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
0 commit comments