Skip to content

feat: retire public scene viewers and Unity renderer - #3489

Open
cyaiox wants to merge 1 commit into
sunset/1-behavior-sunsetfrom
sunset/2-retire-viewers
Open

feat: retire public scene viewers and Unity renderer#3489
cyaiox wants to merge 1 commit into
sunset/1-behavior-sunsetfrom
sunset/2-retire-viewers

Conversation

@cyaiox

@cyaiox cyaiox commented Sep 1, 2026

Copy link
Copy Markdown
Member

Feature Description

Second layer of the web scene editor sunset. Retires the public 3D scene viewers and the Unity renderer that powered them. The pool gallery (/pools) and the scene/pool viewers (/view/...) are removed, along with the SDK6 EditorPage — which was the renderer's last remaining consumer — and the ~25 MB of prebuilt Unity assets. Net −8669 lines.

User Story

As a Decentraland creator, the web builder no longer offers the in-browser 3D preview or the community scene pool (those experiences move to Creator Hub); my own scenes still list, download, and open normally.

Type of Change

  • New feature

Implementation Details

Base: sunset/1-behavior-sunset. Almost entirely deletion. The Unity renderer shipped as prebuilt static files (no npm package), so the win here is deleting those assets and the code that injected them.

Architecture

SceneViewPage and EditorPage both rendered ViewPort → Preview, which injected the Unity scripts. Removing both consumers lets ViewPort, Preview, and the public/unity assets go. The shared Editor/EditorWindow types that lived in Preview were moved to modules/editor/types.ts so the surviving sagas keep compiling. decentraland-ecs and src/ecsScene/* are kept — the export/download path and the wearable ItemEditorPage still use them.

Key Files Changed

File Change
src/components/SceneViewPage/, SceneListPage/ (incl. PoolCard/), ViewPort/, Preview/ Deleted
src/components/EditorPage/ Deleted (renderer's last consumer; LOCALSTORAGE_TUTORIAL_KEY moved to TutorialModal)
public/unity/, public/editor.js, public/UnityLoader.js Deleted; scripts/postinstall.cjs no longer copies editor.js
src/routing/AppRoutes/AppRoutes.tsx Remove /pools + /view routes (mobile + desktop); redirect them to /scenes
src/components/ScenesPage/ScenesPage.* Remove the "from scene pool" section + pool loading
src/components/ProjectCard/ProjectCard.tsx Drop the dead pool-view link branch (always links to scene detail now)
src/modules/editor/{types,utils,sagas}.ts Host the moved Editor/EditorWindow types; drop injectSceneEditorScripts

API Changes

No API changes.

Database Changes

  • No database changes

How to Test

  1. Navigate to /pools, /view/<id>, /view/pool/<id> — each redirects to /scenes; confirm (Network tab) nothing requests unity/*, editor.js, or UnityLoader.js.
  2. /scenes no longer shows the "from scene pool" section; your scenes still list, download, and open.
  3. Open the wearable editor (ItemEditorPage) — it still loads and renders (guards the shared modules/editor / decentraland-ecs).

Edge Cases Considered

  • Retired viewer URLs redirect rather than error.
  • decentraland-ecs and src/ecsScene/*.raw remain intact so scene export/download keeps working.

Checklist

  • Code follows the project's style guidelines
  • Self-reviewed the code
  • Added unit tests for new functionality (deletion-only; viewer-redirect cases added to AppRoutes.spec.tsx)
  • Added integration tests where applicable
  • Existing tests pass locally (1588/1588)
  • Updated documentation
  • Tested on mobile (if UI change)
  • No new warnings or console errors introduced
  • Backwards compatible

Feature Flag

  • No feature flag needed

Related Issues

Part of the web scene editor sunset stack. Base: sunset/1-behavior-sunset.

Screenshots / Demo

Deletion of viewer surfaces; retired URLs redirect to /scenes.

Deployment Notes

Ships ~25 MB less in public/ (Unity binaries + editor.js). postinstall still copies the SDK6 ecs.js.raw the export path needs.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
builder Ready Ready Preview Sep 2, 2026 2:17pm UTC

Request Review

@coveralls

coveralls commented Sep 1, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33640788098

Coverage decreased (-0.001%) to 54.038%

Details

  • Coverage decreased (-0.001%) from the base build.
  • Patch coverage: 2 of 2 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13422
Covered Lines: 7856
Line Coverage: 58.53%
Relevant Branches: 6020
Covered Branches: 2650
Branch Coverage: 44.02%
Branches in Coverage %: Yes
Coverage Strength: 37.64 hits per line

💛 - Coveralls

@cyaiox
cyaiox marked this pull request as ready for review September 1, 2026 14:56

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review — PR #3489: feat: retire public scene viewers and Unity renderer

Branch: sunset/2-retire-viewerssunset/1-behavior-sunset
Files changed: 65 (+61 −8669)
CI: ✅ All checks passing (audit, test 1588/1588, Vercel preview deployed)
Coverage: Patch 100% (2/2 lines covered); overall -0.001% to 53.83% (expected for deletion)


Summary

Clean, well-scoped second layer of the scene editor sunset. Removes the public 3D scene viewers (SceneViewPage, SceneListPage/PoolCard), the SDK6 EditorPage (Unity renderer's last consumer), the Preview/ViewPort components, and ~25 MB of prebuilt Unity static assets. Retired URLs redirect to /scenes instead of 404ing. Shared Editor/EditorWindow types are relocated to modules/editor/types.ts so surviving sagas keep compiling. The LOCALSTORAGE_TUTORIAL_KEY constant moves to TutorialModal. All translation files (en/es/zh) are cleaned up consistently.

Findings

[P2 — Minor] Stale process.argv[3] index in scripts/postinstall.cjs

The removed code consumed process.argv[2] (editor path). The remaining ECS path still reads process.argv[3], which is now the wrong positional index. Since the script is invoked without arguments (node ./scripts/postinstall.cjs), the require.resolve(...) fallback always kicks in, so this is not a runtime bug — but it's a confusing leftover. Consider updating to process.argv[2] for clarity.

[P2 — Minor] injectScript in routing/utils.ts may now be unused

The only call site (injectSceneEditorScripts in editor/utils.ts) was removed. injectScript is still exported from routing/utils.ts but no longer imported anywhere in the codebase. Consider removing it in this PR or a follow-up to complete the cleanup.

[P2 — Minor] modules/pool/ module still wired into root reducer/sagas

The pool reducer, saga, and state are still registered in modules/common/reducer.ts, sagas.ts, and types.ts, but ScenesPage was the only external consumer of loadPoolsRequest and getPoolList. After this PR, modules/pool/ has no external consumers (only modules/poolGroup/ remains, which is separate). This is likely intentional — deferred to a future sunset layer — but worth flagging. The pool saga still runs and may fire unnecessary network requests.

[P2 — Minor] locations.poolSearch(), poolView(), sceneView() — retained only for redirects

These location helpers in routing/locations.ts are now exclusively consumed by the <Redirect> entries and tests. Fine to keep for readability, but worth noting they're redirect-only now.

[P2 — Minor] Redirect tests cover desktop only

The new AppRoutes.spec.tsx tests verify retired routes redirect on desktop (innerWidth = 1280) but don't test mobile behavior. On mobile, these paths fall through to the <Route component={MobilePage} /> catch-all, which is correct behavior — but a mobile test would document that intent.

What looks good

  • Route strategy is solid — redirects instead of 404s for retired URLs, placed correctly after all real routes in the <Switch>.
  • Type relocation is cleanEditor/EditorWindow moved to modules/editor/types.ts where they semantically belong. UnityKeyboardEvent is already defined in the same file (line 34), so no missing type reference.
  • LOCALSTORAGE_TUTORIAL_KEY relocation — correctly moved to its only remaining consumer (TutorialModal), preserving the 'builder-tutorial' value.
  • decentraland-ecs and src/ecsScene/* intentionally retained — export/download and ItemEditorPage still need them.
  • Translation cleanup is consistent across all 3 language files (en, es, zh) — both from_scene_pool and editor_preview sections removed.
  • No breaking API changes — purely internal component/route removal with backward-compatible redirects.
  • No security issues found — no secrets, no XSS vectors, no open redirects. Removing the Unity script injection actually reduces attack surface.

Verdict

APPROVE — No P0 or P1 issues. The P2 items (process.argv[3] index, orphaned injectScript, pool module cleanup) are low-impact cleanup opportunities that can land in this PR or a follow-up. The deletion is thorough, the surviving code compiles and tests pass, and the redirect strategy is correct.


Reviewed by Jarvis 🤖 · Requested by Gabriel Díaz (<@U03MGHMAJL8>) via Slack

Comment thread scripts/postinstall.cjs
const editorPath = path.resolve(__dirname, process.argv[2] || require.resolve('decentraland-ecs/artifacts/editor'))
const targetEditorPath = path.resolve(__dirname, '../public/editor.js')

const ecsPath = path.resolve(__dirname, process.argv[3] || require.resolve('decentraland-ecs/dist/src/index.min.js'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] process.argv[3] is a stale index — the process.argv[2] consumer (editor path) was removed in this PR. Since the script is invoked without arguments (node ./scripts/postinstall.cjs), the require.resolve(...) fallback always works, so no runtime breakage. But if anyone ever passes a CLI arg, they'd have to skip index 2 for no reason.

Consider updating to process.argv[2]:

Suggested change
const ecsPath = path.resolve(__dirname, process.argv[3] || require.resolve('decentraland-ecs/dist/src/index.min.js'))
const ecsPath = path.resolve(__dirname, process.argv[2] || require.resolve('decentraland-ecs/dist/src/index.min.js'))

Delete SceneViewPage, the SceneListPage pool gallery, ViewPort, Preview,
and EditorPage, plus the Unity renderer assets (public/unity, editor.js,
UnityLoader.js) and the postinstall step that copied editor.js. Redirect
the retired /pools and /view routes to the scene list. Move the shared
Editor/EditorWindow types into modules/editor and drop the dead pool
section from the Scenes page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants