Skip to content

Rename dead-letter handler methods to match renamed field names (remove 'Shared') - #886

Merged
ErikMogensen merged 3 commits into
mainfrom
copilot/fix-review-comment-880
Jul 17, 2026
Merged

ErikMogensen merged 3 commits into
mainfrom
copilot/fix-review-comment-880

Conversation

Copilot AI commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

The dead-letter ToolStripMenuItem fields were renamed to drop the Shared prefix, 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, .Name assignments, and Click handler hookups to drop Shared from all six dead-letter menu item identifiers.
  • HandleQueueControl.cs: Renamed the six handler methods and updated field references in ShowAppropriateSharedDeadletterMenuItems to match.

Renames applied

Before After
saveSelectedSharedDeadletteredMessageToolStripMenuItem_Click saveSelectedDeadletteredMessageToolStripMenuItem_Click
saveSelectedSharedDeadletteredMessageBodyAsFileToolStripMenuItem_Click saveSelectedDeadletteredMessageBodyAsFileToolStripMenuItem_Click
saveSelectedSharedDeadletteredMessagesToolStripMenuItem_Click saveSelectedDeadletteredMessagesToolStripMenuItem_Click
saveSelectedSharedDeadletteredMessagesBodyAsFileToolStripMenuItem_Click saveSelectedDeadletteredMessagesBodyAsFileToolStripMenuItem_Click
deleteSelectedSharedDeadLetterMessageToolStripMenuItem_Click deleteSelectedDeadletterMessageToolStripMenuItem_Click
deleteSelectedSharedDeadLetterMessagesToolStripMenuItem_Click deleteSelectedDeadletterMessagesToolStripMenuItem_Click

No logic changes — pure rename refactor.

Copilot AI changed the title [WIP] Fix code based on review comment in PR #880 Rename dead-letter handler methods to match renamed field names (remove 'Shared') Jul 15, 2026
Copilot AI requested a review from ErikMogensen July 15, 2026 10:04
@ErikMogensen
ErikMogensen marked this pull request as ready for review July 15, 2026 10:14
Copilot AI review requested due to automatic review settings July 15, 2026 10:14

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.

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 ToolStripMenuItem fields in HandleQueueControl.Designer.cs to drop Shared, including their .Name values and Click hookups.
  • Renamed the six corresponding handler methods in HandleQueueControl.cs and updated visibility toggling in ShowAppropriateSharedDeadletterMenuItems.

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.

Repository owner deleted a comment from claude Bot Jul 17, 2026

@paolosalvatori paolosalvatori left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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:

  1. Guaranteed merge conflict with #880 (blocker for merge sequencing, not for the content): this branch is cut from main and edits the same lines of HandleQueueControl.Designer.cs that #880 also edits, with different content. Verified locally: merge #880 into main → clean; merging this branch afterwards → conflict in HandleQueueControl.Designer.cs (either order conflicts). Details in the inline comment.
  2. Scope vs. what #880's threads claim: a resolved thread on #880 says the ShowAppropriateSharedDeadletterMenuItems rename 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 once run 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);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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
paolosalvatori self-requested a review July 17, 2026 09:12

@paolosalvatori paolosalvatori left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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:

  1. Don't merge this yet, #880 goes first! This branch was cut from main, so it overlaps with #880 on the same lines of HandleQueueControl.Designer.cs. I tested it locally: whichever of the two lands second hits a merge conflict in that file.

  2. After #880 merges, rebase this branch and resolve the conflict carefully: keep this PR's renamed handler hookups (saveSelectedDeadlettered*_Click, deleteSelectedDeadletter*_Click) plus #880's sharedDeadletterContextMenuStrip → deadletterContextMenuStrip rename. 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.

  3. One scope question I'd like settled explicitly: on #880 you resolved the Copilot thread about ShowAppropriateSharedDeadletterMenuItems with "that's handled in #886" — but this diff doesn't actually rename that method, and the rest of the Shared family 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

@ErikMogensen
ErikMogensen merged commit 90b3f29 into main Jul 17, 2026
1 check passed
@ErikMogensen
ErikMogensen deleted the copilot/fix-review-comment-880 branch July 17, 2026 09:43
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.

4 participants