Skip to content

feat: add comprehensive debug UI for Tauri GUI#46

Merged
dmooney merged 2 commits into
mainfrom
claude/add-debug-ui-nyztn
Mar 28, 2026
Merged

feat: add comprehensive debug UI for Tauri GUI#46
dmooney merged 2 commits into
mainfrom
claude/add-debug-ui-nyztn

Conversation

@dmooney
Copy link
Copy Markdown
Owner

@dmooney dmooney commented Mar 25, 2026

Summary

  • Shared data layer (crates/parish-core/src/debug_snapshot.rs): DebugSnapshot struct with builder function that aggregates all game state (clock, world, NPCs, events, inference) into a serializable format consumed by the GUI
  • Tauri GUI debug drawer (ui/src/components/DebugPanel.svelte): Bottom-drawer panel with 5-tab layout (Overview, NPCs, World, Events, Inference), click-to-inspect NPC detail view, 2-second auto-refresh via Tauri events, and F12 keyboard toggle

Key features

  • NPC deep-dive: Individual inspector showing personality traits, daily schedule, short-term memory timeline, relationship strength bars, and knowledge entries
  • Event log: Rolling buffer of world events with timestamps
  • Inference metrics: Provider, model, queue depth, and request counts
  • Keyboard controls: F12 toggle, click tabs in GUI

Files changed (15 files)

  • crates/parish-core/src/debug_snapshot.rs — new shared debug data types + builder (9 tests)
  • crates/parish-core/src/lib.rs — module declaration
  • ui/src/components/DebugPanel.svelte — new Svelte bottom-drawer component
  • ui/src/components/StatusBar.svelte — DBG toggle button
  • ui/src/stores/debug.ts — new Svelte stores for debug state
  • ui/src/lib/types.ts — TypeScript interfaces matching Rust serde types
  • ui/src/lib/ipc.ts — IPC command + event wrappers
  • ui/src/routes/+page.svelte — layout integration
  • src-tauri/src/commands.rsget_debug_snapshot Tauri command
  • src-tauri/src/events.rs — debug-update event constant
  • src-tauri/src/lib.rs — debug state, background tick task
  • docs/design/debug-ui.md — full design document
  • docs/design/overview.md — overview update
  • docs/index.md — index update
  • CLAUDE.md — architecture tree update

Test plan

  • All tests pass (cargo test)
  • cargo fmt --check clean
  • cargo clippy -- -D warnings clean
  • Manual GUI verification: run cargo tauri dev, press F12, click tabs, click NPC rows

https://claude.ai/code/session_01BedcbLqz2gfX15DUzs4K4y

@dmooney dmooney force-pushed the claude/add-debug-ui-nyztn branch from 83192ab to 7a1e434 Compare March 27, 2026 14:34
@dmooney dmooney changed the title feat: add comprehensive debug UI for TUI and Tauri GUI feat: add comprehensive debug UI for Tauri GUI Mar 27, 2026
claude and others added 2 commits March 27, 2026 22:22
Add a shared debug data layer and Tauri GUI debug drawer:

- parish-core: DebugSnapshot struct with builder for all game state
  (clock, world graph, NPCs with deep-dive, tiers, events, inference)
- Tauri GUI: DebugPanel.svelte bottom drawer with 5 tabs
  (Overview, NPCs, World, Events, Inference), NPC click-to-inspect,
  and real-time 2s refresh via debug-update events
- IPC: get_debug_snapshot command + debug-update event
- StatusBar: DBG toggle button for quick access
- 9 new tests in parish-core debug snapshot module

https://claude.ai/code/session_01BedcbLqz2gfX15DUzs4K4y
- Change debug panel from fixed overlay to document flow so the input
  field stays visible when the panel is open
