[FIX] Eliminate research modal flicker, add toast alerts & live HUD research status #33

Open
agent-gemini wants to merge 0 commits from gemini/32-fix-research-feedback into main
Collaborator

Fixes #32.

Summary of Changes

  1. Eliminated 10Hz Modal & Toolbar DOM Teardown:
    • delta.activeResearchTechId is present on every 100ms simulation tick. The previous check caused
      enderTechModal() and
      enderArchitectToolbar() to execute on every single tick, wiping out the DOM at 10Hz and causing the browser to cancel click events.
    • Replaced with state change detection (ctiveChanged and completedChanged). Incremental research progress is rendered smoothly in-place via updateResearchUI() without destroying buttons or cards.
  2. Instant Visual & Audio/Log Feedback:
    • Added instant floating game toast notifications on research selection, bench warnings, and discovery completions.
    • Added an active research status banner (#research-hud-banner) on the main game viewport with live progress fill, pioneer studying indicator, and a 1-click \🔨 Place Bench\ shortcut if no bench is built.
    • Enhanced tech cards with live progress bars, percentage indicators, and pulsing active badges.
  3. Pawn Working Tool Animation:
    • Added \pawn.activity === 'researching'\ to \colony-renderer.ts\ so colonists visibly animate with work tools while studying at the research bench.
  4. Automated Testing:
    • Added unit test in \sim-core/tests/parity-systems.test.ts\ verifying direct right-click prioritization at \simple_research_bench\ immediately assigns research and generates progress.
Fixes #32. ### Summary of Changes 1. **Eliminated 10Hz Modal & Toolbar DOM Teardown**: - delta.activeResearchTechId is present on every 100ms simulation tick. The previous check caused enderTechModal() and enderArchitectToolbar() to execute on every single tick, wiping out the DOM at 10Hz and causing the browser to cancel click events. - Replaced with state change detection (ctiveChanged and completedChanged). Incremental research progress is rendered smoothly in-place via updateResearchUI() without destroying buttons or cards. 2. **Instant Visual & Audio/Log Feedback**: - Added instant floating game toast notifications on research selection, bench warnings, and discovery completions. - Added an active research status banner (#research-hud-banner) on the main game viewport with live progress fill, pioneer studying indicator, and a 1-click \🔨 Place Bench\ shortcut if no bench is built. - Enhanced tech cards with live progress bars, percentage indicators, and pulsing active badges. 3. **Pawn Working Tool Animation**: - Added \pawn.activity === 'researching'\ to \colony-renderer.ts\ so colonists visibly animate with work tools while studying at the research bench. 4. **Automated Testing**: - Added unit test in \sim-core/tests/parity-systems.test.ts\ verifying direct right-click prioritization at \simple_research_bench\ immediately assigns research and generates progress.
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin gemini/32-fix-research-feedback:gemini/32-fix-research-feedback
git switch gemini/32-fix-research-feedback

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff gemini/32-fix-research-feedback
git switch gemini/32-fix-research-feedback
git rebase main
git switch main
git merge --ff-only gemini/32-fix-research-feedback
git switch gemini/32-fix-research-feedback
git rebase main
git switch main
git merge --no-ff gemini/32-fix-research-feedback
git switch main
git merge --squash gemini/32-fix-research-feedback
git switch main
git merge --ff-only gemini/32-fix-research-feedback
git switch main
git merge gemini/32-fix-research-feedback
git push origin main
Sign in to join this conversation.
No description provided.