Repository navigation
Rename dead-letter handler methods to match renamed field names (remove 'Shared') - #886
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request aligns HandleQueueControl dead-letter context menu field names with their corresponding event handler method names by removing the Shared prefix, improving consistency and making WinForms UI wiring easier to follow.
Changes:
- Renamed six dead-letter
ToolStripMenuItemfields inHandleQueueControl.Designer.csto dropShared, including their.Namevalues andClickhookups. - Renamed the six corresponding handler methods in
HandleQueueControl.csand updated visibility toggling inShowAppropriateSharedDeadletterMenuItems.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs | Renames shared-deadletter menu item fields and updates designer wiring (Name and Click handlers) to match. |
| src/ServiceBusExplorer/Controls/HandleQueueControl.cs | Renames the associated handler methods and updates references used when showing/hiding menu items. |
Files not reviewed (1)
- src/ServiceBusExplorer/Controls/HandleQueueControl.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
paolosalvatori
left a comment
There was a problem hiding this comment.
Review summary
Overall assessment: The rename itself is complete and internally consistent for the six dead-letter save/delete items. I grepped the branch: zero references to the old *SharedDeadlettered* / *SharedDeadLetter* names remain, every Designer Click hookup points at a renamed method, ShowAppropriateSharedDeadletterMenuItems references the renamed fields, and the inconsistent DeadLetter casing was normalized to Deadletter along the way. Pure rename, no logic changes — confirmed. Build and unit tests pass on CI.
Key risks:
- Guaranteed merge conflict with #880 (blocker for merge sequencing, not for the content): this branch is cut from
mainand edits the same lines ofHandleQueueControl.Designer.csthat #880 also edits, with different content. Verified locally: merge #880 into main → clean; merging this branch afterwards → conflict inHandleQueueControl.Designer.cs(either order conflicts). Details in the inline comment. - Scope vs. what #880's threads claim: a resolved thread on #880 says the
ShowAppropriateSharedDeadletterMenuItemsrename is "handled in #886" — it is not in this diff. Details inline.
Status of prior review conversations:
- No inline review threads exist on this PR.
- @ErikMogensen approved on 2026-07-15.
- Copilot review (2026-07-15): generated no comments.
- Housekeeping: the
@claude review oncerun requested on 2026-07-17 errored out without posting (actions run 29563802592).
Recommendation: Comment — the content is correct, but merge only after #880, via a rebase onto the post-#880 main with a green build, and decide explicitly whether the remaining Shared identifiers get renamed here or in a tracked follow-up.
| this.saveSelectedDeadletteredMessageToolStripMenuItem.Name = "saveSelectedDeadletteredMessageToolStripMenuItem"; | ||
| this.saveSelectedDeadletteredMessageToolStripMenuItem.Size = new System.Drawing.Size(305, 22); | ||
| this.saveSelectedDeadletteredMessageToolStripMenuItem.Text = "Save Selected Message"; | ||
| this.saveSelectedDeadletteredMessageToolStripMenuItem.Click += new System.EventHandler(this.saveSelectedDeadletteredMessageToolStripMenuItem_Click); |
There was a problem hiding this comment.
major (merge coordination) — this branch is based on main and re-does part of #880's designer renames with different content on the same lines: here the Click hookup uses the new handler name, while #880 renames the same fields but keeps the old *Shared* handler names; #880 additionally renames sharedDeadletterContextMenuStrip → deadletterContextMenuStrip, which this PR keeps as-is.
Verified locally: main + #880 merges clean, then merging this branch conflicts in this file (the field/hookup hunks overlap; either merge order conflicts). Whichever PR lands second needs manual resolution, and a careless resolution could resurrect an old name or leave a menu item pointing at a deleted handler — the Designer wires by method name, so this fails at compile time at best.
Suggested sequence: land #880 first, rebase this branch, resolve by keeping this PR's handler renames + #880's deadletterContextMenuStrip rename, and let CI confirm the designer wiring still compiles.
| saveSelectedSharedDeadletteredMessageToolStripMenuItem.Visible = !multipleSelectedRows; | ||
| saveSelectedSharedDeadletteredMessageBodyAsFileToolStripMenuItem.Visible = !multipleSelectedRows; | ||
| deleteSelectedSharedDeadletterMessageToolStripMenuItem.Visible = !multipleSelectedRows; | ||
| saveSelectedDeadletteredMessageToolStripMenuItem.Visible = !multipleSelectedRows; |
There was a problem hiding this comment.
minor (scope) — after this PR the six save/delete handlers match their fields, but the rest of the queue dead-letter "Shared" family survives: ShowAppropriateSharedDeadletterMenuItems (this method), RepairAndResubmitSharedDeadletterMessage, repairAndResubmitSharedDeadletterToolStripMenuItem, resubmitSharedDeadletterToolStripMenuItem, resubmitSelectedSharedDeadletterInBatchModeToolStripMenuItem, and selectAllSharedDeadletterMessagesToolStripMenuItem.
Note that on #880 the Copilot thread asking to rename ShowAppropriateSharedDeadletterMenuItems was resolved with "That's handled in #886" — it isn't, as of this diff. Either extend this PR to finish the de-Shared-ing (same mechanical rename, and it would make the PR title fully accurate), or state explicitly that it's deferred so that #880 thread can be reopened/tracked instead of silently dropped.
paolosalvatori
left a comment
There was a problem hiding this comment.
Hi Erik,
Thanks for spinning this one up to finish the rename work from #880 — I checked it over and the rename itself is clean: no references to the old *Shared* names are left, the designer hookups all point at the right methods, and you even got the inconsistent DeadLetter casing normalized along the way.
I approve this PR, but please take a look at the comments I left this morning and make sure to implement them before merging. To be explicit about what I'm asking:
-
Don't merge this yet, #880 goes first! This branch was cut from
main, so it overlaps with #880 on the same lines ofHandleQueueControl.Designer.cs. I tested it locally: whichever of the two lands second hits a merge conflict in that file. -
After #880 merges, rebase this branch and resolve the conflict carefully: keep this PR's renamed handler hookups (
saveSelectedDeadlettered*_Click,deleteSelectedDeadletter*_Click) plus #880'ssharedDeadletterContextMenuStrip→deadletterContextMenuStriprename. The designer wires items to handlers by method name, so a sloppy resolution means a compile error at best — please let CI go green before merging. -
One scope question I'd like settled explicitly: on #880 you resolved the Copilot thread about
ShowAppropriateSharedDeadletterMenuItemswith "that's handled in #886" — but this diff doesn't actually rename that method, and the rest of theSharedfamily is still around too (RepairAndResubmitSharedDeadletterMessage, the repair/resubmit/select-all menu items, etc.). Either extend this PR to finish the job — it's the same mechanical rename — or tell me it's deferred and we'll track it, and reopen that thread on #880 so it doesn't get lost. Both are fine with me, I just don't want it to fall through the cracks silently.
Thanks again for chasing down the loose ends here!
Paolo
The dead-letter
ToolStripMenuItemfields were renamed to drop theSharedprefix, but the event handler methods still referenced the old names — creating a naming mismatch that made UI wiring hard to follow and refactor safely.Changes
HandleQueueControl.Designer.cs: Renamed field declarations, object initializations,.Nameassignments, andClickhandler hookups to dropSharedfrom all six dead-letter menu item identifiers.HandleQueueControl.cs: Renamed the six handler methods and updated field references inShowAppropriateSharedDeadletterMenuItemsto match.Renames applied
saveSelectedSharedDeadletteredMessageToolStripMenuItem_ClicksaveSelectedDeadletteredMessageToolStripMenuItem_ClicksaveSelectedSharedDeadletteredMessageBodyAsFileToolStripMenuItem_ClicksaveSelectedDeadletteredMessageBodyAsFileToolStripMenuItem_ClicksaveSelectedSharedDeadletteredMessagesToolStripMenuItem_ClicksaveSelectedDeadletteredMessagesToolStripMenuItem_ClicksaveSelectedSharedDeadletteredMessagesBodyAsFileToolStripMenuItem_ClicksaveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem_ClickdeleteSelectedSharedDeadLetterMessageToolStripMenuItem_ClickdeleteSelectedDeadletterMessageToolStripMenuItem_ClickdeleteSelectedSharedDeadLetterMessagesToolStripMenuItem_ClickdeleteSelectedDeadletterMessagesToolStripMenuItem_ClickNo logic changes — pure rename refactor.