Skip to content

fix: correct SDK version field in current-scene debug panel#9385

Open
decentraland-bot wants to merge 8 commits into
devfrom
fix/debug_panel_sdk_version
Open

fix: correct SDK version field in current-scene debug panel#9385
decentraland-bot wants to merge 8 commits into
devfrom
fix/debug_panel_sdk_version

Conversation

@decentraland-bot

@decentraland-bot decentraland-bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

All scene info fields stuck empty — when DebugViewCurrentSceneSystem (PR #8663) was added, it also called SetVisibilityBinding() on the shared CURRENT_SCENE widget. Since DebugWidgetBuilder only keeps the last binding, UpdateCurrentSceneSystem's binding never got Connect()-ed, so IsConnectedAndExpanded was always false and RefreshSceneDebugInfo() never ran. Removed the redundant visibility binding; DebugViewCurrentSceneSystem now owns it.

Test plan

  • Load an SDK7 scene, open the debug menu (backtick), confirm "SDK Version:" shows true
  • Load an SDK6 scene, confirm it shows false
  • Confirm Name, Parcels, Height, Global Pos, Scene Pos all populate correctly
  • Confirm the field shows <No data> when not standing on any scene
  • Confirm the performance charts from DebugViewCurrentSceneSystem still work

The "SDK 6:" marker reflected whether the player was standing on any
scene (True/False), not the scene's actual runtime version. It now
reports "6" or "7" via ISceneData.IsSdk7(), which already parses
scene.json's runtimeVersion.
@decentraland-bot
decentraland-bot requested review from a team as code owners July 15, 2026 12:00
@decentraland-bot decentraland-bot added the ext-contribution Identifies a contribution which was not initiated by a Unity Developer label Jul 15, 2026
@github-actions
github-actions Bot requested a review from anicalbano July 15, 2026 12:00
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

badge

Build failed! Check the logs to see what went wrong.
If the error repeats please consider the clean-build tag.

@github-actions

Copy link
Copy Markdown
Contributor

Slack notification sent to #explorer-ext-contributions for external review.
To re-send, delete this comment and re-add the ext-contribution label.

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review — #9385: fix: correct SDK version field in current-scene debug panel

STEP 2 — Root-cause check ✅

The debug panel's "SDK 6:" row was wired to show bool.FalseString / bool.TrueString based on whether any scene was active — it never reported the actual SDK version. This PR fixes the root cause by querying ISceneData.IsSdk7() (the canonical API, used throughout the codebase) and displaying the real version. PASS.

STEP 3 — Design & integration ✅

No new units, state, or lifecycle management introduced. The change lives entirely within UpdateCurrentSceneSystem, which already owns all current-scene debug panel bindings. The ElementBinding<string> is a 1:1 rename from sdk6BindingsdkVersionBinding, following the identical pattern of its sibling bindings (sceneNameBinding, sceneParcelsBinding, etc.). PASS.

STEP 4 — Member audit ✅

sdkVersionBinding is a private readonly field. Consumers:

  1. Constructor — initialization and widget registration
  2. RefreshSceneDebugInfo() — value update

No new public members introduced. No single-use accessors, no absent-≠-false predicates. No issues.

STEP 5 — Line-level review ✅

A. Blocking-issue scan: None found.

  • Null safety: currentActiveScene is null-checked before .SceneData.IsSdk7() access. ✅
  • Allocations: String literals "7" and "6" are interned; NO_DATA_STRING is an existing const. No allocations in the update path. ✅
  • Naming: sdkVersionBinding follows camelCase for private fields per CLAUDE.md. ✅
  • Subscriptions/teardown: No new subscriptions, events, or disposables added. ✅
  • Nullability: No nullability contract changes. ✅

B. Design/encapsulation smells: None found.

  • No magic values — NO_DATA_STRING is a named constant; "7" and "6" are the literal SDK version identifiers being displayed.
  • No naming issues — the rename from sdk6Binding to sdkVersionBinding correctly generalizes the field name.

STEP 6 — Complexity: SIMPLE

Single file, 4 additions / 4 deletions. Renames a field and fixes a value computation in debug-only UI. No ECS structural changes, no async, no new dependencies.

STEP 7 — QA: YES

Modifies runtime code that affects what the user sees in the debug panel. Test plan in the PR description is appropriate.

STEP 8 — Warnings

None. Main scene not modified.

Security review ✅

No secrets, injection vectors, auth changes, or sensitive data exposure. The field displays non-sensitive, publicly-known scene metadata (SDK version 6 or 7) in a debug-only panel.

Sub-agent reviews

Agent Verdict
Security Sentinel Clean — no findings
Architecture Strategist Clean — correctly scoped
Pattern Recognition Clean — canonical API, proper naming
Code Simplicity Clean — appropriately minimal

REVIEW_RESULT: PASS ✅
COMPLEXITY: SIMPLE
COMPLEXITY_REASON: Renames a debug-panel binding and fixes its display value in a single existing system — no ECS, async, or architectural changes
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by Mikhail Agapov (<@U04A7TYN13L>) via Slack

Both UpdateCurrentSceneSystem and DebugViewCurrentSceneSystem share the
same CURRENT_SCENE widget via GetOrAddWidget, but both called
SetVisibilityBinding with their own instance. Only the last binding set
gets Connect()-ed at build time, leaving UpdateCurrentSceneSystem's
binding permanently disconnected (IsConnectedAndExpanded = false).
This prevented RefreshSceneDebugInfo from ever running.

Remove the redundant visibility binding from UpdateCurrentSceneSystem
and let DebugViewCurrentSceneSystem (PR #8663) own it.
SDK6 scenes always resolve to SHOWING_LOD in VisualSceneStateResolver
and never get a SceneFacade, so currentActiveScene can only be SDK7.
Remove the unreachable IsSdk7() branch.
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Warnings count reduced: 19087 => 14692

Warnings/errors in files changed by this PR (1)
File Line Rule Message
Assets/DCL/Infrastructure/SceneLifeCycle/Systems/UpdateCurrentSceneSystem.cs 157 ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract Expression is always true according to nullable reference types' annotations

@DafGreco DafGreco left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ PR reviewed and approved by QA on both platforms following instructions playing both happy and un-happy path

Regressions for this ticket had been performed in order to verify that the normal flow is working as expected:

  • [ ✔️] Log In/Log Out
  • [ ✔️] Backpack and wearables in world
  • [ ✔️] Emotes in world and in backpack
  • [✔️ ] Teleport with map/coordinates/Jump In
  • [ ✔️] Chat and multiplayer
  • [✔️ ] Profile card

Evidence:
Working properly on both platforms. SDK6 scenes won't have any data logged but SDK7 scenes will have information

Image Image

@dalkia dalkia self-assigned this Jul 16, 2026

@pravusjif pravusjif left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dalkia
dalkia enabled auto-merge (squash) July 17, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-contribution Identifies a contribution which was not initiated by a Unity Developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants