Skip to content

fix: search shows command titles after selection#1061

Open
bkudiess wants to merge 1 commit into
openclaw:mainfrom
bkudiess:bkudiess-fix-search-command-labels
Open

fix: search shows command titles after selection#1061
bkudiess wants to merge 1 commit into
openclaw:mainfrom
bkudiess:bkudiess-fix-search-command-labels

Conversation

@bkudiess

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where users choosing a command from the OpenClaw Windows Companion search could see OpenClawTray.Windows.CommandItem in the search box instead of the command title.

Why This Change Was Made

The shell search now explicitly projects each command's title into the AutoSuggestBox selected text. CommandItem also uses its title as its fallback string representation so visual selection and accessibility names cannot expose the CLR type name.

User Impact

Search results and selected commands now consistently show labels such as Go to Connection. Object type names no longer appear in the search box or suggestion accessibility tree.

Evidence

An isolated A/B run reproduced the reported symptom on the base commit and verified the current head:

Behavior Base acf4ab1d Current 3040f6a1
Suggestion accessibility name OpenClawTray.Windows.CommandItem Go to Connection
Search text after invocation OpenClawTray.Windows.CommandItem Empty, as intended
CLR type leaked Yes No

The baseline screenshot reproduced the original screenshot symptom. The current-head isolated run showed the visible Go to Connection result, and UI Automation reported typeNameLeaked=False.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

  • ./build.ps1: passed
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 3,221 passed, 31 skipped, 0 failed
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 1,956 passed, 0 skipped, 0 failed
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~HubWindow_TitleSearchBox_ProjectsCommandTitles": 1 passed
  • git diff --check: passed
  • Rubber-duck review: no confirmed defects
  • Dual independent review with Claude Opus and GPT Codex: no findings from either model
  • Bundled structured autoreview: blocked before review by local Codex authentication (401 Unauthorized); no autoreview result was produced

Real Behavior Proof

  • Environment tested: Windows 11, isolated side-by-side Dev app identity and tray data directory
  • PR head or commit tested: 3040f6a1d06985e0fe37bbccc0450590e9c48c52
  • Exact steps or command run: built baseline and current-head Dev identities, launched openclaw-dev://hub/connection, set the title search query to connection through UI Automation, inspected the matching suggestion, then invoked it
  • Evidence after fix: suggestionName=Go to Connection, afterInvoke=, typeNameLeaked=False
  • Observed result: the command title is exposed visually and through UI Automation; invocation clears the search box without showing a CLR type name
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A; copied live UI Automation output is included above
  • Not verified or blocked: screenshot proof displayed an unrelated local MCP port 8765 collision because another Companion instance owned the port; search behavior remained fully testable

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): No
  • New or changed network calls? (Yes/No): No
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Project command titles into the shell AutoSuggestBox and use them as the fallback string representation so CLR type names do not leak into selected text or accessibility names.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed July 27, 2026, 4:08 AM ET / 08:08 UTC.

ClawSweeper review

What this changes

The PR configures the Companion title search to use command titles for selected suggestion text and accessibility, while making a command item's fallback string its title.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for collaborator review. The supplied diff is a narrow, well-proven fix for a real tray-search label leak; the only actionable concern is a new inline code comment that conflicts with the repository policy.

Priority: P2
Reviewed head: 3040f6a1d06985e0fe37bbccc0450590e9c48c52

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and has direct after-fix UI Automation evidence, with one low-risk repository-policy cleanup remaining.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.
Evidence reviewed 5 items PR diff: The branch adds TextMemberPath="Title" to the title-search AutoSuggestBox and changes the command item's fallback string to its Title, directly addressing the reported type-name display.
Regression contract: The branch adds a tray contract test that asserts both the title projection and fallback string behavior.
Reported real-behavior proof: The PR body records an isolated Windows 11 A/B UI Automation run against base acf4ab1d and current head 3040f6a1, reporting suggestionName=Go to Connection and typeNameLeaked=False after the change.
Findings 1 actionable finding [P3] Remove the unrequested inline comment
Security None None.

How this fits together

The Windows Companion Hub window exposes navigation commands through an AutoSuggestBox search surface. Command items feed the suggestion list, and the chosen item routes users to a tray settings page or other Companion destination.

