feat(client): sprint 17 — time display and E-Talk overlay #62

Closed
jpmschweitzer wants to merge 0 commits from client into main
Owner

Summary

Sprint 17 client deliverables:

  • #263 — Diegetic time display on insert HUD: New time_display.gd on InsertOverlay (CanvasLayer 10) shows station local time (HH:MM), day phase with cycle-tinted color, and day number. Reads SimulationTime from GameState.game_time. Adds Constants.format_game_time() helper. Placeholder layout pending #314 wireframe.
  • #537 — E-Talk overlay relationship color (Phase 1): interaction_list.gd renders a 3px left-edge accent bar in D-033 relationship color (teal/green/amber/red). Cross-references entity_id against visible_entities. NPC name and dialogue tier hint deferred to Phase 2 (needs server protocol extension).

No server changes required — all data already in ObserverSnapshot.

Sprint 17 completion proof (client)

  • Time is visible — insert HUD shows current game time in diegetic format, advances as ticks pass
  • E-Talk overlay is informative — interaction overlay shows relationship color

Test plan

  • 22 tests for #263 (time formatting, GameState parsing, snapshot wiring, scene integration)
  • 30 tests for #537 (D-033 color mapping, relationship lookup, regression, edge cases)
## Summary Sprint 17 client deliverables: - **#263 — Diegetic time display on insert HUD:** New `time_display.gd` on InsertOverlay (CanvasLayer 10) shows station local time (HH:MM), day phase with cycle-tinted color, and day number. Reads `SimulationTime` from `GameState.game_time`. Adds `Constants.format_game_time()` helper. Placeholder layout pending #314 wireframe. - **#537 — E-Talk overlay relationship color (Phase 1):** `interaction_list.gd` renders a 3px left-edge accent bar in D-033 relationship color (teal/green/amber/red). Cross-references entity_id against visible_entities. NPC name and dialogue tier hint deferred to Phase 2 (needs server protocol extension). No server changes required — all data already in `ObserverSnapshot`. ## Sprint 17 completion proof (client) - [x] Time is visible — insert HUD shows current game time in diegetic format, advances as ticks pass - [x] E-Talk overlay is informative — interaction overlay shows relationship color ## Test plan - 22 tests for #263 (time formatting, GameState parsing, snapshot wiring, scene integration) - 30 tests for #537 (D-033 color mapping, relationship lookup, regression, edge cases)
jpmschweitzer added 3 commits 2026-02-24 11:17:27 +01:00
Time display on InsertOverlay (CanvasLayer 10) shows station local
time (HH:MM), day phase with cycle-tinted color, and day number.
Reads SimulationTime from GameState.game_time via update_from_state().
Adds Constants.format_game_time() helper for testability.
Placeholder layout — position refines when #314 wireframe lands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 1: interaction_list.gd shows a 3px left-edge accent bar in
D-033 relationship color (teal/green/amber/red) at 85% alpha.
Cross-references entity_id against visible_entities via
_cache_entity_relationship(). NPC name and tier hint deferred to
Phase 2 (requires server protocol extension).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jpmschweitzer added 1 commit 2026-02-24 11:22:45 +01:00
Fix test API mismatches: time display tests target InsertOverlay/
TimeDisplay and time_display.gd; E-Talk tests rewritten to target
interaction_list.gd _cache_entity_relationship() and _relationship_color
state. Phase 2 tests (name, tier hint) marked as skip placeholders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

