Skip to content

Bind saved-history fixtures to the retained owner before loading - #1175

Merged
trissim merged 1 commit into
mainfrom
fix/saved-history-owner-fixture
Oct 23, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/saved-history-owner-fixture

Conversation

@trissim

@trissim trissim commented Oct 23, 2026 •

Copy link
Copy Markdown

The saved-history fixture registered saved but kept the selected tab unbound, attached a processless agent, and handed that unrelated tab a source page. The UI correctly refused to claim retained coverage.

The fixture now opens a MailboxTab for the registered owner's exact incarnation and root through session_navigation.new, with MainScreen.from_thread as the screen constructor. That constructor calls bind_thread (screens/main.py:301-310), which installs ThreadIdentity(owner, root) before the history widget mounts. The normal bound source loads and publishes its own saved history; the fixture waits for that coverage before reading the page used for later park/revalidation checks.

  • Deleted the detached-agent attachment and initial bare received(page) injection.
  • Kept every saved-history availability check and all assertions about parked coverage, retained pages and retained child widgets.
  • Updated the two stale reveal_retained calls to the existing BoundView method with (owner, history).
  • Replaced the removed window.histories lookup with identity equality against the bound view's history.
  • Title checks still require the same exact text; str(details.title) reads Textual Content's actual text instead of applying string membership to Content's character sequence.

Based on main f9aa367, which merged #1169. Only tests/textual/test_saved_history_coverage.py changes. No private attribute mutation or patch of application code. git diff --check passes; no tests run.

Assumed: execution is checked by the review fork; the fixture's eight-row saved journal remains the retained source used by those checks.

@trissim
trissim marked this pull request as ready for review October 23, 2026 22:11
Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 374ee04 into main Oct 23, 2026
3 checks passed
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