Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the in-game UI layout/styling to better support both modern and legacy rendering paths, adds SSR/legacy environment flags, and updates the build pipeline to use Bun while producing additional legacy/SSR artifacts.
Changes:
- Refactored multiple UI components (window, menus, touch controls, inventory, terminal, bar/messages) to use new layout/styling and pass viewport dimensions through the UI tree.
- Added
LEGACY/SSRenvironment flags and legacy fallbacks (e.g.,fetch_XHR fallback, message rendering tweaks). - Updated build/docs to use Bun, generate legacy/SSR outputs, and simplified dependency list.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/os/c_window.js | Adds SSR short-circuit path and shifts window positioning to left/top + viewport size propagation. |
| src/game/m_world_store.js | Replaces rename-tracking globals with world_rename tuple for UI selection continuity. |
| src/game/m_game.js | Improves pointer lock error handling and adds obsidian to placement restrictions. |
| src/game/c_touch.js | Reworks touch controls markup/layout and sizes controls based on viewport width. |
| src/game/c_terminal.js | Extracts static terminal UI and sizes input based on viewport width; adjusts menu classing. |
| src/game/c_settings.js | Restructures settings UI into table layout; adds disabled/version display; uses Promise_resolve. |
| src/game/c_messages.js | Adds legacy-specific message rendering/backdrop and adjusts filtering logic. |
| src/game/c_menu_start.js | Major worlds menu refactor (table layout, inline world actions, blur/backdrop behavior, SSR handling). |
| src/game/c_inventory.js | Reworks inventory UI to table layout, adds responsive sizing/centering using viewport dimensions. |
| src/game/c_game.js | Introduces Surface component for canvas init and adds backdrop + viewport prop plumbing. |
| src/game/c_bar.js | Converts hotbar to table layout and sizes/centers it based on viewport width. |
| src/game/c_app.js | Threads viewport dimensions into MenuStart/Game and adds backdrop for settings view. |
| src/etc/locale.js | Adds locale_disabled and consolidates version locale string. |
| src/etc/helpers.js | Adds fetch_ legacy fallback, scrollIntoView_settings, and restores typed-array fill polyfill. |
| src/etc/env.js | Adds LEGACY and SSR flags and reorders exported env constants. |
| src/etc/constants.js | Adds ITEM_PALETTE_ROWS. |
| src/app.js | Uses SSR env flag and refines key handler behavior for input focus. |
| src/app.css | Large CSS refactor: adds blur/backdrop/window styling, rewrites menu/touch/messages/bar styling (with nesting). |
| README.md | Updates setup/build instructions to Bun and updates tooling list. |
| package.json | Bumps version, switches build script to Bun, removes CSS tooling deps. |
| locales/uk.csv | Adds disabled and consolidates version key. |
| locales/tr.csv | Adds disabled and consolidates version key. |
| locales/ru.csv | Adds disabled and consolidates version key. |
| locales/hi.csv | Adds disabled and consolidates version key. |
| locales/en.csv | Adds disabled and consolidates version key. |
| locales/de.csv | Adds disabled and consolidates version key. |
| build.js | Moves CSS build to Bun.build, expands build matrix (legacy/SSR), tightens exec error handling, updates env generation. |
| app-prod-legacy.html | Adds a legacy production entry HTML pointing at app-en-legacy.js and shared CSS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.