- App shell shrinks to 60vh when debug is open, giving 40vh to the panel
- Use # sigil for locations (@ is reserved for people)
- Clarify tier summary label from "Here" to "T1 NPCs"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dmooney dmooney force-pushed the claude/add-debug-ui-nyztn branch from 7a1e434 to 6bccb07 Compare March 28, 2026 02:22
@dmooney dmooney merged commit 2f5dabd into main Mar 28, 2026
@dmooney dmooney deleted the claude/add-debug-ui-nyztn branch March 28, 2026 02:22
dmooney added a commit that referenced this pull request May 25, 2026
TODO #41 / #46 / #53. Demo-audit cycle 8 caught the auto-player
producing 9 consecutive turns of "I'll make for the Crossroads then.",
"I'll be making for the Hedge School then.", "I'll venture to the
Letter Office", "I'm off to Kilteevan Village" — none triggered a
move. The first-person guard at intent_local.rs:169 caught the
"i'll " / "i'm " prefix first and classified everything as Talk
before any move-prefix could match. With no NPC present at empty
locations the input silently vanished.

Adds 18 first-person movement prefixes at the top of move_phrases
so they match before the narrative guard fires:

  i'll be making for / i'll be makin' for / i'll be heading to
  i'll be walking to / i'll be on me way to / i'll be on my way to
  i'll be off to / i'll make my way to / i'll head over to
  i'll head to / i'll make for / i'll venture to / i'll wander to
  i'll stroll to / i'll walk to / i'll go to
  i'm off to / i'm headed to / i'm heading to
  off i go to

Narrative phrasings without a movement verb continue to fall through
to the first-person Talk guard (regression-tested).

Coverage:

- New unit tests: test_local_parse_first_person_movement_intents (18
  positive cases), test_local_parse_first_person_narrative_still_talk_after_anchor_add
  (4 narrative-guard cases), test_local_parse_first_person_movement_case_insensitive.
- 157 parish-input tests pass; 983 across input + core + engine.

Live proof at .proofs/todo-41-movement-parser/: cargo run -p
parish-engine --headless --script
parish/testing/fixtures/play_todo-41-movement-parser.txt — all 7
previously-broken phrasings now produce "result":"moved" with the
correct destination.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dmooney added a commit that referenced this pull request May 26, 2026
…#1139)

* fix(demo): direct auto-player to move when NPCs here: none (TODO #12)

Cycles 2, 7, and 9 of the demo audit caught the auto-player stranded
at empty locations — 4 turns at The Mill after Brendan + Cormac
departed, 18 sterile turns at the abandoned Hedge School. The LLM-as-
player kept speaking aloud ("I'll wait here by the mill", "Sittin'
here, I notice a book half-open on the table") instead of moving. The
MOVEMENT CADENCE directive from TODO #1/#30 handles the general "after
3-5 turns, move" rhythm but not the specific signal NPCs here: none.

Add a WHEN ALONE section to build_demo_system_prompt that quotes the
verbatim "NPCs here: none" cue, closes the speech-at-nobody loophole
explicitly, and pins the next action to one of the three movement
verbs already taught in the cadence block. Pin the header, the cue,
and the move-only instruction in demo_system_prompt_carries_alone_move_directive
so a future refactor cannot drop the section silently.

A companion engine-side fix (TODO #46 — surface a system response
when the player speaks at an empty location) is deferred so the
impact of this directive can be measured first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: retrigger after Actions incident resolved

* ci: retrigger after Rust quality gate timeout (cache cold)

* test(inference): route default-frequency-penalty test through Interactive lane

#1127's test_inference_queue_send_default_omits_frequency_penalty sent on
the Background lane but received from the Interactive receiver (`irx`).
The message went to `_brx`, which nobody reads, so `irx.recv()` blocked
indefinitely. PR #1127's CI runs were both cancelled before the test
could surface the hang, and the merge to main stalled the Rust quality
gate at the 30-minute timeout on every subsequent PR.

Swap `InferencePriority::Background` to `Interactive` so the send lands
on the lane `irx` actually drains. Add a comment pointing future readers
at the failure mode so the lane-mismatch trap isn't re-laid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants