Repository navigation
Render each module area on its own and scope the player to its area - #21
Merged
Merged
Conversation
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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔵 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.
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.
What
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).generateCodeWorldthrows for a module that could not be generated instead of silently leaving it out, andAreaWorld.failedletscheckAreasaccept portals into failed areas.apps/web/AGENTS.mdMilestone 19).How to test
Walked headlessly: entrance →
src/index.ts→src/server.ts. Theserver.tsportal 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