Repository navigation
P1032: repaint channel members only for changed pins - #1369
Merged
Merged
Conversation
trissim
marked this pull request as ready for review
October 30, 2026 15:24
trissim
enabled auto-merge
October 30, 2026 15:24
There was a problem hiding this comment.
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.
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.
Summary
1 commit, 2 files, +4/-4. Channel-change repaint requests go from every member to only the channel's pin delta. The blanket group sync spelling goes 5 -> 4 in
sidebar_tree.py.Channel presentation owns the pin delta
Before:
ChannelGroup.presentpainted the header and discarded the difference between its previous and new channel.ChangedChannels.apply_commsthen marked every member changed. Every resultingThreadStatusRow.showcallsSessionNavigation.thread_rowbefore its existing equality guard; that method walks all open session entries.After:
ChannelGroup.present(channel) -> frozenset[str]retains all existing header work and returnsprevious.pinned_members ^ channel.pinned_members.ChangedChannelspasses that result directly intogroup.sync_members(...).Class structure is unchanged:
ChannelGroup(SidebarGroup[ThreadRow]),SidebarGroup(KeyedRows[str], VerticalGroup), and the existingSidebarChangefamily remain the owners. No cache, throttle, shadow state, wrapper or equality workaround was added. One blanket repaint route (2 statements) is replaced with the existing owner's result (1 statement).Work removed and preservation scope
Let M be existing attached member rows in one changed group, T open session entries, and D the pin symmetric difference among those rows. With stable membership:
These are static work counts, not elapsed timings or measured p99.9. Membership reconciliation still traverses model keys; no claim that the entire channel update is constant time.
KeyedRows.reconcile_keyscreates and paints new/transferred or unattached rows independently of the changed set, removes retired keys and reorders from current keys. That algorithm is unchanged.RowReconciliation.finishkeeps its full-member synchronization for outstanding transfers.AllSidebarRowskeeps full catch-up for hidden/reopened/rebound views. New groups still paint throughon_mount.ChangedThreadsand appThreadRowStateChangedstill repaint actual thread changes.shown.threads.rowsand app session state.Source evidence
Before inventory: NRA
parse_python_module_roots+ModuleSyntaxIndex, Toad production source plus Coreui_model, 318 parsed modules, completed RC0. It records class bases, imports, relevant owner bodies and attribute reads/writes; all matchingpresent,sync_members,show_member, reconciliation, pin and thread-row consumers were inspected. This is syntax evidence, not a dynamic binding/MRO proof; unrelatedpresentnames remain unmatched rather than being declared sidebar callers. No parse error was printed.Owner/consumer sites before this patch:
comms_sidebar.py:100,132,146,270: channel presentation, pin projection, member sync, thread rendering.sidebar_tree.py:180,376,434,457,483,722: reconciliation, catch-up, channel changes, thread changes, search.session_navigation.py:178: per-row session traversal.ui_model/sidebar.py:81,189: immutable channel row and separately flushed channel/thread models.Required check:
No pytest, synthetic app, fixture, full suite or local NRA gate was run. The integration owner still owes installation and the affected real-application journey/total-frame p99.9 measurement; this PR does not claim those results.
Assumed: