Skip to content

Render each module area on its own and scope the player to its area - #21

Merged
valuecodes merged 1 commit into
mainfrom
feat/area-rendering
Oct 11, 2026
Merged

valuecodes merged 1 commit into
mainfrom
feat/area-rendering

Conversation

@valuecodes

Copy link
Copy Markdown
Owner

What

  • Part 7/7 of Code Backrooms: Phase 4 — Multi-File Repositories: the renderer draws each area on its own instead of one merged world, so an area that joins mounts alone and nothing already on screen is rebuilt.
  • The player collides with, stands in and steps through only the area it is in (areaAt), and the overview map draws that area; only the navigator still merges the areas, to land portals across them. A portal into an area not generated yet stays dark until it is (pendingPortals).
  • Fixes from the PR Generate each module's area when the player first heads for it #20 review: generateCodeWorld throws for a module that could not be generated instead of silently leaving it out, and AreaWorld.failed lets checkAreas accept portals into failed areas.
  • Completes Phase 4 (apps/web/AGENTS.md Milestone 19).

How to test

pnpm typecheck
pnpm lint
pnpm knip
pnpm test
pnpm build
pnpm --filter web dev    # then open http://localhost:3000/?code=repo

Walked headlessly: entrance → src/index.ts → src/server.ts. The server.ts portal stays dark until its area is generated on approach, then lights green; collisions hold in each area; 5 linked WebGL programs throughout, none added on growth.

Security review

No security-impacting changes.

🤖 Generated with Claude Code

World mounts one memoised Area per BuiltArea, Player collides with and steps through only the area it stands in (areaAt), and the overview map draws that area. Portals into areas not generated yet are named by pendingPortals.

Also from the PR #20 review: generateCodeWorld throws for a module that could not be generated instead of omitting it, and AreaWorld.failed lets checkAreas accept portals into failed areas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 11, 2026 05:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T05:16:30.523376Z e076177 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

🔵 Needs a closer look

A moderate performance issue remains in repeated pending-portal area-set construction.

0 open findings

What changed in this PR

Updates Code Backrooms to render and interact with lazily generated module areas independently while retaining merged navigation.

Changes:

  • Adds area lookup and pending/failed portal handling.
  • Scopes rendering, collisions, fixtures, and maps to the active area.
  • Adds generation-failure handling, tests, and documentation.
File Summary
packages/​world-generator/​src/​locate.ts Adds area lookup.
packages/​world-generator/​src/​locate.test.ts Tests area lookup.
packages/​world-generator/​src/​areas.ts Adds pending portal detection; repeated area-set construction remains a moderate performance concern.
packages/​world-generator/​src/​area-store.ts Tracks failed areas.
packages/​world-generator/​src/​area-store.test.ts Tests pending and failed portals.
packages/​world-generator/​src/​area-checks.ts Accepts portals into failed areas.
packages/​world-generator/​src/​area-checks.test.ts Tests failed-area validation.
packages/​world-generator/​README.md Documents area APIs.
packages/​types/​src/​types.ts Adds AreaWorld.failed.
packages/​renderer/​src/​world.tsx Renders areas independently.
packages/​renderer/​src/​portals.tsx Supports pending portal visuals.
packages/​renderer/​src/​player.tsx Scopes movement to the active area.
packages/​renderer/​src/​fixtures.ts Adds per-area fixtures.
packages/​renderer/​src/​area.tsx Adds memoized area rendering.
packages/​renderer/​README.md Documents area-scoped rendering.
packages/​code-graph/​src/​module-areas.ts Throws on eager generation failure.
packages/​code-graph/​src/​module-areas-failure.test.ts Tests generation failures.
packages/​code-graph/​README.md Documents failure behavior.
apps/​web/​src/​use-area-world.ts Exposes area worlds and aggregate state.
apps/​web/​src/​use-area-world.test.ts Tests area warnings and lazy generation.
apps/​web/​src/​overview-map.tsx Displays only the current area.
apps/​web/​src/​map-model.test.ts Tests area-scoped maps.
apps/​web/​src/​app.tsx Passes area worlds to the UI.
apps/​web/​AGENTS.md Marks per-area rendering complete.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@valuecodes
valuecodes merged commit 0947721 into main Oct 11, 2026
11 checks passed
@valuecodes
valuecodes deleted the feat/area-rendering branch October 11, 2026 05:20
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.

2 participants