vibe.web_core.state_tracker

Web UI Interview State Tracking Logic.

Manages the dynamic state progression for the web UI interview. Uses Flask's g and session extensively. Includes: - determine_relevant_questions logic tailored for updating the web UI state.

probe_template

probe_template(current_state: NestedValue, template: TemplateData, question_definitions: dict[str, Any] | None = None) -> ProbeResult

Web-specific wrapper for template probing.

Calls the core run_probe logic, injecting Flask's g object for access tracking and updating the session with error messages if the probe fails.

Parameters:
  • current_state (NestedValue) –

    The current state NestedValue from the session.

  • template (TemplateData) –

    The loaded TemplateData object.

  • question_definitions (dict[str, Any] | None, default: None ) –

    A complete dictionary of all possible question definitions.

Returns:
  • ProbeResult

    The ProbeResult object returned by run_probe.

determine_relevant_questions

determine_relevant_questions(accessed_keys: set[str], needed_vars: list[str], dependency_map: dict[str, str], original_question_order: list[str], questions: dict[str, Any], template: TemplateData | None = None) -> list[str]

Determine the final set of questions relevant for the current state, using provided data.

Include accessed keys, needed keys, answered keys, and their parents based on dependency map. Order result according to original_question_order.