Skip to content

fix(setup): setup failure details cannot be selected or copied - #1918

Merged
shanselman merged 1 commit into
openclaw:mainfrom
larroy:fix/setup-error-text-copyable
Oct 29, 2026
Merged

shanselman merged 1 commit into
openclaw:mainfrom
larroy:fix/setup-error-text-copyable

Conversation

@larroy

@larroy larroy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: when setup fails (for example a WSL Gateway install-cli step failing with npm errors), the error text on the "Setup failed" screen can't be selected or copied.

User Impact

User impact: users can select the setup failure details (and Local AI diagnostics in the same card) and copy them with Ctrl+C or the right-click menu, so they can paste them into bug reports.

Why This Change Was Made

The error card showed its text in TextBlocks without selection enabled. This change enables selection on both text blocks in the card, matching the other setup pages that show diagnostic text. Every setup failure route ends on this page.

Evidence

  • A UI test drives a real SetupWindow to the failure page, selects all the error text, and checks that the selected text matches the displayed text. It failed before the fix (selection disabled) and passes after it, in Light and Dark themes.
  • The rendered failure card looks the same as before (checked in the test's capture frames).

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

Required proof pools

  • none: a XAML attribute change on one setup page, covered by an automated UI test in OpenClaw.Tray.UITests; it doesn't need capacity-dependent custom Windows proof.

Validation

All runs were on Windows ARM64 (win-arm64):

  • ./build.ps1: all builds succeeded.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore (with OPENCLAW_REPO_ROOT set): 4808 passed, 24 skipped, 0 failed. Without OPENCLAW_REPO_ROOT, 5 MXC tests failed because they resolve installer.iss and the test host under bin\; that is unrelated to this change.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 4754 passed, 0 failed.
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-arm64 --filter "FullyQualifiedName~SetupWindowMinimumSizeTests.NativePresenter_ClampsBelowMinimumAndDetachesOnConfigurationErrorClose" (isolated OPENCLAW_TRAY_* dirs): before the fix, 2 failed (IsTextSelectionEnabled was False). After the fix, 2 passed.

Real Behavior Proof

  • Environment tested: Windows 11 ARM64 (10.0.28000), Debug build, isolated tray data dirs.
  • PR head or commit tested: the same source as 16a7af6 (run on the uncommitted working tree before committing; the diff is identical).
  • Exact steps or command run: the focused UI test command above. It opens SetupWindow with an invalid config, which navigates to the "Setup failed" CompletePage.
  • Evidence after fix: ErrorText.IsTextSelectionEnabled == true; after SelectAll(), SelectedText equals the displayed error text, in Light and Dark.
  • Observed result: the failure text is selectable and the layout is unchanged.
  • Verified that the text can be copied during a failure by hand.

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:

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:

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.

Enable text selection on the CompletePage error card (step error and Local AI diagnostics) so users can copy failure output such as npm errors. Adds a UI regression assertion on the configuration-error failure page.
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

Enables selection and copying of setup failure text and Local AI diagnostics, with a mounted UI regression assertion.

Example: Setup displays an install-cli failure containing npm errors.

  • Before: The displayed failure details cannot be selected for copying into a report.
  • After: Users can select the failure details and copy them using the standard text controls.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source-correct with meaningful mounted coverage, but the required visible UI proof is not supplied.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users cannot select setup failure details to copy them into support requests.
Reason: The collaborator-authored change restores a useful diagnostic interaction already supported by other setup pages without changing setup decisions.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current, source-confirmed usability bug with a minimal change, and no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 16a7af6fbd8a641c467fe6fe9dda4aef9d804f46

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide current-head visible evidence of selecting and copying failure text into another application; the reported baseline failure and fixed UI pass cover programmatic selection, not the clipboard interaction.
Agent review details

How this fits together

SetupWindow routes failures to CompletePage, which renders the supplied error message and optional Local AI diagnostics in its existing error card.

flowchart TD
    A[Setup failure] --> B[CompletePageArgs]
    B --> C[CompletePage]
    C --> D[Error text]
    C --> E[Local AI diagnostics]
    D --> F[Native text selection and copy]
    E --> F
Loading

Technical review

Best possible solution:

Keep the existing completion-page owner and enable native selection on both diagnostic text blocks while preserving their content and layout.

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

Main renders both diagnostic fields without selection enabled, while the PR reports the mounted selection assertion failing before the fix and passing afterward; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete fix: the defect is disabled native text selection, the invariant is unchanged diagnostic content and presentation, and two attributes restore selection without adding another owner or clipboard path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1912df7e2f97.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Pedro Larroy: Raw commit 91837de adds src/OpenClaw.SetupEngine.UI/Pages/CompletePage.xaml:119 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91837de0cc18; files: src/OpenClaw.SetupEngine.UI/Pages/CompletePage.xaml)

Review metrics

Metric Value Why it matters
Focused change size Production +2/-2 lines; tests +6/-0 lines Both attributes serve the reported defect, and coverage reuses the existing mounted failure-page fixture.

Labels

Label changes:

  • add P2: The bug obstructs copying failure details for support, with limited scope and existing log links; it does not itself cause setup to fail.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The bug obstructs copying failure details for support, with limited scope and existing log links; it does not itself cause setup to fail.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Attach current-head visible evidence showing failure text selected and copied into another application, redacting sensitive details.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 29, 2026, 5:39 PM ET / 21:39 UTC.

@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 29, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

Copilot triage agent landing assessment for head 16a7af6: direct review confirms two selection attributes and a focused regression assertion only. Required CI Gate is successful; complete thread inventory is empty.

Independent local x64 closeout: full build passed; Shared 4,808 passed with 24 existing opt-in skips; Tray 4,754 passed; focused mounted Light/Dark configuration-error cases 2 passed, 0 skipped. Native production controls were additionally exercised through external computer-use in an isolated scratch host, with matching built SetupEngine.UI DLL identity. Both fields were visibly selected in both themes. Clipboard equality passed for ErrorText in Light (272/272) and optional diagnostics in both themes (88/88). ErrorText clipboard equality in Dark remains unverified: the receipt mismatched during shared clipboard activity, and safe input dispatch later refused a retry. This is not recorded as successful Dark clipboard proof or as an established product defect. No installed-app or Gateway runtime claim is made.

The focused test has no NativeOnboardingProof category or opt-in. Its automated render captures are RenderTargetBitmap artifacts, separate from the computer-use captures. The narrow, theme-independent selection change is safe to land with the explicit clipboard limitation above. No check bypass or source adjustment was used.

@shanselman
shanselman merged commit 4cbbe51 into openclaw:main Oct 29, 2026
34 checks passed
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 29, 2026
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 30, 2026
…law#1918)

Enable text selection on the CompletePage error card (step error and Local AI diagnostics) so users can copy failure output such as npm errors. Adds a UI regression assertion on the configuration-error failure page.
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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

2 participants