Repository navigation
Fix DevTools: show re-enable hint when 'Don't start DevTools' is selected - #1170
Akhil Gupta (akhil9tiet) wants to merge 13 commits into
Conversation
Updated toolbar.xaml to improve layout and styling of toolbar elements, including adjustments to button properties and visual states.
There was a problem hiding this comment.
🟡 Changes recommended
Selecting Off closes the menu containing the hint, leaving the instructions hidden until the user reopens it.
1 open issue
What changed in this PR
This PR addresses #1148 by adding visible instructions for re-enabling DevTools beneath the toolbar’s startup options.
Changes:
- Adds a hint with both configuration and launch commands.
- Shows the hint when the saved startup mode is Off.
- Adds source-contract checks for the hint text and visibility wiring.
| File | Description |
|---|---|
| src/winapp-devtools/test/toolbar-tests.cpp | Checks hint text and visibility wiring. |
| src/winapp-devtools/native/WinApp.DevTools.Native/xaml/toolbar.xaml | Adds the initially collapsed re-enable hint. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsOverlay.Toolbar.inc | Updates hint visibility with the startup selection. |
Review effort: Balanced
Zach Teutsch (zateutsch)
left a comment
There was a problem hiding this comment.
🤖 AI-generated review (winappcli pr-review skill) — verify before acting.
Users still don't see the hint when they pick "Don't start DevTools"
- What is wrong:
SetDefaultModecallsCloseToolbarMenu()beforeSetStartModeUi("off")makes the hint visible. The hint is inside that menu, so it is hidden as soon as it appears. - Show me: Open More and click "Don't start DevTools". The menu closes and no hint is shown. Expected: the re-enable line is visible. The hint only appears if the user reopens More during the same run. On later runs DevTools is off, so there is no toolbar, and
winapp runprints nothing about it (DefaultDevToolsLinereturns null for off). - Why it matters: The problem in #1148 is still there for anyone who picks the option and moves on.
- Smallest fix: In
OnStartOffClick, callToggleToolbarMenu(L"DevToolsMoreMenu", L"DevToolsProtoMore", L"DevToolsStartOff")afterSetDefaultMode("off"). This reopens the menu and sizes and places it with the hint showing. Only removingCloseToolbarMenu()would make the menu overlap the bar when the toolbar sits at the bottom. This matches the existing Copilot inline comment.
Optional: The new tests search the source for strings, so they pass even with this bug. A check that the hint's menu is still visible after clicking "Don't start DevTools" would catch it.
What was run: scripts\test-native-units.ps1 passed, including the two new toolbar checks. The live UI click path was not exercised.
Updated OnStartOffClick function to reopen the toolbar menu after setting the default mode to 'off'.
Fixed in 97b8b4a — OnStartOffClick now reopens the start-mode menu after SetDefaultMode("off") so the re-enable hint is visible, matching the suggested ToggleToolbarMenu call. One open question: on later runs DevTools is off so there is no toolbar/menu at all — |

What and why
Choosing Don't start DevTools in the toolbar's "WHEN THE APP STARTS" menu left no visible hint about how to turn DevTools back on — the only hint was a hover tooltip on the radio button. Now a short visible line appears under the start-mode options while "Don't start DevTools" is selected: "DevTools is off. To turn it back on, run
winapp config set run.devtools on, or launch withwinapp run . --devtools on."Fixes #1148
Before / after
Before: the "Don't start DevTools" radio's only hint was its hover tooltip ("Turn DevTools back on with: winapp config set run.devtools on").
After: a visible line under the three start-mode radios reads "DevTools is off. To turn it back on, run
winapp config set run.devtools on, or launch withwinapp run . --devtools on.", shown only while "Don't start DevTools" is selected. (No screenshot; the UI is Windows-only. The new contract checks in toolbar-tests.cpp assert the hint text and the visibility wiring.)Not tested / risks
Could not run the native UI on Linux. The two new toolbar-tests.cpp contract checks assert the hint text and visibility wiring; CI runs them on Windows.
Checklist