291 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.6 c94c5d7acb fix(client): address PR #109 review — 6 warnings + 5 suggestions
Star map (W1-W3, S3):
- _process visibility guard + dirty flag (no redraw when hidden/unchanged)
- _system_hash masked to 31-bit positive range
- Extracted _find_nearest_system() shared helper

game_state.gd (W4):
- Inline load() in apply_snapshot() replaces per-tick overhead; safe at
  runtime because script is already in resource cache

Data pipeline (W5-W6):
- Script-relative path resolution via __file__
- --check mode + make check-star-map staleness target

Minor (S1-S2, S5):
- Removed redundant bone_idx assignment
- Simplified double-negative test assertion
- Documented autoload parse-order convention in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 00:12:48 +02:00
jpmschweitzerandClaude Opus 4.6 0d5323f66c fix(client): resolve GDScript autoload parse-order errors
Autoload scripts are parsed before regular scripts, so class_name
types (CharacterVisualDescriptor, TestHarness, YamlParser) are not
available at parse time. Replace type annotations with untyped vars
and use load() for in-body class references. Fixes all 14 headless
parse errors (9 pre-existing + 5 from Sprint 30 changes).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:40:28 +02:00
jpmschweitzerandClaude Opus 4.6 d876923485 test(client): add Sprint 30 acceptance tests
27 tests covering all 5 sprint tickets: descriptor persistence (#718),
overhead anchor (#712), hair highlight swatch (#719), manifest JSON
completeness (#720), and star map scene/HUD integration (#674).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:34:48 +02:00
jpmschweitzerandClaude Opus 4.6 aed513eb71 feat(ui): star map insert module — concentric hop-ring view (#674)
New StarMapRenderer: 301 systems in concentric hop-rings from player
location, sector-colored, click-to-select with info panel, pan/zoom.
Integrated into HUD (hidden by default), insert state propagation
wired in main.gd. Data enriched from systems.db + star-map.json via
tooling/generate-star-map-data.py regeneration script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:34:36 +02:00
jpmschweitzerandClaude Opus 4.6 bc168c861a feat(client): hair highlight swatch + manifest JSON for exports (#719, #720)
#719: Add display-only hair highlight swatch (Option B) — auto-derived
from primary tint, non-interactive (MOUSE_FILTER_IGNORE).

#720: Remove DirAccess.open() fallback scanning (breaks in PCK exports).
Fully populate manifest.json (11 body types, 14 hair, 4 heads, 4
eyebrows, 8 clothing). Add tooling/generate-character-manifest script
and make manifest target for regeneration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:34:23 +02:00
jpmschweitzerandClaude Opus 4.6 4c1e0e9c85 feat(client): wire CharacterVisualDescriptor into startup IPC (#718)
encode_startup_message() now accepts optional CharacterVisualDescriptor
as third param, serialized via to_dict(). sim_bridge passes the
descriptor from GameState on new game start. apply_snapshot() restores
descriptor from server snapshot on save/load cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:34:11 +02:00
jpmschweitzerandClaude Opus 4.6 e8a053080c feat(client): add BoneAttachment3D overhead anchor above Head bone (#712)
Infrastructure for floating UI elements (status indicators, thought
bubbles, alert markers). Marker3D at Vector3(0, 0.3, 0) offset from
Head bone, exposed via get_overhead_anchor() public API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:34:00 +02:00
jpmschweitzerandClaude Opus 4.6 5addfd8382 assets(client): add character test model + raw textures
Test character model (test_raw.glb) with eye, hair, and body textures
for validation of the character compositor pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:15:09 +01:00
jpmschweitzerandClaude Opus 4.6 fc3b1fa538 assets(client): add character clothing textures, hair, eyebrows, facial hair, heads
Per-body-type texture maps (BaseColor, Normal, Roughness/ORM) for all
clothing items across all body types. Adds eyebrow variants, facial
hair (beard, moustache, mutton chops), hair styles (12 variants),
and head templates. Sprint 28 character visuals pipeline output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:14:56 +01:00
jpmschweitzerandClaude Opus 4.6 10c680bbc5 assets(client): update character clothing GLBs + add body textures
Updated clothing models (boots_work, coveralls_basic, jacket_utility,
pants_cargo, shirt_henley) for average_m and reference variants.
Added segmented body textures (BaseColor, Normal, Roughness) for all
body types: average_f, average_m, child, heavy_f, heavy_m, muscular_f,
muscular_m, teen_f, teen_m. Sprint 28 character visuals work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:14:20 +01:00
jpmschweitzerandClaude Opus 4.6 cef2a2f27f feat(assets): regenerated segments, hair, clothing with new pipeline
Body segments: face-based exclusive assignment for all 8 body types
  (average/muscular/teen m/f, child) + hips segment
Hair: solidified 20mm, normals recalculated, white masks (was black)
Clothing: peasant tunic/pants/shoes solidified 25mm for all body types
Eye: iris mask from T_Eye_Split.png green channel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:44:03 +01:00
jpmschweitzerandClaude Opus 4.6 093b24e38e feat(assets): face-based segmentation pipeline + solidify for hair/clothing
Segmentation:
- Face-based exclusive assignment (no overlap, no caps needed)
- Hips split from torso (pelvis as own segment)
- Torso_upper independent (spine_03 + clavicle, not a variant)
- Clavicle moved from arm_upper to torso_upper

Hair pipeline:
- Solidify modifier (20mm) for scalp hair volume
- Normal recalculation before solidify for consistent direction
- Eyebrows/facial hair NOT solidified
- Fixed mask generation (was outputting black, now white)

Clothing pipeline:
- Solidify modifier (25mm) for clothing thickness
- Peasant shoes added from Fantasy pack

Tooling:
- convert_outfit.py with solidify support
- inspect_glb.py, check_hair_symmetry.py for debugging
- Segment reference distribution locked
- Q-063 footsteps VFX filed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:43:04 +01:00
jpmschweitzerandClaude Opus 4.6 4d9840b68f feat(client): character creator overhaul — manifest, segments, eye color
Major changes from runtime testing and iteration:
- Asset manifest (manifest.json) controls all available content —
  replaces filesystem scanning, solves DirAccess/PCK export issue
- Dynamic tabs: only show tabs with manifest content
- Body segmentation: face-based exclusive assignment, hips split from
  torso, torso_upper independent (not a variant)
- Eye color with iris-only mask from T_Eye_Split.png green channel
- Eyebrows tinted with hair color (from body segment, not separate GLB)
- Hair/clothing loaded as skinned meshes on shared skeleton
- Segment hiding disabled for clothing (solidify handles coverage)
- Gender-aware randomizer (no facial hair on female/teen)
- Clothing slots hidden when empty in manifest
- UI: color docks docked to bottom on all tabs, padding, flow layout
- Debug tab with per-segment visibility toggles
- Screenshot automation with test config JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:42:33 +01:00
jpmschweitzerandClaude Opus 4.6 8218d5a942 fix(client): remove ALPHA output from toon shaders — fixes depth sorting
Writing ALPHA caused Godot to treat all meshes as transparent, breaking
per-pixel depth testing. Hair clipped through the head, clothing through
the body — all caused by object-level depth sorting instead of z-buffer.
Removing ALPHA makes everything opaque with correct depth behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 15:39:05 +01:00
jpmschweitzerandClaude Opus 4.6 2614c3c57a fix(client): build tab panel entirely in code — remove from .tscn
TabContainer and its VBoxContainer parent vanish during scene
instantiation when loaded as a child of MainMenu in Godot 4.6.
Moving the entire tab panel construction to _ready() resolves
the issue — the .tscn now only defines the preview side and footer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 19:11:37 +01:00
jpmschweitzerandClaude Opus 4.6 307a221527 fix(client): resolve TabContainer via find_child instead of @onready
@onready path resolution fails when the scene is instantiated as a
child of MainMenu — the node path is valid in the .tscn but the
layout hierarchy breaks during child instantiation in Godot 4.6.
Using find_child() is more robust for scenes that are dynamically
added to another scene's tree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:51:09 +01:00
jpmschweitzerandClaude Opus 4.6 a2ef1c34cb fix(client): create TabContainer children programmatically
Godot 4.6 TabContainer silently destroys children defined in .tscn
during scene instantiation ("Parent path has vanished"). Moving tab
shell creation to _ready() fixes the right-side settings panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:41:24 +01:00
jpmschweitzerandClaude Opus 4.6 18ee89d066 feat(client): add animation support to character compositor
Load UAL animation library onto the skeleton and play idle animation
after character assembly. Adds play_animation() and stop_animation()
public API. Searches all animation libraries for matching animation
name with common idle variant fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:33:36 +01:00
jpmschweitzerandClaude Opus 4.6 86acb87771 fix(client): explicit Variant type on JSON.parse_string return
GDScript strict mode rejects type inference from Variant-returning
functions. JSON.parse_string() returns Variant — use explicit type
annotation to satisfy the parser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:28:35 +01:00
jpmschweitzerandClaude Opus 4.6 acb1119b2a fix(client): add explicit type annotations for GDScript strict mode
Dictionary.get() returns Variant, which fails GDScript's strict type
inference (warnings-as-errors). Add explicit type casts on all
dictionary access in clothing and accessory tab code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:21:50 +01:00
jpmschweitzerandClaude Opus 4.6 145d8fec17 refactor(client): remove archetype selection, fix Randomise→Randomize
- Remove character_select.tscn and character_select.gd entirely
  (Smuggler/Detective archetypes removed per v0.2 pivot)
- New Game goes straight to character creation
- Rename Randomise→Randomize throughout (US English convention)
- Add *.import and *.uid to client gitignore (import artifacts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:18:47 +01:00
jpmschweitzer 5718f44b8b Merge remote-tracking branch 'origin/client' 2026-03-22 17:56:47 +01:00
jpmschweitzerandClaude Opus 4.6 ebac8c9580 fix(client): address PR #99 review round 2 — 3 doc/comment fixes
1. character_creation.gd:125 — cam_pitch_idx comment: 2=overhead(0°) → (-80°)
2. character_visual.gd:37 — segment arithmetic: 17+2+2=21 → 14+2+2=18
3. decisions/scope.md D-158 — overhead angle: 0° → -80° to match code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:54:53 +01:00
jpmschweitzerandClaude Opus 4.6 2c83809329 fix(client): correct second D-160 segment count reference (21→18)
Stig's review fix caught the first reference (line 9) but missed the
class docstring at line 27. Both now say 18 segments per D-160.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:48:50 +01:00
jpmschweitzerandClaude Opus 4.6 33d7d6996b fix(ui): address PR #99 review — character creation editor fixes
13 fixes from PR #99 review on #705 (character editor):

- #10/#11: Add _get_swatch_color() helper; fix stale closure in
  _make_color_swatch (reads current color at click time, not
  construction time); fix _on_modal_ok to use helper instead of
  wrong get_child(0) traversal
- #12: Replace HSV palette with D-165 hardcoded hex values (6×9
  rows, muted HSL per spec — reds/greens/blues/purples/browns/grays)
- #13: Fix fallback asset IDs to match actual files — hair: bald/
  bob/buzzed/long; heads: head_001–004; facial hair: beard/moustache/
  mutton_chops (stubble removed — no asset)
- #14: Remove invented "slot field" TODO comment; replace with
  name-prefix convention note
- #15: Fix overhead camera pitch 0.0°→-80.0° (0° was horizontal,
  not top-down as intended per D-158)
- #16: Make hair highlight swatch non-interactive (_make_display_swatch);
  remove _on_hair_highlight_changed and _hair_highlight_auto flag
- #17: Remove no-op self-assignment in _on_hair_selected; remove
  redundant assignment inside _hair_highlight_auto block
- #18: Store _clothing_dock_container/_accessory_dock_container as
  instance vars — eliminates fragile get_child(3).get_child(0) chain
- #19: Fix test_r_key_triggers_randomise — replaces assert_bool(true)
  with a real assertion checking body_type or skin_tone changed
- #20: Cache scan results in _cached_hair_ids/_cached_head_ids during
  tab build; _on_randomise() reads cache (no re-scan per keypress)
- #21: Fix character_visual.gd docstring "21 segments" → "18 segments"
- #22: Fix _get_accessory_ids_for_slot — apply slot name-prefix
  filtering instead of returning all accessories for every slot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 17:46:10 +01:00
jpmschweitzerandClaude Opus 4.6 00479fab09 fix(assets): address PR #98 review — all 7 items
Warning fix:
- Remove torso_upper from hides in 3 coverage.json files
  (coveralls_basic, jacket_utility, shirt_henley) and the generator
  script — redundant when torso_variant is "full"

Suggestions addressed:
- Add pants_cargo authoring note about foot segment distinction
- Add pipeline_log.json provenance output to Surface Deform batch
  pipeline (tracks method per variant: surface_deform/shrinkwrap/copy)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 17:22:33 +01:00
jpmschweitzerandClaude Opus 4.6 56e8c70081 feat(client): character creation screen with live 3D preview (#705)
Full character creation UI with 5-tab customisation panel (Body, Head,
Hair, Clothing, Accessories), live 3D compositor preview via SubViewport,
D-165 color picker modal, keyboard navigation, and game flow integration.

- CharacterCreation scene + script (~1440 lines) implementing wireframe spec
- SubViewport with Camera3D (frontal/dramatic/overhead presets per D-158)
- Cardinal rotation (Q/E) per D-155, randomise (R), Tab/Enter/Esc navigation
- Body type grid (11 types, D-159), skin tone dock (9 tones, shared state)
- Head template, hair, facial hair, eyebrow grids with DirAccess asset scanning
- Clothing slot selector with per-item Primary/Secondary/Accent tints
- Accessory slot selector with Primary/Secondary tints (Array[Color] descriptor)
- 54-swatch color picker modal (D-165) with hex input and recent colors
- Auto-derive flags for highlight, eyebrow tint, facial hair tint from hair primary
- Game flow: main_menu → archetype select → character creation → game start
- GameState.character_visual_descriptor field for gameplay consumption
- Updated accessory_tints from single Color to Array[Color] in descriptor + compositor
- 40+ GdUnit tests covering scene structure, signals, keyboard nav, color derivation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:16:47 +01:00
jpmschweitzerandClaude Opus 4.6 042deb6b75 feat(assets): add initial clothing set with all body type variants
Five placeholder clothing items fitted to all 11 body types via the
Surface Deform batch pipeline (60 GLBs total):
- coveralls_basic, jacket_utility, pants_cargo, shirt_henley, boots_work

Each item includes reference.glb, reference_mask.png, coverage.json,
and 11 body-type variant GLBs. All Surface Deform binds succeeded
with no Shrinkwrap fallbacks needed (#711).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 16:56:57 +01:00
jpmschweitzerandClaude Opus 4.6 0b1bfe6a96 fix(assets): address PR #96 review — all 8 items
- Fix stale 21→18 segment count in architecture doc, script docstrings,
  and disk budget table (critical — both reviewers)
- Add average_m/README.md noting role as clothing reference body
- Add __main__ guards to diagnostic scripts
- Preflight-check all source paths in blender_process_bodies.py
- Document solid-white hair masks as v0.2 placeholder for multi-region
- Add fallback size comment for head mask generation
- Add bald_mask.png (1×1 black) for sidecar convention consistency
- Document child non-uniform scale rationale (Y=0.72 vs XZ=0.75)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:24:50 +01:00
jpmschweitzerandClaude Opus 4.6 d54040e3b7 feat(assets): add body type segment GLBs for all 11 body types
Adds 198 body segment GLBs (11 body types × 18 segments each) to
client/assets/characters/bodies/:

DIRECT BODY TYPES (6): average_m, average_f, muscular_m, muscular_f,
teen_m, teen_f — segmented from Quaternius FullBody GLTF exports

FORK BODY TYPES (5, auto-scaled from source mesh):
  thin_m, thin_f   — scale (0.82, 1.0, 0.88), narrower/ectomorph
  heavy_m, heavy_f — scale (1.20, 1.08, 1.0), wider/endomorph
  child            — scale (0.75, 0.72, 0.75), forked from teen_m

Each body type contains 18 segments:
  seg_head, seg_neck, seg_torso, seg_torso_upper,
  seg_arm_upper_l/r, seg_arm_lower_l/r, seg_hand_l/r,
  seg_leg_upper_l/r, seg_leg_lower_l/r, seg_foot_l/r,
  seg_eyes, seg_eyebrows

Fork directories include README.md flagging auto-generated status
and scale values. Fork proportions may need artist refinement.

Segmentation uses BMesh vertex-weight selection + 1-ring boundary
overlap for seam-free deformation. D-159 (11 body types), D-160
(18 segments), D-164 (Quaternius source assets).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:09:00 +01:00
jpmschweitzerandClaude Opus 4.6 8473986905 feat(assets): add head template library and hair/eyebrow accessory GLBs
Adds the character head and hair accessory asset tiers:

HEAD TEMPLATES (client/assets/characters/heads/templates/)
  4 head GLBs from Quaternius OnlyHead .blends:
  head_001 (regular_f), head_002 (regular_m),
  head_003 (teen_f), head_004 (teen_m)
  Each paired with a 1024x1024 solid-white _mask.png (full-face tintable)

HAIR (client/assets/characters/hair/)
  13 hairstyle GLBs + masks: bob, buns, cornrows, curly, long_wavy,
  medium_wavy, pixie, ponytail, short_fade, short_messy, short_neat,
  undercut, up_do; plus bald.glb placeholder

FACIAL HAIR (client/assets/characters/facial_hair/)
  3 GLBs + masks: beard, moustache, mutton_chops

EYEBROWS (client/assets/characters/eyebrows/)
  4 GLBs (no masks — tinted directly by shader):
  female, regular, teen, thick

Masks are white (full coverage) pending future artist-authored greyscale
maps for per-region tinting. Eyebrows excluded per compositor spec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:08:11 +01:00
jpmschweitzerandClaude Opus 4.6 bcd5887b82 fix(client): address PR #95 review — 8 items
SLOT_TO_BONE expanded to 12 slots (earring_l/r, necklace, wrist_l/r).
_clear() outline teardown ordering fixed. toon_masked.gdshader: removed
cull_disabled, added ALPHA output. _attach_to_bone() returns node instead
of bool. skin_tone clamped in from_dict(). D-160 segment count 15→17.
Blender scripts: docstrings + __main__ guards. Reload test tightened.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 07:59:23 +01:00
jpmschweitzerandClaude Opus 4.6 23ec1ddebd feat(client): CharacterVisualDescriptor and compositor (#703, #704)
Add CharacterVisualDescriptor (11-variant BodyType enum, wire format
encode/decode, body_type_key mapping) and CharacterVisual compositor
(runtime 3D character assembler with slot architecture, BoneAttachment3D,
clothing coverage, recolor mask loading, skin tone tinting, bone
validation). Includes 64 unit tests and Blender utility scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 07:48:47 +01:00
jpmschweitzerandClaude Opus 4.6 ff3a8e95e4 feat(client): port character shaders, skin tones, skeleton, and animations (#702, #706)
Port proven shaders (toon, toon_masked, outline) and skin tone textures
from quaternius-aesthetic spike to production client. Import 65-bone
armature and Universal Animation Libraries (UAL1 + UAL2). Set
gltf/embedded_image_handling=3 in project.godot (critical import setting).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 07:48:37 +01:00
jpmschweitzerandClaude Opus 4.6 a1788dad32 fix(client): guard battery test against CI on-battery false-fail (S7)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:40:12 +01:00
jpmschweitzerandClaude Sonnet 4.6 f51366b3f5 fix(ui): address PR #90 review — 8 items (W1–W4, S5–S6, A3–A4)
W1/A2: add SimBridge.CONNECTED guard before send_input in toggle handler
W2/A1: assert PlatformInfo != null in HardwareDetector._ready();
       add ordering comment in project.godot [autoload] section
W3: replace FileAccess.open() with get_file_as_string() in
    read_benchmark_cache() — auto-closes, no leak
W4/A3: add _extract_bool_setting() helper in game_state.gd that handles
       both {"Bool": true} and plain bool; push_warning on type mismatch
S5: sync _pre_battery_pref from GameState after load_ai_pref() in
    HardwareDetector._ready() — closes race if system starts on battery
S6: separate "red" TPT status into its own arm with STATUS_RED dot and
    label colour — three-colour mapping: green/yellow/red now distinct
A4: replace DebugConsole.PREFS_PATH compile-time dependency in
    _save_ai_pref() with local SETTINGS_CFG_PATH constant

S7 (battery CI guard) already applied by Hoshe in test file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 11:39:47 +01:00
jpmschweitzerandClaude Opus 4.6 d3ed73bcb3 test(client): Sprint 26 AI dialogue + PlatformInfo tests
67 tests covering #646 AI-Enhanced Dialogue toggle, hardware
detection (RAM/TPT/degradation), PlatformInfo power state,
battery suspend/resume, and settings dialog integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:55:44 +01:00
jpmschweitzerandClaude Sonnet 4.6 9108e5d9ed feat(ui): add get_battery_warning_visible() getter to settings_dialog
Testable API for Hoshe's battery warning visibility assertions (#646).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:54:54 +01:00
jpmschweitzerandClaude Sonnet 4.6 73b4f37de5 fix(ui): include all 7 path properties in PlatformInfo.get_diagnostics()
config_dir, benchmark_cache_path, executable_path, model_dir were
populated in _init_paths() but missing from the diagnostics dict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:50:05 +01:00
jpmschweitzerandClaude Sonnet 4.6 41d16d01ae fix(ui): toggle stays clickable during battery suspend — D-138 player autonomy
Player autonomy wins: AI Dialogue toggle is only greyed out for RAM fail
(< 1.6 GB free). Battery suspend shows a warning label instead of
disabling the toggle — player can override the auto-suspend at any time.

Changes:
- settings_dialog: toggle disabled = hw_status == "fail" only
- settings_dialog: add _ai_battery_warning_label (STATUS_YELLOW) shown
  when _ai_inference_suspended; hidden when plugged back in via
  set_ai_inference_suspended()
- settings_dialog: is_ai_dialogue_toggle_enabled() no longer checks
  _ai_inference_suspended
- settings_dialog: set_ai_inference_suspended() updates warning label
  visibility, not toggle disabled state
- ui-strings: add settings.ai_battery_warning "High battery usage"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:49:06 +01:00
jpmschweitzerandClaude Sonnet 4.6 12d25ce17f feat(ui): expand PlatformInfo to full D-141 Tier 1 interface
23 properties, 2 methods, 1 signal:
- Power: raw_power_state + battery_percent added to _poll_power()
- CPU: cpu_name (OS.get_processor_name), cpu_logical_cores
- GPU: gpu_name, gpu_vendor, gpu_api_version, gpu_type (mapped from
  RenderingDevice.DeviceType), gpu_driver_info — all guarded for headless
- Platform: platform_name, os_version, distribution, is_sandboxed
- Display: screen_count, screen_size, screen_dpi, screen_refresh_rate,
  display_scale (macOS screen_get_scale / dpi÷96 fallback)
- Locale: locale, locale_language
- get_diagnostics() -> Dictionary for bug report inclusion
- OS.get_distribution_name() and DisplayServer.screen_get_scale()
  use callv() pattern for headless build safety

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:46:44 +01:00
jpmschweitzerandClaude Sonnet 4.6 d7a4e3268a feat(ui): PlatformInfo abstraction + battery detection + fixes (#646 D-138)
Platform abstraction:
- New PlatformInfo autoload (extends Node, registered first in project.godot).
  Owns all OS queries: power state monitoring (30s poll), memory (on demand),
  file path resolution (user_data_dir, config_dir, benchmark_cache_path,
  install_dir, executable_path, cache_dir, model_dir).
- PowerProfile enum (FULL/BATTERY/POWER_SAVER), power_profile_changed signal.
  Uses OS.callv("get_power_info") to defer resolution to runtime — avoids
  compile errors on Godot 4.6 headless builds without power API.

HardwareDetector refactor:
- check_ram() now delegates to PlatformInfo.refresh_memory() + free_memory_mb.
  All direct OS.get_memory_info() calls removed.
- classify_power_state(int) and should_suspend_inference(int) delegate to
  PlatformInfo for single source of truth.
- check_power_state() → {power_state, classification, should_suspend}.
- Battery suspend/resume: on PowerProfile.BATTERY, stores pre-battery pref and
  sends ChangeSettings(false) to server. On FULL restore, sends ChangeSettings
  with saved pref if it was enabled. inference_suspended member tracks state.

Settings dialog:
- is_ai_inference_suspended() / set_ai_inference_suspended(bool) — testable API
  per Hoshe's test contract. Reads HardwareDetector.inference_suspended on open.
- Toggle now disabled when battery-suspended OR hardware fails (not only fail).
- get_ai_dialogue_label_text() wired to UIStrings ("settings.ai_dialogue_toggle")
  instead of hardcoded string.

Cleanup:
- Deleted ai_dialogue_detector.gd and .uid (orphaned duplicate, dead code).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:41:07 +01:00
jpmschweitzerandClaude Sonnet 4.6 01b0583265 feat(ui): AI-Enhanced Dialogue toggle + hardware detection (#646, D-138)
Implements the full AI-Enhanced Dialogue feature for Sprint 26:

- HardwareDetector autoload (extends Node): three-layer detection —
  Layer 1 RAM classification (pass/marginal/fail, thresholds 2GB/1.6GB),
  Layer 2 TPT benchmark cache (green/yellow/red, thresholds 6/3 t/s),
  Layer 3 degradation monitoring (>40% drop → yellow). load_ai_pref()
  restores toggle state from user://settings.cfg on startup.

- Settings dialog AI section: toggle, colored status dot, status message
  label, testable API (get_ai_dialogue_label_text, set_ai_dialogue_
  hardware_status, is_ai_dialogue_toggle_enabled). Only RAM "fail" greys
  out toggle — player always overrides yellow/red recommendations (D-138).

- GameState.ai_enhanced_dialogue_enabled (default true, opt-out model).
  GameState.settings_response (v20 one-shot settings dump from server).
  apply_snapshot() hydrates ai_enhanced_dialogue_enabled from full dump.

- Protocol v19→v20, settings_response decoding in decode_snapshot().
  Protocol converted to extends Node autoload (enables test has_method).
  encode_change_settings() helper for test inspection.

- InputMapper: CHANGE_SETTINGS, REQUEST_ALL_SETTINGS, DELETE_SETTING.
  SimBridge: wire mappings for all three. RequestAllSettings queued after
  handshake to hydrate client state from server SQLite on connect.
  settings_response carry-forward in receive_bytes().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 10:34:48 +01:00
jpmschweitzerandClaude Opus 4.6 accbe579c9 feat(simulation): SQLite settings storage with IPC protocol v20 (#627)
Per-player settings via rusqlite (bundled, zero runtime dep). Server
owns the settings DB; client sends ChangeSettings commands over IPC.
Extensible key-value with typed columns (String/Int/Float/Bool).
Protocol bumped to v20 with settings_response in ObserverSnapshot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:11:53 +01:00
jpmschweitzerandClaude Opus 4.6 e0eb3cd35e fix(client): address PR #86 review — archetype validation, teleport clear, ticker layout
- protocol.gd: replace capitalize() with explicit match for archetype
  string mapping, push_error on unknown input with Detective fallback
- main.gd: clear _known_triangle_ids in _teleport_transition() alongside
  _known_recognition_ids so chime re-fires after room change
- news_ticker.gd: defer get_minimum_size() via call_deferred to run
  after layout pass, fixing first-frame scroll distance
- 3 new tests: unknown archetype fallback, triangle dedup per-id,
  independent triangle ID firing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:28:12 +01:00
jpmschweitzerandClaude Opus 4.6 7dbd3247d4 test(client): Sprint 24 signal tests
16 tests covering character select, triangle activation consumer,
news ticker, and protocol v19 bridge. Includes show/hide behavior
for ticker on null current_ticker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 11:44:12 +01:00
jpmschweitzerandClaude Opus 4.6 61d454228d feat(client): character select, triangle activation consumer, news ticker
Sprint 24 Signal — three client tickets delivering the player-facing
storyteller feedback loop:

- #588: Character archetype select screen between New Game and session
  start. Two-card UI (Smuggler/Detective), keyboard+mouse, ESC cancels.
  GameState.character_archetype persisted and sent in StartupMessage.
  PROTOCOL_VERSION bumped to 19.
- #590: Triangle crisis event consumer. Decodes triangle_crisis_events
  from snapshot, fires sfx_monologue_chime_urgent once per triangle per
  session via AudioManager.CHIME_ACTIVATION.
- #592: News ticker HUD element. Scrolling marquee on UILayer, visible
  only when current_ticker is present in snapshot (Last Shift zone).
  Zero-arg update_from_state reads from GameState.current_snapshot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 11:44:05 +01:00
jpmschweitzerandClaude Opus 4.6 37c38c0441 chore(simulation): regenerate msgpack fixtures for protocol v19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:13:31 +01:00
jpmschweitzerandClaude Opus 4.6 fc24de6128 fix(client): test harness tile types, bug report screenshot, time_display maxf
TestHarness: remove deprecated tiles/visible_positions keys, add tile
type (floor/wall/door) to visible_tiles, expand radius to 5. Bug report
dialog: capture viewport screenshot before showing overlay, save as
screenshot.png in report bundle. time_display: use maxf() instead of
max() to match float argument types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:41:18 +01:00
jpmschweitzerandClaude Opus 4.6 ac763fef97 feat(engine): live server visual tests and gauntlet snapshot replay
Add live server lifecycle to tests/run-visual (start/stop server per
scenario, parse LISTENING:{port}). Add MessagePack snapshot replay to
visual_capture.gd via Protocol.decode_snapshot() — exercises the full
client pipeline from wire bytes to rendered fog. Three replay scenarios
(hub_spawn, fog_theater, hub_after_movement) plus one live scenario
(fog_live_hub). Add gen_gauntlet_fixtures.rs to produce .msgpack fixtures
from the Gauntlet test world. Add max_diff_pct threshold to visual-diff.
Makefile: add fixtures-gauntlet target, fix build-client double-import,
preserve .godot cache in clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:41:09 +01:00