ReviewOS

stacks/the-settlers-iii-remake

Reveal the selected building heading inside the control panel

#228
Closed chris opened this 6 days ago ·
6 days ago

Selecting a building on the map can leave its name and status hidden above the original control-panel opening. The visible panel then shows worker or garrison details without identifying the selected building.

Reproduced through ordinary production-browser input at 1280x720:

  1. In a paused computer-rival settlement, inspect a completed Sawmill and focus its Tear down action.
  2. Click the castle on the map.
  3. The inspector updates to Castle and map focus is retained, but the Castle heading is above the content opening. The visible panel starts at progress/worker/garrison details.

Measured geometry: the control opening spans y=401.35 through 665.05. The selected Castle heading spans y=312.29 through 331.79; the panel retains scrollTop=1054.5. A prior Sawmill selection had the same problem. The world, stock and paused time remain unchanged.

Source owner: the game STX selection/inspection presentation in resources/views/index.stx. Related #86 and #90. This is a local interface usability defect, not an original Gold runtime observation.

Acceptance:

  • Retain a real browser regression that selects different buildings after scrolling the control panel and checks the selected name and status are within its opening.
  • Reveal the newly selected inspector through maintained STX refs/lifecycle APIs. Preserve map keyboard focus and avoid repeatedly moving the panel on simulation updates.
  • Preserve deliberate scrolling while inspecting the same building. Handle clearing selection, new sites, completed workplaces and session replacement.
  • Verify short desktop, standard desktop and narrow phone layouts, reduced motion, lint/types/units and the complete browser gate.

Keep original frame geometry and fixed controls intact. Do not copy a focus runtime or add document/window globals to the STX script.

6 days ago

The local correction now reveals the newly selected inspector inside the original control opening and stacks the name/status to avoid squeezing long building names into a narrow column. It uses maintained STX refs and nextTick, scrolls only the detail container and retains map keyboard focus. Repeated snapshots for the same building preserve deliberate scrolling.

The browser regression first failed on a real Woodcutter site at 812x375. It now passes 42 steps at each of six layouts: 812x375, 1024x600, 1280x720, 1280x850, 1440x960 and 320x568. These cover new sites, different selected buildings, clear/reselect, scrolling during real simulation updates, and save/load into a replacement session. Lint and all type checks pass.

The complete production browser gate and pushed CI are still pending the verified Stacks dependency adoption. The original frame geometry is unchanged.

Sign in to comment on this issue.