class UI::Probes::ProbeStore

Overview

ProbeStore — a thread-unsafe key/value store keyed by string identifiers.

Each probe singleton (TapProbe, ToggleProbe, SliderProbe, etc.) backs its mirror-label state by writing string values into this store. The rendered probe scene reads the values at build_component time so the initial label text reflects the singleton's current state.

For end-to-end behavior probes (rubric BX1-BX5), the runtime mutation path is constrained by the SwiftKit hosting model: SwiftUI views are immutable values and do not re-render in response to Crystal mutation without an ObservableObject bridge. The probe singletons therefore focus on (a) holding the state Crystal-side so the next render of the scene reflects the new value, and (b) exposing a counter / last_value accessor that test code can read directly when the AXTest harness is driving the host as an in-process spec.

See handoff/phase-03-remediation-3-blockers-2026-05-21.md for the SwiftKit reactive-label gap that limits the probe-mirror tracking path.

Defined in:

ui/probes/probe_store.cr

Constructors

Instance Method Summary

Constructor Detail

def self.instance : ProbeStore #

[View source]
def self.new #

[View source]

Instance Method Detail

def get(key : String) : String | Nil #

[View source]
def get_or(key : String, default : String) : String #

[View source]
def reset(key : String) : Nil #

[View source]
def reset : Nil #

[View source]
def set(key : String, value : String) : Nil #

[View source]