Repository navigation
Developer experience: semantic tree, headless workflow and dotnet cui doctor - #22
Merged
Merged
Conversation
- add --size and a png-only --sizes matrix to dotnet cui - add --env and --state, with CUISHARP_VIEWPORT and CUISHARP_STATE_HOME in the app - make find and click refuse equally ranked controls; record icon-button tooltips - document MarkReady/--wait, viewport, state and strict matching - move the samples' state under CUISHARP_STATE_HOME - regenerate the bindings, API catalog and public-surface baseline
- remove Windows-only gates from the new headless tests - reveal downloads with explorer, open -R or xdg-open - replace stock's WinHttpHandler with SocketsHttpHandler - document platform-neutral app and publish paths - keep music Windows-only for WinRT MediaPlayer
- add session --script for shells without input redirection - add doctor: tool/app versions, package pinning, icon and AOT checks - rename the generated HttpMethod enum to HttpVerb - document token alpha, Size introspection, Card vs Box and FilePicker - keep every new path cross-platform and regenerate the bindings/docs
- record role, name, value, state and automation id on every node - add ui.Automation and make ui.Id/Keyed supply stable automation ids - capture text, numeric and toggle values in generated wrappers without frame allocations - add tree --details and find/click --role, --value and --id - project the tree with SemanticNode.ToAccessibility for future platform adapters
Fix the defects found while reviewing the developer-experience branch, and bring the docs back in step with the code. Semantics and recording: - A path query keeps its role and value at the leaf, and a path step only matches a container, so `role:button card > Delete` resolves. - `id:` ranks an explicit automation id above a text fallback and an actionable control above its container or a static label in the same scope, and `FindUnique` refuses two controls that rank equally there. - `ui.Input`/`TextArea`/`Search` record ReadOnly; `TagInput`, `OtpInput` and `FilterBar` record their value; `Describe` escapes newlines so `tree --details` stays one line per node. - Closing an `AutomationScope` is a scope leak the analyzer reports, and `ui.Automation` is not treated as a row id. - Role and static-widget tables cover the remaining wrappers. Live attach and the window thread: - The message-window class is registered once under the static gate, and the resize hook's table is concurrent, so two windows cannot race. - `FindCuiWindow` hands its result through lparam instead of a shared static, which clobbered a parallel window's handle. - Live `find`/`click` use the same strict disambiguation as the headless loop. - Window tests that touch process-wide state share one collection. Headless workflow and tool: - `CUISHARP_VIEWPORT` is range-checked and applied inside the loop, and `--size` and `--sizes` stay distinct so one viewport still names the file after it; a matrix builds the project once. - A blank find/click query is a usage error, an env key starts with a letter or `_`, and `--state` wins over `--env`. - `doctor --strict --json` reports ok:false when a warning fails the run. - An allocation test takes the median of five batches. Docs: - llms.txt, SKILL.md's contents, the docs index and live-debugging topic, the template README/AGENTS.md, and the README version example match the current API and grammar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the developer-experience work landed across five commits onto
main. The theme is a driver that can see and trust what an app renders: the semantic tree now carries roles, values, state and automation ids, the headless workflow can name a viewport, isolate app state and refuse ambiguous matches, anddotnet cui doctorreports the setup problems that would otherwise surface as a confusing failure.Highlights
Semantic tree
Role,Name,Value,SemanticStateandAutomationId.ui.Idandui.Automationname a control independently of its label;SemanticNode.ToAccessibility()is the projection an accessibility adapter will consume.tree --detailsprints the metadata, andfind/clickaccept--role,--valueand--id.id:ranks a real automation id above a text fallback and an actionable control above its own container or a static label in the same scope; a genuine tie is refused instead of guessed.a > b) matches containers only, and the leaf keeps its role and value, sorole:button card > Deleteresolves.ui.Input/TextArea/SearchrecordReadOnly;TagInput,OtpInputandFilterBarrecord their value.Headless workflow
png --sizenames one viewport and--sizesbuilds a matrix, with the project built once per matrix.--envadds environment,--statepoints at an isolated app-state root, andCUISHARP_VIEWPORTmakes a headless frame the requested size (range-checked, applied insideHeadlessLoop).find/clickquery is a usage error, an env key must start with a letter or_, and--statewins over--env.ui.MarkReady()with--wait readyreplaces frame counting for async data.dotnet cui doctor#:package CuiSharp@*, a missingApplicationIcon, and whether NativeAOT is configured.--jsonis machine-readable,--strictfails on warnings, and--strict --jsonhonestly reports"ok": false.--aotperforms the Release publish of an app withPublishAotand reports its IL2xxx/IL3xxx warnings.Hardening
FindCuiWindowpasses its result throughlparaminstead of a shared static that clobbered a parallel window's handle.find/clickuse the same strict disambiguation as the headless loop.ProcessWindowStatecollection.ClosinganAutomationScopeis reported as a scope leak;ui.Automationis no longer treated as a row id by the analyzer.Renames and behaviour changes
HttpMethodis nowHttpVerb, since the old name collided withSystem.Net.Http.HttpMethod.Color.WithAlphaon a theme token returns the token unchanged; useui.TokenColor(...).WithAlpha(...)for a translucent tint.Color.IsTokennow checks the whole token marker.music.csstays Windows-only because of WinRTMediaPlayer.SizegainedIsFit,IsFill,IsFixed,IsPercent,TryGetPoints,TryGetPercentand a readableToString.Docs
CHANGELOG.md,README.md,samples/README.md,docs/ARCHITECTURE.md,docs/API-SURFACE.txt,skills/cui-dotnet/SKILL.md,llms.txtand the generated API docs all moved with the code, and the template'sREADME.md/AGENTS.mddescribe the same workflow.Verification
dotnet build CuiSharp.slnx -c Release -warnaserrordotnet test CuiSharp.slnx -c Release— 1039 + 37 testsdotnet format CuiSharp.slnx --verify-no-changespwsh tools/regen.ps1 -NoNative -NoDiff— generated output is freshpwsh tools/verify-template.ps1—dotnet new→ build → test → AOT →dotnet cui, end to end