Skip to content

refactor(tray): remove two unused tray menu helpers (~240 lines) - #251

Merged
shanselman merged 2 commits into
openclaw:masterfrom
AlexAlves87:refactor/remove-dead-tray-menu
May 1, 2026
Merged

refactor(tray): remove two unused tray menu helpers (~240 lines)#251
shanselman merged 2 commits into
openclaw:masterfrom
AlexAlves87:refactor/remove-dead-tray-menu

Conversation

@AlexAlves87

Copy link
Copy Markdown
Contributor

Summary

This PR removes two legacy tray-menu helpers from App.xaml.cs that no longer appear to participate in the active tray menu flow.

The current tray menu path goes through ShowTrayMenuPopup() / BuildTrayMenuPopup(TrayMenuWindow) / TrayMenuWindow, not the older MenuFlyout-based helpers.

Changes

  • remove unused BuildTrayMenuFlyout()
  • remove legacy unused BuildTrayMenu(MenuFlyout)

Testing

  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore

Notes

  • I split this into two commits on purpose.
  • The BuildTrayMenuFlyout() removal is the straightforward dead-code cleanup.
  • The legacy BuildTrayMenu(MenuFlyout) path also looks unused, but it had an explicit "kept for reference" comment in the file.
  • Keeping that removal separate makes it easy to take the clearly dead helper while leaving the legacy reference method in place if you still want that history preserved in-tree.

@github-actions github-actions Bot mentioned this pull request May 1, 2026
23 tasks
AlexAlves87 and others added 2 commits May 1, 2026 10:05
Method was never called. Active tray menu is driven by
BuildTrayMenuPopup(TrayMenuWindow) via ShowTrayMenuPopup().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Method was explicitly marked "for reference" in a comment but never
called. BuildTrayMenuPopup(TrayMenuWindow) is the active implementation.
Removes the comment and the entire method body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shanselman

Copy link
Copy Markdown
Collaborator

Thanks @AlexAlves87! This dead-code cleanup looks good. I rebased the PR onto current master and kept the tray-menu helper removals, while dropping the unrelated internal .gitignore entries so the upstream diff stays focused.

@shanselman
shanselman force-pushed the refactor/remove-dead-tray-menu branch from 2ec2db7 to f3ceeda Compare May 1, 2026 17:07
@shanselman
shanselman merged commit 72ffc78 into openclaw:master May 1, 2026
8 checks passed
@AlexAlves87

Copy link
Copy Markdown
Contributor Author

@shanselman — thanks again for cleaning up the diff here.

I found the same .gitignore spillover on #244 and have cleaned that up there as well, so both PRs should now be limited to their actual changes.

Sorry again for the extra noise.

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.

2 participants