Repository navigation
docs: correct per-property conversion-status markers - #246
Draft
claude[bot] wants to merge 3 commits into
Draft
claude[bot] wants to merge 3 commits into
claude[bot] wants to merge 3 commits into
Conversation
The `// TODO:` / `// DONE:` conversion-status headers were wrong in both directions, so they could not be used as a to-do list. Comments only; no behaviour changes. Marked DONE but the DTO member is never read anywhere in the package (now TODO): goto-url `dest`, gltf-model-lod `retainCache`, env-presets `shadowSize`, arenaui-card `font`, arenaui-button-panel `font`. Marked TODO but implemented (now DONE): arenaui-prompt `title`, `description`, `buttons`, `width`, `theme`, `materialSides`; env-presets `ground` and `preset`. Also: line `opacity` is applied only inside the color branch, so its DONE marker now says so; pcd-model `opacity` was missing from the status block entirely and is added as TODO; and ArenaMaterial's sphericalEnvMap comment claimed a warning accompanies the assignment when the warning is emitted only on the no-reflection-property fallback path. Closes #227
`json.ColorWrite` is never read anywhere in the package. The only `_ColorWriteMask` writes (ArenaMaterialExtras.cs:105-106) are gated on `json.TransparentOccluder`, a different property, so `colorWrite` on the wire is silently ignored. This marker was deferred to a sibling PR, but no open PR corrects it: #238's only hunk in this file converts `private new void Update()` to `protected override void Update()` and leaves the status block untouched. Correcting it here so #227 does not auto-close with a known-wrong marker.
claude
Bot
force-pushed
the
docs/conversion-status-markers
branch
from
August 27, 2026 18:10
c3a0429 to
e93a70b
Compare
ArenaWireLine's status block said opacity is "only applied when color is also set", implying the write is usually skipped. ArenaLineJson.Color defaults to "#74BEC1" and ShouldSerializeColor() returns true unconditionally, so json.Color != null holds unless color is explicitly null and the branch is taken in practice. Comment text only, no behaviour change.
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.
Requested by mwfarb · Slack thread
Before: The
// ARENA <name> component unity conversion status:header block at the top of each component is the package's own inventory of which ARENA properties Unity actually implements. It was wrong in both directions. Some properties were marked// DONE:even though their DTO member is never read anywhere in the package, so the component silently ignores them on the wire. Others were marked// TODO:even though the code right below the header implements them —ArenaWireArenauiPromptclaimed nothing was done whileApplyRender()implements six of its seven properties. Because the markers were unreliable in both directions, you could not read them as a to-do list: aDONEdid not mean done, and aTODOdid not mean missing.After: Every marker in the files touched here matches what the code does. A
TODOnow means the property is genuinely unimplemented and aDONEmeans the DTO member is actually read and applied, so the header blocks can be trusted as the starting point for picking up the next property.This PR corrects the conversion-status comments only and changes no behaviour whatsoever.
How: For each marker, the whole package (
Runtime/+Editor/, excluding the autogeneratedRuntime/Schemas/) was grepped for the corresponding DTO member —json.Dest,json.RetainCache, and so on. Zero reads anywhere means theDONEwas false; a read means theTODOwas stale. A read from a different file still counts as implemented, so those were not touched. Where a fix would have required editing code, the comment was left alone and is listed under "Needs a behavioural change" below instead.git diffis comment lines only — every added and removed line begins with//.Refs #227
Refs, notCloses: the third item of #227 — stopping the drift mechanically, with a checker that derives each marker from its DTO's[JsonProperty]names and fails CI when a marker and the code disagree — is not addressed here and still needs a home (theTests~/DotNetsuite on the unmerged #183, or a smallEditor/utility). Without it these blocks will drift again.Markers changed
15 properties had a wrong marker, plus 1 undocumented property and 1 inaccurate prose comment — 17 line-items across 10 files.
Marked
DONE, never read → nowTODO(6)Runtime/Components/ArenaGotoUrl.cs:17destjson.Destappears nowhere;:39 Application.OpenURL(json.Url)ignores it, sonewTab/sameTab/popupall behave identicallyRuntime/Components/ArenaGltfModelLod.cs:20retainCachejson.RetainCacheappears nowhere;ApplyRender()reads onlyjson.DetailedUrlRuntime/Components/ArenaSceneEnvPresets.cs:43shadowSizejson.ShadowSizeappears nowhereRuntime/Components/ArenaWireArenauiCard.cs:26fontjson.Fontappears nowhere;:231-236assignsTMP_Settings.defaultFontAssetunconditionallyRuntime/Components/ArenaWireArenauiButtonPanel.cs:23fontjson.Fontappears nowhere;:129-131and:261assignTMP_Settings.defaultFontAssetRuntime/Components/ArenaMaterialExtras.cs:19colorWritejson.ColorWriteappears nowhere;_ColorWriteMaskis set at:105-106, but gated onjson.TransparentOccluderat:101— a different property. Added by a later commit on this branch, after the first version of this bodyMarked
TODO, actually implemented → nowDONE(8)Runtime/Components/ArenaWireArenauiPrompt.cs:19titlejson.Titleat:130,:131Runtime/Components/ArenaWireArenauiPrompt.cs:20descriptionjson.Descriptionat:133,:134Runtime/Components/ArenaWireArenauiPrompt.cs:21buttonsjson.Buttonsat:152,:175Runtime/Components/ArenaWireArenauiPrompt.cs:22widthjson.Widthat:137Runtime/Components/ArenaWireArenauiPrompt.cs:24themejson.Themeat:119Runtime/Components/ArenaWireArenauiPrompt.cs:25materialSidesjson.MaterialSidesat:254Runtime/Components/ArenaSceneEnvPresets.cs:29groundjson.Groundat:260Runtime/Components/ArenaSceneEnvPresets.cs:40presetc.json.PresetatRuntime/ArenaUnity.cs:749, inApplyEnvironmentPresets, which selects the defaults fromArenaSceneEnvPresetsDefaults.PresetsArenaWireArenauiPrompt.cs:23 // TODO: fontis left asTODO— it is the one entry in that header that was already correct.Qualified, added, and corrected (3)
Runtime/Components/ArenaWireLine.cs:18// DONE: opacity→// DONE: opacity (only applied when color is also set)json.Opacityis read, at:45 color.a = json.Opacity;, but only inside theif (json.Color != null)branch at:42. To be precise about what that means: the opacity write sits inside the colour branch and is skipped only when colour is explicitly null — it is not a condition that bites in normal use, becauseArenaLineJson.Colordefaults to"#74BEC1"(Runtime/Schemas/Object/ArenaLineJson.cs:31-35) andShouldSerializeColor()returnstrueunconditionally, so the branch is taken in practice. The marker staysDONEbecause the property is implemented. The parenthetical as committed reads a shade more alarming than the code warrants and is worth tightening to "skipped only whencoloris explicitly null" the next time the file is touched; making opacity unconditional would be a behavioural changeRuntime/Components/ArenaWirePcdModel.cs:18// TODO: opacityArenaPcdModelJsondeclares four properties (Url,PointSize,PointColor,Opacity) but the status block listed only three. Added in DTO order;TODOis correct sinceApplyRender()is emptyRuntime/Components/ArenaMaterial.cs:445-446:449-452is silent, and the warning at:454fires only on the fallback path where the shader exposes no reflection texture property. Now: "attempt direct texture assignment, warning only if the shader exposes no reflection texture property"On the count
Earlier scan passes disagreed with each other on how many false-
DONEproperties exist — one said 15, an enumeration listed 16 line-items over 8 sites, and further passes turned up more. Those numbers are not comparable, because they counted different things and included sites this PR deliberately leaves alone. Recounted from this branch's own diff rather than from any earlier tally (git diff --stat main— 10 files changed, 18 insertions, 16 deletions; the two extra insertions are the addedArenaWirePcdModelline and the two-line rewrap of theArenaMaterial.csprose comment), the number corrected here is 15 wrong markers (6 falseDONE+ 8 staleTODO+ 1 unconditionalDONEqualified), plus 1 property missing from its status block and 1 prose comment that misdescribed its own code — 17 line-items across 10 files. This is one more than the 16-across-9 figure this body first carried: a later commit on this branch added theArenaMaterialExtrascolorWritecorrection, which that figure predates. The larger earlier scan figures are reconciled by the exclusions in the next two sections: the tenArenaSpeParticlesrandomize*/rotationAxisSpreadentries are real falseDONEs but belong to a sibling PR, and three more scan hits were false positives.False positives deliberately NOT changed
These look like false
DONEs to a single-file grep, but the property is read from another file, so the marker is correct as it stands:Runtime/Components/ArenaSceneOptions.cs:34// DONE: physicsArenaClientScene.Instance.sceneOptions.Physics,ArenaSceneOptions.cs:47and:51Runtime/Components/ArenaArmarker.cs:20// DONE: publishRuntime/ArenaAprilTag.cs:184,:212Runtime/Components/ArenaArmarker.cs:22// DONE: dynamicRuntime/ArenaAprilTag.cs:190Also left as-is, because the existing marker is arguably the honest one and changing it would be a judgement call about intent rather than a factual correction:
Runtime/Components/ArenaWireLight.cs:23 // TODO: envMap—json.EnvMapis read at:114, but only to emitDebug.LogWarning(...)at:118. The property is parsed, not applied, soTODOdescribes the outcome correctly.Runtime/Components/ArenaWireObjModel.cs:22 // TODO: mtl—json.Mtlis read at:37,:39,:42, but only inside an#if UNITY_EDITORblock, so it does nothing in a player build.TODOis defensible; flipping it toDONEwould overstate the runtime path.Both are flagged here for your call rather than decided in this PR.
Left to sibling PRs
These files also carry wrong markers, but sibling PRs already own them and a comment change here would conflict, so they are untouched:
Runtime/Components/ArenaSpeParticles.csrandomize*/rotationAxisSpreadDONEmarkers become true once that PR implements them, so no comment fix is neededRuntime/Components/ArenaClickListener.csRuntime/Components/ArenaModelUpdate.csRuntime/Components/ArenaGltfMorph.csUpdate()fix PRAutogenerated files under
Runtime/Schemas/are untouched.Needs a behavioural change, not a comment change
No marker in scope needed code to make it true, so nothing was deferred on those grounds. The three items above (
ArenaWireLine's conditional opacity,ArenaWireLight'senvMap,ArenaWireObjModel's editor-onlymtl) are the places where the comment is now accurate but the code is the thing worth revisiting.Testing
No Editor test is needed. Every changed line is a
//comment —git diff -U0filtered to lines not starting with//is empty — so nothing compiles differently and no runtime path is affected. A review read of the table above against the cited line numbers is all this one wants.Generated by Claude Code