Repository navigation
fix(devserver): surface settings app failure reason - #23833
Conversation
|
Claude finished @agneszitte's task in 3m 40s —— View job Code ReviewTodo list:
SummaryVerdict: fix-first — 2 issues need addressing before this leaves draft. The feature intent is sound and the overall design is clean. Two issues require fixes; two minor suggestions improve consistency with the existing Issues (fix-first):
Suggestions (consistency):
Cross-cutting note: The feed-restore path ( |
There was a problem hiding this comment.
Pull request overview
This PR updates the Uno DevServer CLI so uno.devserver login (Settings app sign-in) can run during environment setup even when executed outside an Uno project (no global.json), by falling back to resolving/restoring uno.settings.devserver directly from NuGet caches/feeds. It also improves failure diagnostics when the Settings app exits early by surfacing stdout/stderr on the error line.
Changes:
- Add a project-less fallback that resolves
uno.settings.devserverfrom the NuGet cache (or restores it when missing) whenglobal.json/Uno SDK cannot be resolved. - Downgrade the “No global.json found…” log to Debug for the login/settings resolution path (since fallback now exists).
- Improve Settings app early-exit error reporting by including the app’s output as the reason.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Uno.UI.DevServer.Cli/Helpers/UnoToolsLocator.cs | Adds fallback resolution/restoration for uno.settings.devserver when no global.json is present; adjusts missing-global.json logging on the settings resolution path. |
| src/Uno.UI.DevServer.Cli/CliManager.cs | Surfaces Settings app stdout/stderr as the “reason” when the app exits early, instead of logging only an exit code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
carldebilly
left a comment
There was a problem hiding this comment.
Reviewed across security, architecture, robustness, operability, behavior-contract and quality dimensions. The feature is sound and in the right place: UnoToolsLocator already owns cache probing and restore, the cache-first fallback mirrors the established SDK-resolution flow, and the stderr/stdout surfacing in CliManager is a genuine diagnostics improvement. Approving to support the direction — this is a draft, and the inline comments (8 high, 7 medium, 1 low) should be addressed before undrafting, most importantly pinning the feed/version on the restore path and adding the planned tests.
Verified as safe:
- The error→debug downgrade is correctly scoped to the login path (
logMissingGlobalJsonAsErrordefaults totrue; every other caller keeps the error). - No public API surface is touched (both classes are
internal; the onlyInternalsVisibleToisUno.UI.DevServer.Cli.Tests, which has no test on this path today). - Nothing in the repo or docs asserts the old exit-1 "run from within a project" message.
- Concurrent logins are safe (GUID temp dirs + NuGet global-cache locking).
Additional low/info notes, not worth an inline thread each:
- The
uno.settings.devserverpackage-id literal is now repeated (lines 809, 870, plus pre-existing 904) — hoist a private const. - The fallback skips the normal path's
GetDotNetVersiongate, so the newest settings app may require a runtime the machine lacks; at least the new stderr capture will surface the failure. - The
Settings application exited with code {ExitCode}log template forks into two variants — anything keyed on the exact template will see new shapes. - The login exit-code contract intentionally flips outside a project (exit 1 + error → exit 0). Nothing asserts the old behavior, but it is an observable CLI behavior change — worth a line in the PR description rather than "Contains NO breaking changes".
- Style nits: the comment block at
CliManager.cs:364-367narrates prior behavior ("previously logged only at Debug…") — trim to the why;name.Split('-')[0]allocates an array andContains('-')re-scans the same string (useIndexOfonce +AsSpan); the new block mixes== null(line 302) withis null(line 309) — converge onis null.
autocarl
left a comment
There was a problem hiding this comment.
One additional diagnostics issue reproduced on the pinned head; see the inline comment.
autocarl
left a comment
There was a problem hiding this comment.
One additional security issue reproduced on the pinned head; see the inline comment.
|
|
4f6522a to
4ab8f19
Compare
|
Claude finished @agneszitte's task in 1m 58s —— View job Code ReviewTodo list:
SummaryVerdict: fix-first — 1 medium correctness issue; 1 style issue. The PR has been correctly scoped down to just the diagnostics improvement in Issues (2 inline comments posted):
Cross-cutting note — output buffer race (pre-existing in
|
4ab8f19 to
0de754b
Compare
|
Claude finished @agneszitte's task in 3m 14s —— View job Code ReviewTodo list:
SummaryVerdict: ship — 2 low-severity findings posted as inline comments; no blockers. Both issues from the previous review are resolved:
New findings (2 inline comments):
Cross-cutting note (pre-existing, not introduced here): |
|
Claude finished @agneszitte's task in 2m 33s —— View job Code ReviewTodo list:
SummaryVerdict: ship — 1 low/style finding; all prior issues resolved. What's resolved since the last review:
Remaining finding (1 inline comment posted):
Cross-cutting note (pre-existing, not introduced here): |
260519b to
7d51ec8
Compare
|
Claude finished @agneszitte's task in 2m 10s —— View job Code ReviewTodo list:
SummaryVerdict: ship — all prior issues resolved; 1 very-low nit posted as an inline comment. What's resolved since the last review:
Remaining finding (1 inline comment posted):
Cross-cutting note (pre-existing, not introduced here): |
When the sign-in ("Settings") app exits within the launch window, its own
message (e.g. "Another instance of this app is running") was logged only at
debug, so users saw a bare "Settings application exited with code 2" and assumed
a failure. Surface stderr/stdout as the reason on the error line.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
7d51ec8 to
c5eda05
Compare
|
Claude finished @agneszitte's task in 2m 7s —— View job Code ReviewTodo list:
SummaryVerdict: ship — all prior issues are resolved; no new findings. What's resolved since the last review:
No new findings. Code review by inspection:
Pre-existing cross-cutting note (unchanged from prior reviews): |
|
Claude finished @agneszitte's task in 2m 16s —— View job Code ReviewTodo list:
SummaryVerdict: ship — no new findings; all issues raised in prior review rounds are resolved. What was verified in this pass:
Pre-existing cross-cutting note (unchanged from prior reviews): |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23833/wasm-skia-net9/index.html |
|
Tick the box to add this pull request to the merge queue (same as
|
autocarl
left a comment
There was a problem hiding this comment.
Re-reviewed the exact current head c5eda0570b829c1b99bd01de2301a76ef22207d4. No material findings.
The earlier project-less package-resolution changes—and the associated security, restore, versioning, and operability concerns—are no longer in this PR. The remaining diagnostics-only change is correctly scoped and covered: the 6 targeted exit-reason cases pass, the DevServer CLI builds in Release with 0 warnings/errors, and the full CLI project yields 390/393 locally with the same three unrelated environment-specific failures reproduced on the exact base SHA. All hosted checks are passing and no current unresolved review thread remains.
morning4coffe-dev
left a comment
There was a problem hiding this comment.
The settings-process failure now exposes both diagnostic streams at the visible error level, while preserving the existing exit-code/result behavior. The helper has deterministic stdout/stderr ordering and handles whitespace-only and multiline output without turning process text into a logging format string. No WinUI runtime behavior is involved.
|
@Mergifyio backport servicing/6.8 release/stable/6.7 |
✅ Backports have been createdDetails
|
…r-23833 fix(devserver): surface settings app failure reason (backport #23833)
…6.7/pr-23833 fix(devserver): surface settings app failure reason (backport #23833)
GitHub Issue: Related to internal tracker unoplatform/uno.app-mcp#122
Closes https://github.com/unoplatform/uno.app-mcp/issues/122
PR Type:
🐞 Bugfix
What changed? 🚀
Scoped down per review (@carldebilly). This PR is now just the diagnostics fix.
When the sign‑in ("Settings") app exits within the launch window, its own message — e.g. "Another instance of this app is running" — was logged only at
Debug, so users saw a bareSettings application exited with code 2and assumed a failure. This surfaces the app'sstderr/stdoutas the reason on the error line.Dropped from this PR (superseded)
The earlier project‑less‑login fallback commit (cache‑scan / restore‑latest
uno.settings.devserverwhen noglobal.json) was removed. Per review, the right fix for project‑less login is not to rebuild theglobal.json → Uno.Sdk → packages.jsonresolution chain, but to publishUno.Settingsas a real dotnet tool from the licensing stack (it already ships as a self‑contained publish) so the CLI invokes it viadnx. That gives official NuGet acquisition/integrity/execution, version coherence by construction, and pinning/kill‑switch for free — and removes the hand‑rolled resolution entirely. That work is tracked on the licensing side; it is out of scope here.Validation
Uno.UI.DevServer.Clibuilds clean on current master.loginwith a sign‑in window already open now printsSettings application exited with code 2: Another instance of this app is running, exitinginstead of a bare exit code.PR Checklist ✅