PR Review: client → main (#62)

Hoshe (Code Quality): REQUEST_CHANGES

# File Severity Issue
1 test_etalk_overlay_sprint17.gd warning test_relationship_known_maps_to_green will fail — no "Known" match branch in color_for_relationship().
2 constants.gd:100-103 warning format_game_time no guard on negative or >1439 input.
3 main.gd:107-108 warning Calls private interaction_list._hide(). Use public API instead.
4 interaction_list.gd:149-159 suggestion No viewport bounds clamping — overlay can render off-screen.
5 time_display.gd:54-55 suggestion "--:--" string guard is fragile — prefer boolean flag.
6 test_time_display_sprint17.gd:252-259 suggestion Missing upper bound assertion (<= 1439) per D-031.

Tyre (Architecture): REQUEST_CHANGES

Summary: Core logic elegant — signature caching, draw-based rendering, D-031 alignment correct. Two patterns need fixing.

# File Severity Issue
1 main.gd:108 warning Same _hide() private coupling — route through public API.
2 time_display.gd:59-66 warning _draw() calls get_string_size() 4x/frame. Cache geometry in update_from_state().
3 time_display.tscn:12-16 suggestion Fixed 154x44px rect will clip if content changes. Note for #314.
4 interaction_list.gd:44-48 suggestion queue_redraw() every frame — could skip when position unchanged.
5 test_time_display_sprint17.gd suggestion Private state access pattern should be documented in test header.

Verdict: CHANGES REQUESTED

Key issues: Failing test (Known/green), private API coupling (_hide()), unguarded input range, per-frame font measurement.

## PR Review: client → main (#62) ### Hoshe (Code Quality): REQUEST_CHANGES | # | File | Severity | Issue | |---|------|----------|-------| | 1 | test_etalk_overlay_sprint17.gd | warning | `test_relationship_known_maps_to_green` will fail — no `"Known"` match branch in `color_for_relationship()`. | | 2 | constants.gd:100-103 | warning | `format_game_time` no guard on negative or >1439 input. | | 3 | main.gd:107-108 | warning | Calls private `interaction_list._hide()`. Use public API instead. | | 4 | interaction_list.gd:149-159 | suggestion | No viewport bounds clamping — overlay can render off-screen. | | 5 | time_display.gd:54-55 | suggestion | `"--:--"` string guard is fragile — prefer boolean flag. | | 6 | test_time_display_sprint17.gd:252-259 | suggestion | Missing upper bound assertion (`<= 1439`) per D-031. | ### Tyre (Architecture): REQUEST_CHANGES **Summary:** Core logic elegant — signature caching, draw-based rendering, D-031 alignment correct. Two patterns need fixing. | # | File | Severity | Issue | |---|------|----------|-------| | 1 | main.gd:108 | warning | Same `_hide()` private coupling — route through public API. | | 2 | time_display.gd:59-66 | warning | `_draw()` calls `get_string_size()` 4x/frame. Cache geometry in `update_from_state()`. | | 3 | time_display.tscn:12-16 | suggestion | Fixed 154x44px rect will clip if content changes. Note for #314. | | 4 | interaction_list.gd:44-48 | suggestion | `queue_redraw()` every frame — could skip when position unchanged. | | 5 | test_time_display_sprint17.gd | suggestion | Private state access pattern should be documented in test header. | ### Verdict: CHANGES REQUESTED **Key issues:** Failing test (Known/green), private API coupling (`_hide()`), unguarded input range, per-frame font measurement.
jpmschweitzer added 1 commit 2026-02-24 11:28:49 +01:00
- constants.gd: clamp format_game_time input to 0..1439 (Hoshe #2)
- interaction_list.gd: add public hide_list() wrapper (Hoshe #3, Tyre #1)
- main.gd: call hide_list() instead of private _hide()
- time_display.gd: cache font geometry in update_from_state(), use boolean
  _has_data flag instead of string guard (Tyre #2)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jpmschweitzer added 1 commit 2026-02-24 11:30:30 +01:00
- interaction_list.gd: skip queue_redraw() when position unchanged (Tyre #4)
- time_display.tscn: widen bounding rect 154x44→184x54, add clip note
  for #314 wireframe (Tyre #3)
- test_time_display_sprint17.gd: document private state access pattern
  in header (Tyre #5), add upper bound assertion for D-031 1439 max (Hoshe #6)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Re-Review: client → main (#62)

Hoshe (Code Quality): APPROVE

All 4 original warnings fixed. No new issues.

# Issue Severity Status
1 Known test wrong assertion warning FIXED — asserts fallback to unknown/teal
2 format_game_time no input guard warning FIXED — clampi(0, 1439)
3 main.gd calls private _hide() warning FIXED — public hide_list()
4 _draw() 4x get_string_size/frame warning FIXED — cached in _cache_geometry()
5 No viewport clamping suggestion NOT FIXED (acceptable)
6 String sentinel guard suggestion FIXED — _has_data boolean
7 Missing upper bound test suggestion FIXED — is_less_equal(1439)

Tyre (Architecture): APPROVE

Both warnings fixed. All suggestions addressed.

# Issue Severity Status
1 _hide() private coupling warning FIXED — public wrapper
2 Per-frame font measurement warning FIXED — geometry cached
3 Fixed tscn rect suggestion FIXED — widened + comment
4 queue_redraw() every frame suggestion FIXED — position-change guard
5 Test private access undocumented suggestion FIXED — header block

Verdict: APPROVED

## Re-Review: client → main (#62) ### Hoshe (Code Quality): APPROVE All 4 original warnings fixed. No new issues. | # | Issue | Severity | Status | |---|-------|----------|--------| | 1 | `Known` test wrong assertion | warning | FIXED — asserts fallback to unknown/teal | | 2 | `format_game_time` no input guard | warning | FIXED — clampi(0, 1439) | | 3 | `main.gd` calls private `_hide()` | warning | FIXED — public `hide_list()` | | 4 | `_draw()` 4x get_string_size/frame | warning | FIXED — cached in `_cache_geometry()` | | 5 | No viewport clamping | suggestion | NOT FIXED (acceptable) | | 6 | String sentinel guard | suggestion | FIXED — `_has_data` boolean | | 7 | Missing upper bound test | suggestion | FIXED — `is_less_equal(1439)` | ### Tyre (Architecture): APPROVE Both warnings fixed. All suggestions addressed. | # | Issue | Severity | Status | |---|-------|----------|--------| | 1 | `_hide()` private coupling | warning | FIXED — public wrapper | | 2 | Per-frame font measurement | warning | FIXED — geometry cached | | 3 | Fixed tscn rect | suggestion | FIXED — widened + comment | | 4 | `queue_redraw()` every frame | suggestion | FIXED — position-change guard | | 5 | Test private access undocumented | suggestion | FIXED — header block | ### Verdict: APPROVED
jpmschweitzer closed this pull request 2026-02-24 12:19:45 +01:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpmschweitzer/settled-reach#62