Repository navigation
NRA codemod batch 36: push 13 foreign-absence & constant-subtype checks onto owners - #2333
Merged
Merged
Conversation
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
Applied 13 mechanical NRA codemod removals across 13 files (post-
NRA#636synthesis scan, including both newly unlocked patterns live on Toad):FragmentLocation.reveal_above(src/toad/client/reader_position.py,src/toad/widgets/transcript_history.py): pushes compoundandearly-return guard fromLineHistory.reveal_message_headontoFragmentLocation/UnloadedFragment(live proof ofNRA#636fix Add main-menu dialogs to export the wire and import a thread #3).RowMetrics.extent_or+RowSize.usable_size/usable_row/measured_metrics(src/toad/qt/virtual_scroll.py): pushes 4 foreign-absence checks out ofRowDocumentStoreontoRowMetricsandRowSize(live proof ofNRA#636fix Validate incoming ACP session updates with the official SDK #2).StructuredPart.collapses_solo_in_tree(src/toad/client/structured_context.py,src/toad/core/context_inspection.py): replacesexpands_in_treeClassVarflag with polymorphic method onStructuredPart/AnswerPart.SurfaceBinding.publish_transcript_snapshot(src/toad/surface_binding.py,src/toad/acp/agent_controller.py): pushesbinding.target is Nonecheck ontoSurfaceBinding.DECInvoke.apply_slots+TerminalState.ensure_mouse_tracking(src/toad/ansi/_ansi.py): pushes slot-application and lazyMouseTrackinginitialization ontoDECInvokeandTerminalState(deduplicated into oneensure_mouse_trackingmethod).SidebarState.preserve_selected_target(src/toad/client/session_tracker.py,src/toad/sidebar_navigation.py),AgentConversationCommands.default_testimonial_text(src/toad/client/commands.py,src/toad/slash_command.py),TargetContext.has_closable_session(src/toad/target_commands.py).Dropped two bad-owner moves caught during diff review (
ShellTerminalOutput.show_shell_terminalwould have pulled a local Textual widget import into sharedshell_output.py;SessionIdentity.open_current_relationshipwould have pulled Qt panel warnings intothread_identity.py).Verification
REL_IMPORTS=0,qt_inherit_ratchet.py0/0/0/0/0,shadow_check.py0,guarded_imports.py0.test_channel_partial_paint.pypassedreveal_message_headat lines 49 & 71 and only hit a pre-existingctrl+tcollision onmain).MouseMode,MouseTrackingMode,DECInvoke.apply_slots,RowMetrics.extent_or,RowSize, andSidebarState.preserve_selected_target.