From 2d0afea19f2598703de08ee478ea4c3d0564b09f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 29 Nov 2026 00:49:59 +0100 Subject: [PATCH] Thing 2.0 cut 7a h2: node_states is no longer public API; confirm, confirming, resume and activate are documented host API (public-test-seams) Steward decision 6 of the h2 fix brief. Core::node_states had no consumer but tests, and render does not read it yet, so it is deleted rather than kept private; tests read state through frame output and Commands::view. activate, confirm, confirming and resume carry docs naming the host as their caller. Co-Authored-By: Claude Opus 5.5 --- crates/thing-core/src/frame.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/thing-core/src/frame.rs b/crates/thing-core/src/frame.rs index 31f5ef8..45bf4fd 100644 --- a/crates/thing-core/src/frame.rs +++ b/crates/thing-core/src/frame.rs @@ -8,7 +8,7 @@ use thing_contract::{CommandInvocation, DatabaseEntry, ProviderId, RecordKey, Sc use std::collections::HashSet; use crate::bind::Binder; -use crate::command::{Activation, Commands, Confirming, HostEffect, NodeStates, Resume}; +use crate::command::{Activation, Commands, Confirming, HostEffect, Resume}; use crate::diagnostic::{Code, Diagnostic}; use crate::input::{Drafts, InputEvent}; use crate::layout::{LaidTree, LayoutError, LayoutFrame, Measure, Metrics, layout}; @@ -204,8 +204,9 @@ impl Core { /// Run the command an `OpenExternal` effect named, once the external step has returned. The host /// holds the `Resume` across the navigation and hands it back here; the command is minted, or asks - /// for confirmation, like an activation. A resume handed over before its surface has bound is held and runs at the first bind; one whose - /// surface is left first is dropped and said. Any other refusal is said in the next frame's `diagnostics`. + /// for confirmation, like an activation. A resume handed over before its surface has bound is held and + /// runs at the first bind; one whose surface is left first is dropped and said. Any other refusal is + /// said in the next frame's `diagnostics`. pub fn resume(&mut self, resume: &Resume, now: Timestamp, ports: Ports<'_>) { let Some(tree) = self.binder.tree(&resume.surface_key) else { self.held.push(resume.clone()); @@ -215,11 +216,6 @@ impl Core { self.notes.extend(said); } - /// The busy, pending and fault state of the shown surface's nodes, for render and accessibility. - pub fn node_states(&self) -> NodeStates { - self.shown.as_ref().map(|shown| self.commands.view(shown.key.as_str())).unwrap_or_default() - } - /// Drop the drafts of nodes the shown surface no longer has. fn retain_drafts(&mut self) { let Some(shown) = &self.shown else { return };