From e66f4721faadffa994dcbe262fca79ba7e105d56 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Thu, 12 Nov 2026 22:43:38 -0500 Subject: [PATCH 1/2] Ask published history coverage without assuming a transcript cursor --- .../coverage.plan.json | 32 +++++++++++++++++++ .../coverage_author.py | 16 ++++++++++ src/toad/history_coverage.py | 7 ++++ tools/physical_ui_remote.py | 2 +- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .verification/object-settings-sources/coverage.plan.json create mode 100644 .verification/object-settings-sources/coverage_author.py diff --git a/.verification/object-settings-sources/coverage.plan.json b/.verification/object-settings-sources/coverage.plan.json new file mode 100644 index 000000000..c69e83456 --- /dev/null +++ b/.verification/object-settings-sources/coverage.plan.json @@ -0,0 +1,32 @@ +{ + "recipes": [ + { + "recipe_id": "ask-the-coverage-owner-about-publication", + "operations": [ + { + "operation": "insert_before_target", + "file_path": "/home/ts/wt/codex-live--P181--toad/src/toad/history_coverage.py", + "target_qualname": "HistoryCoverage.outgoing", + "source": " def is_available(self) -> bool:\n \"\"\"Whether this source has published saved history, without reading its cursor.\"\"\"\n return False\n\n" + }, + { + "operation": "insert_before_target", + "file_path": "/home/ts/wt/codex-live--P181--toad/src/toad/history_coverage.py", + "target_qualname": "PageCoverage.outgoing", + "source": " def is_available(self) -> bool:\n return True\n\n" + }, + { + "operation": "patch_target", + "file_path": "/home/ts/wt/codex-live--P181--toad/tools/physical_ui_remote.py", + "target_qualname": "ObserveOperation.execute", + "replacements": [ + { + "old_source": "history.state.coverage.retained_through(history) for history in histories", + "new_source": "history.state.coverage.is_available() for history in histories" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.verification/object-settings-sources/coverage_author.py b/.verification/object-settings-sources/coverage_author.py new file mode 100644 index 000000000..ceaa6989e --- /dev/null +++ b/.verification/object-settings-sources/coverage_author.py @@ -0,0 +1,16 @@ +import json +from pathlib import Path +r=Path.cwd();ops=[] +def patch(f,t,o,n):ops.append(dict(operation='patch_target',file_path=str(r/f),target_qualname=t,replacements=[dict(old_source=o,new_source=n)])) +def insert(f,t,s):ops.append(dict(operation='insert_before_target',file_path=str(r/f),target_qualname=t,source=s)) +insert('src/toad/history_coverage.py','HistoryCoverage.outgoing',''' def is_available(self) -> bool: + """Whether this source has published saved history, without reading its cursor.""" + return False + +''') +insert('src/toad/history_coverage.py','PageCoverage.outgoing',''' def is_available(self) -> bool: + return True + +''') +patch('tools/physical_ui_remote.py','ObserveOperation.execute','history.state.coverage.retained_through(history) for history in histories','history.state.coverage.is_available() for history in histories') +Path('.verification/object-settings-sources/coverage.plan.json').write_text(json.dumps({'recipes':[{'recipe_id':'ask-the-coverage-owner-about-publication','operations':ops}]},indent=2)) diff --git a/src/toad/history_coverage.py b/src/toad/history_coverage.py index db86b526c..1a242c895 100644 --- a/src/toad/history_coverage.py +++ b/src/toad/history_coverage.py @@ -55,6 +55,10 @@ class HistoryCoverage(DeclaredFamily, affix="Coverage"): summary: ClassVar[str] = "Saved history not loaded" + def is_available(self) -> bool: + """Whether this source has published saved history, without reading its cursor.""" + return False + def outgoing(self, history: CoveredHistory) -> frozenset[OutgoingMessageReference]: return frozenset() @@ -88,6 +92,9 @@ class PageCoverage(HistoryCoverage): summary = "Saved history available" + def is_available(self) -> bool: + return True + def outgoing(self, history: CoveredHistory) -> frozenset[OutgoingMessageReference]: return history.covered_outgoing() diff --git a/tools/physical_ui_remote.py b/tools/physical_ui_remote.py index f0fb7e12c..4829af3da 100644 --- a/tools/physical_ui_remote.py +++ b/tools/physical_ui_remote.py @@ -584,7 +584,7 @@ def execute(self, directory: Path) -> None: # The pager's original publication state also supplies the footer's # saved-history availability. Agent status is an independent fact. history_published = bool(histories) and all( - history.state.coverage.retained_through(history) for history in histories) + history.state.coverage.is_available() for history in histories) frontend = FrontendIdentity( self.identity, Path(toad.__file__).resolve(), Path(agent_comms.__file__).resolve(), Path(textual.__file__).resolve(), From 922c74d0f54e7ba4c9fa17c5e32d721e2b0b1a07 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Thu, 12 Nov 2026 22:44:40 -0500 Subject: [PATCH 2/2] Distinguish session advertisements from global agent defaults --- .../panel-name.plan.json | 20 +++++++++++++++++++ .../object-settings-sources/panel_name.py | 5 +++++ .../physical-delivery.md | 17 ++++++++++++++++ src/toad/configured_view.py | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .verification/object-settings-sources/panel-name.plan.json create mode 100644 .verification/object-settings-sources/panel_name.py create mode 100644 .verification/object-settings-sources/physical-delivery.md diff --git a/.verification/object-settings-sources/panel-name.plan.json b/.verification/object-settings-sources/panel-name.plan.json new file mode 100644 index 000000000..8f6f1a2ab --- /dev/null +++ b/.verification/object-settings-sources/panel-name.plan.json @@ -0,0 +1,20 @@ +{ + "recipes": [ + { + "recipe_id": "name-the-session-settings-distinctly-from-agent-defaults", + "operations": [ + { + "operation": "patch_target", + "file_path": "/home/ts/wt/codex-live--P181--toad/src/toad/configured_view.py", + "target_qualname": "AgentProperties.panel", + "replacements": [ + { + "old_source": "SideBar.Panel(\"Agent settings\", cls(view),", + "new_source": "SideBar.Panel(\"Session settings\", cls(view)," + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.verification/object-settings-sources/panel_name.py b/.verification/object-settings-sources/panel_name.py new file mode 100644 index 000000000..07c94af4e --- /dev/null +++ b/.verification/object-settings-sources/panel_name.py @@ -0,0 +1,5 @@ +import json +from pathlib import Path +r=Path.cwd() +p={'recipes':[{'recipe_id':'name-the-session-settings-distinctly-from-agent-defaults','operations':[{'operation':'patch_target','file_path':str(r/'src/toad/configured_view.py'),'target_qualname':'AgentProperties.panel','replacements':[{'old_source':'SideBar.Panel("Agent settings", cls(view),','new_source':'SideBar.Panel("Session settings", cls(view),'}]}]}]} +Path('.verification/object-settings-sources/panel-name.plan.json').write_text(json.dumps(p,indent=2)) diff --git a/.verification/object-settings-sources/physical-delivery.md b/.verification/object-settings-sources/physical-delivery.md new file mode 100644 index 000000000..91b7fb748 --- /dev/null +++ b/.verification/object-settings-sources/physical-delivery.md @@ -0,0 +1,17 @@ +# Installed viewed-object settings + +Main discovery/original-writer repair: Toad #1755, merge 4639602bf5310b46e3141c1caa6ee99de09c12a3. Inline form lifecycle/actual advertisement repair: Toad #1758, merge 56169ab3deea6e303ea259351fe101b2c19fa570. Nested screen-overlay ordering: Textual #309, merge b4cbe4c9d15858de4b3f5ad6448a77f23fb1a575. + +Installed together in core-4bded481d-lock-9178df5ad0d59ab5. Native parallel-pi received and answered message 14818 after restart (14820-29a14888f8fd). + +The isolated physical run used plain st on an owned Xvfb display, a copied bus and private frontend HOME/config/state/data. Installed metadata confirmed the exact Toad and Textual merges above. No prompt was sent and no user application was signalled. + +Viewed actual screenshots: +- /home/ts/.cache/agent-scratch/codex-latency/view-settings-physical-20261112-v5/frontend/dropdown-keyboard.png: actual option list paints over the containing workspace, all visible original settings groups present. +- /home/ts/.cache/agent-scratch/codex-latency/view-settings-physical-20261112-v5/frontend/notifications-fields.png: real Notifications controls and global scope labels. Mouse selection changed the original dropdown to this group. + +The first Notifications wait used nonexistent label text and timed out; the actual screenshot and terminal capture showed the fields. Do not count that wait as a pass. The later channel switch exposed the observation helper asking WireHistory for source_through; that helper failure prevented a physical channel screenshot. The selected channel/file behavior was instead exercised by the existing focused UI case, passed 1/1 in 18.80s. It checks separate source identities, global save, lazy local inheritance/reset, same context editor state and actual changing advertisements. Original configuration cases passed 2/2. Textual reproducer failed before and passed after with two existing compositor cases, 3/3 in 0.61s. + +The helper now asks the HistoryCoverage family directly whether saved history is available; it does not acquire a native cursor from a channel. The native session panel is labelled Session settings to distinguish it from global Agent settings. These final helper/label changes are source traced; no additional app run or suite was started for them. + +The terminal, Xvfb, recording and copied worker have been retired. Retirement files are retained in the physical run directory. User windows were left alone. diff --git a/src/toad/configured_view.py b/src/toad/configured_view.py index 2dfa62fb0..8136b2a4a 100644 --- a/src/toad/configured_view.py +++ b/src/toad/configured_view.py @@ -57,7 +57,7 @@ def __init__(self, view): @classmethod def panel(cls, view): - return SideBar.Panel("Agent settings", cls(view), id="agent-settings", flex=True) + return SideBar.Panel("Session settings", cls(view), id="agent-settings", flex=True) def compose(self): self.form = SessionForm.for_prompt(self.view.conversation.prompt)