feat(site): add GitHub Pages viewer with LCARS-styled interface - #143
Open
DrCord wants to merge 5 commits into
Open
feat(site): add GitHub Pages viewer with LCARS-styled interface#143DrCord wants to merge 5 commits into
DrCord wants to merge 5 commits into
Conversation
…ble name resolution Adds a new id_mappings module that loads stfc_id_mappings.json at runtime to resolve raw game integer IDs (ships, officers, research, buildings, resources) into human-readable names in all exported JSON files. Also adds: - community_patch/game_data_maps/: ship, officer, research, building, system and resource JSON maps used at runtime - scripts/data_extraction/: Python scripts that scraped/parsed the raw data from stfc.space and spock's club to produce the mapping files - spocks_club_content_to_parse/: raw HTML/JSON source data for the scrapers This is the foundation layer for the game state export feature; the export module depends on id_mappings to enrich its JSON output. https://claude.ai/code/session_01PocsfhRMr9C8JuZNgdBkD7
Adds the core game state export pipeline (items 1, 2, 5, 6 from PR summary): **Real-time JSON export (item 1)** New game_state_export module hooks into IL2CPP to capture live game state and export it to per-category JSON files: player.json, ships.json, resources.json, research.json, officers.json, buildings.json, faction.json, buffs.json, territory.json, missions.json, queues.json, manifest.json. **GitHub Gist sync (item 2)** Exports are synced to a configured GitHub Gist via the cpr HTTP library on each export cycle. Config keys under [sync.game_state.github] control the gist_id, token, and per-file filenames. **Per-ship cargo stats (item 5)** Each ship entry in ships.json includes cargo_capacity and cargo_protection sourced from ShipTierSpec. **Peace shield capture (item 6)** Peace shield expiry and token count are captured from both the inventory path and StarbaseDetailedScan, with guards against stale/null overwrites of valid cached values. Also includes: project rename to stfc-community-mod, macOS build fixes, CI workflow updates, and test/verification scripts for end-to-end validation. Depends on: feature/id-mappings (id_mappings module must be present to build) https://claude.ai/code/session_01PocsfhRMr9C8JuZNgdBkD7
…tale-zero fix stfc_summary.json (item 4): Adds build_summary_json() which generates a compact, pre-computed JSON digest written alongside the full per-category exports as summary.json / stfc_summary.json. The summary covers: player vitals, top-5 mining/combat ships, aggregated resources (grade-filtered by ops level with ship parts per grade), faction reputation, key building levels, buildable blueprints, active queues, and research counts (with FC research separated). Designed for token-efficient AI queries that do not need the full export files. Peace shield stale-zero fix (item 6): Guards capture_peace_shield() against the my_shield_state arriving as null/zero mid-session even while a real shield is active. A new shield-down event is now only accepted if the cached expiry has already passed, preventing false resets. Config: adds filename_summary (default: stfc_summary.json) to the GitHub sync config so the summary file can be uploaded to Gist under a configurable name. Depends on: feature/core-game-state-export https://claude.ai/code/session_01PocsfhRMr9C8JuZNgdBkD7
Adds a static web viewer hosted on GitHub Pages that reads the per-file Gist exports (produced by the game state export feature) and displays them in a sortable/filterable LCARS-themed interface. community_patch/game_state_site/ (the canonical GitHub Pages viewer): - index.html: Shell page; auto-loads gist_base from localStorage or URL param - app.js: Fetches and renders all export JSON files using Tabulator.js data tables. Displays peace shield countdown, territory takeover times, drydock ship repair progress with damage percentage, and ship acronym names. - styles.css: LCARS colour scheme and responsive layout gist_site/ (legacy single-gist viewer, kept for reference): - Simple viewer that loaded a single inlined index.html from the Gist The viewer auto-detects the Gist base URL from localStorage for returning visitors and persists it across sessions. Requires feature/core-game-state-export to be configured with a GitHub Gist to populate the data files. Depends on: feature/stfc-summary (site displays stfc_summary.json data) https://claude.ai/code/session_01PocsfhRMr9C8JuZNgdBkD7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DrCord
marked this pull request as ready for review
May 17, 2026 23:24
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.
Summary
This is PR 4 of 5 splitting #122 into reviewable chunks.
Covers item 3 from the PR summary: GitHub Pages viewer — LCARS-styled interface with Tabulator.js sortable/filterable tables; includes peace shield countdown, territory takeover times, drydock ship repair progress.
Changes
community_patch/game_state_site/— canonical GitHub Pages viewerindex.html: Shell page. Readsgist_basefromlocalStorageor a?gist=URL parameter and auto-loads all export files. No server required.app.js: Fetches every per-category JSON file from the configured Gist and renders them using Tabulator.js (CDN). Features:player.jsongist_baseto localStorage for returning visitorsstyles.css: LCARS colour scheme (gold/black) with responsive layoutgist_site/— legacy single-gist viewer (kept for reference)Simpler viewer that loaded a single inlined
index.htmlfrom the Gist. Superseded by the GitHub Pages approach but kept to avoid breaking existing bookmarks.Dependency chain
Test plan
community_patch/game_state_site/index.htmllocally, paste a Gist base URL, verify all tables populateplayer.jsongist_basepersists across page refreshes via localStorage