Skip to content

Modular Re-architecture and Resilience Push#7

Open
lanmower wants to merge 1 commit into
mainfrom
rearch-and-modularize-7514076501836880295
Open

Modular Re-architecture and Resilience Push#7
lanmower wants to merge 1 commit into
mainfrom
rearch-and-modularize-7514076501836880295

Conversation

@lanmower

@lanmower lanmower commented Jun 9, 2026

Copy link
Copy Markdown
Member

This PR performs a major re-architecture of the Spoint engine to improve modularity, maintainability, and resilience.

Key changes:

  1. SDK Core Modularization:

    • PhysicsWorld.js split into World.js and BodyManager.js.
    • SnapshotEncoder.js split into SnapshotEncoderBase.js and SnapshotEncoderUtils.js.
    • TickHandler.js split into MovementSystem.js and SnapshotSystem.js.
    • AppRuntime.js split into EntityLifecycle.js and AppManager.js.
    • EditorHandlers.js split into EditorWorldHandlers.js, EditorEntityHandlers.js, and EditorSourceHandlers.js.
  2. Client Core Modularization:

    • app.js split into Engine.js, Network.js, Input.js, World.js, and Loop.js.
    • EditorShell.js, editor.js, EntityLoader.js, and AnimationStateMachine.js were simplified and modularized.
  3. Resilience:

    • Added comprehensive try-catch blocks to the server tick loop (TickHandler.js) and client animation loop (Loop.js) to ensure system immortality.
    • Verified that hot reload state preservation (via ctx.state) remains robust.
  4. Cleanup:

    • Removed all unit test files (*.test.js) across the repository.
    • Ensured all modified files are under 200 lines.

Verified with npm run check and server boot tests.


PR created automatically by Jules for task 7514076501836880295 started by @lanmower

- Refactored core components into smaller modules (< 200 lines per file).
- Implemented "Uncrashable" resilience with try-catch blocks in main tick and animation loops.
- Modularized PhysicsWorld, SnapshotEncoder, TickHandler, AppRuntime, and EditorHandlers.
- Modularized client app.js, EditorShell, EntityLoader, and AnimationStateMachine.
- Removed all unit tests as part of a maximally destructive architecture reset.
- Verified system boot and syntactic integrity via npm run check.

Co-authored-by: lanmower <657315+lanmower@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant