Centralize AXIS configuration data and add config-driven blueprints + validators#2
Centralize AXIS configuration data and add config-driven blueprints + validators#2Code-Yves wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95c922a4d9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const bpSheets = global.BP_SHEETS; | ||
| if (!Array.isArray(bpSheets)) { |
There was a problem hiding this comment.
Read BP_SHEETS from the actual global binding
axisValidateBlueprintRegistry() pulls sheet data from global.BP_SHEETS, but in this app BP_SHEETS is declared as a top-level const in index.html, which does not become a window property. As a result, running this validator reports BP_SHEETS is missing or not an array even when the registry exists, so the new blueprint validator cannot validate real runtime data.
Useful? React with 👍 / 👎.
| if (txt && txt.includes('renders/')) { | ||
| report.errors.push(`Lowercase "renders/" found in inline script #${idx + 1}.`); |
There was a problem hiding this comment.
Ignore self-matches in render-path lowercase scan
axisValidateRenderAssets() checks every inline script for the literal renders/, but this validator function itself contains that literal in its own scan logic and error message. That means the check can always produce at least one error on this page, forcing report.ok false and making the diagnostic noisy even when no runtime render paths use lowercase.
Useful? React with 👍 / 👎.
Motivation
AXIS_CONFIGSdata layer to remove scattered hardcoded geometry/area values and provide a single source of truth for configs and asset routing.Description
axis/AGENTS.mdwith standing project instructions and guidelines for incremental changes.js/config-data.jswhich definesAXIS_CONFIGSwith canonical metadata forsingle,stacked,bungalow,duplex, andushape.js/config-validator.jsthat exposesaxisValidateConfigs()andaxisValidateBlueprintRegistry()and that runs non-blocking diagnostics at load time (throws only ifAXIS_CONFIGSis missing).index.htmlto consume the centralized config layer: includedjs/config-data.jsandjs/config-validator.js, made title/subtext SF adjustments, derivedCFG_META,BASE_MODULE_*,CFG_GEOMETRY, and render metadata fromAXIS_CONFIGS, and replaced hardcoded render folder/name references with configurableRenders/<stem>.*lookup.getBlueprintSheetsForConfig,getActiveBlueprintSheets, feature flagsENABLE_CONFIG_BLUEPRINT_FILTERINGandENABLE_CONFIG_DRIVEN_FLOOR_PLANS, and used the active sheet list across the Blueprints Viewer and related navigation.buildConfigDrivenFloorPlanHTML,buildCompareFloorPlanHTML,buildFloorPlanDevNoticeHTML,axisGetFloorPlanMetrics,axisBuildPlanModelFromConfig, andaxisValidateFloorPlanGeometryto generate or validate schematic floor-plan HTML fromAXIS_CONFIGS(development/preview guarded).Renders/<stem>.(jpg|png|webp)usinggetRenderAssetCandidates,_probeRenderIndex, and_renderModalFindAllImages, and addedaxisValidateRenderAssets()for static checking.COMPONENT_BLUEPRINTS) fromBP_SHEETSto avoid duplicate sources of truth.Testing
axisValidateConfigs()andaxisValidateBlueprintRegistry()which produced non-fatal warnings and errors where expected but did not block page load.axisValidateFloorPlanGeometry()andaxisValidateRenderAssets()in the console and received structured reports describing detected mismatches and candidate render paths.axis/index.htmlto confirm Blueprints Viewer, Render modal, and config picker initialize without throwing (feature flags for config-driven rendering remain off by default).Codex Task