Repository navigation
Register keyed row batches once in native containers - #2114
Merged
Merged
Conversation
trissim
marked this pull request as ready for review
November 18, 2026 08:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P265: one native registration per selected row batch
5 focused controls passed, exit 0. Equal-warm native container timing, five alternating pairs:
Fixes #2113.
Delete repeated native registration
KeyedRows.reconcile_keysalready selects a cohort throughshould_mount. It now collects its unattached new rows and calls one family hook,mount_rows. Textual usesmount_all, Qt usesaddChildren. The old single-row hook is removed, with no compatibility path.Each old Textual mount captured the growing displayed sibling list and scheduled another order-style pass. One native mount now owns that work for the selected cohort. Every existing consumer inherits this shared reconciliation: sidebar groups, disclosures, channel activity, team tables/groups/pages and Qt tree rows. Already-attached transferred rows are not remounted. Duplicate input keys do not acquire an extra paint merely because registration happens after construction.
Row construction still observes the existing sidebar budget and hidden-state rule. Native registration finishes the selected creation cohort; this is not a hard frame-time bound or a claim that all idle/animation CPU is fixed.
Preserve native row state
The Textual control checks one native mount for 40 rows, one for the two later additions, exact order after reversing retained rows, object identity, retirement, changed-only painting, and zero mounting/painting for an unchanged reconciliation. Existing short-list, 400-row stepped-frame and hidden-sidebar/resume controls pass.
The Qt native control exposed selection loss in the existing take/reinsert reorder: expansion was restored but selection was not. The same owner now restores both native properties. Its control exercises batch addition, reorder, retained item identity, expanded/selected state, exactly-once retirement and a no-op.
The old standalone
ThemedApprow fixture had become abstract after application capabilities moved. These controls now use the realWorkspace.app/ToadAppfixture, not fake settings/error implementations.Evidence and remaining reds
PYTHONPATH=src /home/ts/code/projects/agent-comms/.venv/bin/python -m pytest tests/textual/test_sidebar_rows_in_steps.py tests/textual/test_channel_member_mount_lifetime.py tests/model/test_qt_keyed_rows.py -q -p no:xdist -o faulthandler_timeout=60— 5 passed in 43.67 s, exit 0.7752071028541da509083a375423e60c24a3c3c1. They remain open; this PR does not claim them green or change panel navigation./home/ts/.cache/agent-scratch/codex-latency/current-render/(batch-targeted.log,batch-checks-fds.log,batch-retirement-baseline.log,batch-clock.py,batch-clock.json, NRA plans/results).git diff --checkpasses. Rebase onto current main changed none of the five touched files.Assumed: existing row factories do not require an earlier fresh row to be registered while constructing a later row; all current factory paths were traced. Existing attached-row transfers and native lifecycle callbacks remain the owners of their state. No user input was replayed or settings changed. Installation and installed native delivery are reported separately.