flowchart LR
  A[User enters a title search] --> B[Hub command search]
  B --> C[Command suggestions]
  C --> D[Title projection]
  D --> E[Accessible selected label]
  E --> F[Command navigation]
Loading

Before merge

  • Remove the unrequested inline comment (P3) - The repository policy prohibits new inline code comments unless explicitly requested. The new comment is explanatory rather than required for correctness, so remove it and let the focused contract test preserve the intent.
  • Resolve merge risk (P1) - Independent local source-history and surrounding-handler inspection was blocked by the read-only shell sandbox, so a current-main ownership trail could not be verified beyond the supplied PR metadata.

Findings

  • [P3] Remove the unrequested inline comment — src/OpenClaw.Tray.WinUI/Windows/CommandPaletteDialog.xaml.cs:104
Agent review details

Security

None.

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the explicit title projection and fallback string behavior, retain the focused regression contract and UI Automation proof, and remove the policy-disallowed explanatory inline comment before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the explicit title projection and fallback string behavior, retain the focused regression contract and UI Automation proof, and remove the policy-disallowed explanatory inline comment before merge.

Do we have a high-confidence way to reproduce the issue?

Yes. The PR supplies a concrete isolated Windows 11 UI Automation A/B path on the current base that observed the CLR type name before the fix and the command title at the PR head.

Is this the best way to solve the issue?

Yes, with a minor policy cleanup. Explicitly selecting the Title member and using Title as the fallback string fixes both selected-text and accessibility-name paths without adding configuration or a parallel behavior.

Full review comments:

  • [P3] Remove the unrequested inline comment — src/OpenClaw.Tray.WinUI/Windows/CommandPaletteDialog.xaml.cs:104
    The repository policy prohibits new inline code comments unless explicitly requested. The new comment is explanatory rather than required for correctness, so remove it and let the focused contract test preserve the intent.
    Confidence: 0.96

Overall correctness: patch is correct
Overall confidence: 0.78

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against acf4ab1d2b02.

Labels

Label changes:

  • add P2: This fixes a bounded but user-visible Companion search and accessibility-label defect.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.

Label justifications:

  • P2: This fixes a bounded but user-visible Companion search and accessibility-label defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes a current-head, isolated Windows UI Automation A/B run that demonstrates the changed suggestion accessibility name and confirms the CLR type-name leak is absent after the fix.

Evidence

Acceptance criteria:

  • [P1] ./build.ps1.
  • [P1] dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~HubWindow_TitleSearchBox_ProjectsCommandTitles".

What I checked:

  • PR diff: The branch adds TextMemberPath="Title" to the title-search AutoSuggestBox and changes the command item's fallback string to its Title, directly addressing the reported type-name display. (src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml:95, 3040f6a1d069)
  • Regression contract: The branch adds a tray contract test that asserts both the title projection and fallback string behavior. (tests/OpenClaw.Tray.Tests/DiagnosticsPageContractTests.cs:457, 3040f6a1d069)
  • Reported real-behavior proof: The PR body records an isolated Windows 11 A/B UI Automation run against base acf4ab1d and current head 3040f6a1, reporting suggestionName=Go to Connection and typeNameLeaked=False after the change. (3040f6a1d069)
  • Repository policy: The supplied full AGENTS.md requires tray UX proof and prohibits adding inline comments unless explicitly requested. The PR includes focused UI Automation proof and required validation results, but adds one new inline source comment. (AGENTS.md, acf4ab1d2b02)
  • History inspection limitation: The read-only shell failed before repository commands could run because its sandbox could not create a loopback address, so current-main feature-history ownership could not be independently established in this review.

Likely related people:

  • bkudiess: Submitted this focused tray-search fix and supplied the current-head A/B UI Automation evidence; no independent current-main ownership history could be read because the review shell was blocked. (role: active tray change contributor; confidence: low; commits: 3040f6a1d069; files: src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml, src/OpenClaw.Tray.WinUI/Windows/CommandPaletteDialog.xaml.cs, tests/OpenClaw.Tray.Tests/DiagnosticsPageContractTests.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Remove the added inline source comment, then retain the reported focused tray-test and UI Automation proof.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant