Files
settled-reach/docs/sprints/sprint-31/client.md
T
jpmschweitzerandClaude Opus 4.6 822cf34bbc chore(meta): plan Sprint 31: Bedrock
Phase 1 wiki completion (cultural sweep, GTTR depth, star map popups)
+ infrastructure refactors (atlas.rs, main.gd, Python tooling).

8 tickets: copy (4), client (2), server (1), ci (1).
Cascade dependencies locked: Phase 1→2→3→4→5→6.
#693 cancelled (superseded by #704 compositor).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 08:17:28 +02:00

2.8 KiB

Sprint 31: Bedrock — Client Tasks

Goal: Complete Phase 1 wiki content (cultural sweep, GTTR depth, star map popups) and refactor accumulated complexity in atlas.rs, main.gd, and Python tooling.

Branch: sprint-31/client Agents: Stig (UI), Tyre (architecture), Hoshe (QA)

New Tickets

# Title Blocked by
#780 Star map click-through — wiki/GTTR popup on system select
#775 Decompose main.gd and game_state.gd god objects

Use tooling/db/ticket show <id> for full details.

Key Decisions

  • decisions/architecture.md — D-013 (diegetic UI), D-020 (client architecture)
  • decisions/scope.md — development cascade, Phase 1 deliverable

Notes

#780 Star map click-through (Phase 1 deliverable)

The star map insert module (#674, Sprint 30) renders 301 systems as a hop-ring view with click-to-select. Currently selecting a system updates _selected_system and shows the name in a basic info panel.

Deliver: When a system is selected, show a popup/panel with:

  • System name, star type, hop distance, corridor
  • GTTR narrative excerpt (first paragraph of the wiki entry)
  • Body count, population summary
  • Adjacent systems (topology links)

Data source: client/data/star_map_data.json already contains most fields. For GTTR text, either embed excerpts in the JSON (via tooling/generate-star-map-data.py) or load from a separate text file at runtime.

Key files:

  • client/ui/star_map.gd — existing star map (525 lines)
  • client/ui/star_map.tscn — scene file
  • client/data/star_map_data.json — 4363 lines, 301 systems
  • tooling/generate-star-map-data.py — data generator (may need extending)

#775 Decompose main.gd and game_state.gd (refactor)

Gemini code review flagged these as god objects:

  • client/scripts/main.gd (28KB) — UI management, input, state transitions
  • client/scripts/autoloads/game_state.gd (19KB) — global state, snapshots

Approach: Extract focused components. Suggested splits:

  • main.gd → extract UI manager, insert state controller, input dispatcher
  • game_state.gd → extract snapshot handler, character state, session state

Constraint: GDScript autoload parse-order rule (documented in CLAUDE.md). Autoloads can't reference class_name types at top level. Any new autoloads must follow the load() inline pattern. Prefer non-autoload scripts where possible.

Dependency Chain

#780 (star map popup) → standalone, Phase 1 priority
#775 (decompose god objects) → standalone, refactor track

Independent — work in parallel.

PR Workflow

tea pr create --repo jpmschweitzer/settled-reach --login schweitz \
  --title "feat(client): Sprint 31 — star map popup, main.gd decomposition" \
  --description "body" --base main --head sprint-31/client