feat(log): filter colony event log to prominent milestones and add category badges (#46) #47

Closed
agent-gemini wants to merge 0 commits from gemini/46-filter-colony-log into main
Collaborator

Fixes #46

Overview

Addresses user feedback on colony log noise by filtering out high-frequency mundane micro-actions (excavation, harvesting, crafting, construction, drafting toggles, combat misses, and order prioritizations) so that the persistent Colony Log highlights only genuine, prominent colony milestones and critical threats.


Key Improvements

  1. High-Signal Event Stream in sim-core:

    • Removed routine micro-action spam (excavated rock, harvested crop, crafted meal, completed wall, fired and missed, and internal job prioritizations) from this.tickEvents.
    • Preserved and elevated critical events: [RAID ALERT], [CASUALTY], [DOWNED], [RECOVERY], [RESEARCH COMPLETED], [RESEARCH], [TRADE], [CARAVAN], [CARAVAN RETURNED], [OVERWORLD ENCOUNTER], [SURGERY COMPLETED], [SURGERY FAILED], [GENETIC AWAKENING], [GENETICS FAILED], [SPOILAGE], [MIGRATION], and scheduled incidents (events.json).
  2. Categorized & Severity-Coded 16-Bit SNES Log UI:

    • Added retro pill badges: RAID, CASUALTY, DOWNED, TECH, RESEARCH, WORLD, CARAVAN, SURGERY, GENETICS, EVENT, SYSTEM.
    • Distinctive border color and tint for peripheral awareness:
      • Crimson/Red for raids and casualties (--bad)
      • Amber/Orange for downed colonists and fleeing raiders (--warn)
      • Cyan for technology unlocks and active research (--info)
      • Emerald for successful surgeries and recoveries (--good)
      • Gold for caravans, trade deliveries, and migrations (--gold)
      • Purple for genetic awakenings and scheduled world phenomena (--magic)
    • Colony time formatting (D1 14h or T.1234) cleanly separated from event text.
  3. Interactive Filter Mode Toggle:

    • Added [ Important ] (active default) and [ All ] filter buttons in the Colony Log header row.
    • When set to Important, routine actions are cleanly suppressed, leaving only notable colony events visible.
    • When set to All, players can view the complete action history if desired.
  4. 100% Determinism & Automated Test Suite:

    • Added unit test in sim-core/tests/m1-systems.test.ts verifying that routine actions do not pollute delta.events while significant milestones are accurately delivered.
    • All 47 tests passing (42 sim-core + 5 server).
    • Strict TypeScript verification passing across all workspaces.
Fixes #46 ### Overview Addresses user feedback on colony log noise by filtering out high-frequency mundane micro-actions (excavation, harvesting, crafting, construction, drafting toggles, combat misses, and order prioritizations) so that the persistent Colony Log highlights only genuine, prominent colony milestones and critical threats. --- ### Key Improvements 1. **High-Signal Event Stream in `sim-core`**: - Removed routine micro-action spam (`excavated rock`, `harvested crop`, `crafted meal`, `completed wall`, `fired and missed`, and internal job prioritizations) from `this.tickEvents`. - Preserved and elevated critical events: `[RAID ALERT]`, `[CASUALTY]`, `[DOWNED]`, `[RECOVERY]`, `[RESEARCH COMPLETED]`, `[RESEARCH]`, `[TRADE]`, `[CARAVAN]`, `[CARAVAN RETURNED]`, `[OVERWORLD ENCOUNTER]`, `[SURGERY COMPLETED]`, `[SURGERY FAILED]`, `[GENETIC AWAKENING]`, `[GENETICS FAILED]`, `[SPOILAGE]`, `[MIGRATION]`, and scheduled incidents (`events.json`). 2. **Categorized & Severity-Coded 16-Bit SNES Log UI**: - Added retro pill badges: `RAID`, `CASUALTY`, `DOWNED`, `TECH`, `RESEARCH`, `WORLD`, `CARAVAN`, `SURGERY`, `GENETICS`, `EVENT`, `SYSTEM`. - Distinctive border color and tint for peripheral awareness: - Crimson/Red for raids and casualties (`--bad`) - Amber/Orange for downed colonists and fleeing raiders (`--warn`) - Cyan for technology unlocks and active research (`--info`) - Emerald for successful surgeries and recoveries (`--good`) - Gold for caravans, trade deliveries, and migrations (`--gold`) - Purple for genetic awakenings and scheduled world phenomena (`--magic`) - Colony time formatting (`D1 14h` or `T.1234`) cleanly separated from event text. 3. **Interactive Filter Mode Toggle**: - Added `[ Important ]` (active default) and `[ All ]` filter buttons in the Colony Log header row. - When set to `Important`, routine actions are cleanly suppressed, leaving only notable colony events visible. - When set to `All`, players can view the complete action history if desired. 4. **100% Determinism & Automated Test Suite**: - Added unit test in `sim-core/tests/m1-systems.test.ts` verifying that routine actions do not pollute `delta.events` while significant milestones are accurately delivered. - All 47 tests passing (42 sim-core + 5 server). - Strict TypeScript verification passing across all workspaces.
- Filter out high-frequency mundane micro-actions (mining excavation, crop harvesting, item crafting, wall building, drafting toggles, combat misses, and job prioritizations) from sim-core delta.events
- Retain and elevate prominent colony milestones: raids, casualties, pain shock downed, recoveries, research completions, trade deliveries, caravans, surgeries, mutagen awakenings, food spoilage, and scheduled incidents
- Add 16-bit SNES retro category badges (RAID, CASUALTY, DOWNED, TECH, RESEARCH, WORLD, CARAVAN, SURGERY, GENETICS, EVENT, SYSTEM) and severity-coded left border tints
- Introduce interactive log filter mode toggle in Colony Log panel header: 'Important' (default) vs 'All'
- Preserve 100% simulation determinism and add automated unit test in m1-systems.test.ts verifying event filtering
Author
Collaborator

Merge approved by @johnw via Antigravity chat on 2026-10-19: " Approved run it\

Merge approved by @johnw via Antigravity chat on 2026-10-19: " Approved run it\
agent-gemini closed this pull request 2026-10-19 13:14:11 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.