Skip to content

Ibarakov/xmlns per namespace - #15

Merged
onlyexeption merged 5 commits into
ibarakov/palette-recolor-guidancefrom
ibarakov/xmlns-per-namespace
Oct 20, 2026
Merged

onlyexeption merged 5 commits into
ibarakov/palette-recolor-guidancefrom
ibarakov/xmlns-per-namespace

Conversation

@onlyexeption

Copy link
Copy Markdown
Collaborator

Summary

Fixes the API data the MCP hands to agents: wrong xmlns, missing members, wrong inheritance, and internal classes listed as usable. Stacked on #13; merge #13 first.

Changes

  • xmlns per type, not per DLL. The type extractor resolves each type's xmlns with System.Xaml's XamlSchemaContext over the DLLs' own XmlnsDefinition/XmlnsPrefix attributes, replacing the hand-typed ASSEMBLY_XMLNS table. Falls back to clr-namespace: where no Infragistics xmlns applies; nested classes get Outer+Inner. Official prefixes (igOutlookBar, igReporting).
  • Theme classes show their styles. Generic base classes are now linked and static properties read, so DataPresenterRoyalDark.CellValuePresenter etc. appear (1 → 63 members).
  • Keys and commands are listed with the properties, marked (static field): DataPresenterCommands 0 → 71, DockManagerBrushKeys 0 → 130.
  • Inheritance keyed by assembly + full name. Same-named classes no longer overwrite each other (the chart Axis showed members of the Excel ChartObject).
  • No more escaped type names. type-info.json strings are decoded (Action\u003CToolCommand\u003E → Action<ToolCommand>), with a build guard against regressions.
  • Internal classes are no longer indexed. 6,907 → 5,343 pages, list_wpf_components 191 → 189; 89 names an internal class used to win now document the public class.

Results

Before After
Public types with a wrong xmlns 1,984 0
list_wpf_components entries with a wrong xmlns 18 (XamTabControl, XamPager…) 0
Pages with a wrong base / foreign inherited members 488 / 190 0 / 0
Pages with escaped type names 474 0
Internal-class pages 1,653 0

Verification

  • xmlns: System.Xaml resolver on all 5,180 public types: every one resolves to the exact class.
  • Real WPF build: 308 sampled XAML files using the generated xmlns compile. The same sample with the old xmlns fails 130 files.
  • Reflection: inheritance checked on all 5,312 public pages, and the internal-class list cross-checked independently. No public page removed.
  • Gates: all pass (C# and TS smoke tests, typecheck, pack, validate:package). New smoke checks fail on the old build and pass on the new one.

Notes

  • validate:package minimum lowered from 6,000 to 5,000 API files (5,343 now).
  • Doc counts updated: "5,300+ public types", "189 controls".
  • CLAUDE.md / DEVELOPMENT.md describe the new extractor output (__xaml, __baseTypes, __nonPublicTypes).

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The escaped-type-name regression guard accepts malformed data instead of failing the build.

1 open issue
What changed in this PR

Corrects generated API data so the WPF MCP server provides more accurate namespaces and public member references.

Changes:

  • Resolves namespaces per type and inheritance by assembly-qualified name.
  • Includes static styles, keys, and commands while excluding internal types.
  • Updates runtime formatting, smoke checks, validation thresholds, and documentation.
File Description
server/​Tools/​ToolDescriptions.cs Explains namespace and static-field usage.
server/​Tools/​ComponentTools.cs Displays static fields and nested XAML names.
server/​README.md Updates public-type counts.
server/​Data/​Models.cs Adds field and nested-type metadata.
scripts/​validate-package.ts Adjusts the minimum API file count.
scripts/​type-extractor/​Program.cs Extracts namespaces, inheritance, fields, and visibility.
scripts/​smoke-test.ts Adds API-data regression checks.
scripts/​build-api.ts Consumes metadata and filters internal types.
README.md Updates type and control counts.
DEVELOPMENT.md Documents extraction behavior and measurements.
CLAUDE.md Updates data-pipeline guidance.

Review effort: Balanced

Comment thread scripts/build-api.ts Resolved
onlyexeption and others added 2 commits October 20, 2026 21:44
…me-resource-paging

feat(theme): page large theme files and find entries instead of cutting
Updated regex to correctly match escaped Unicode sequences in JSON strings.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@onlyexeption
onlyexeption merged commit 237e2df into ibarakov/palette-recolor-guidance Oct 20, 2026
@onlyexeption
onlyexeption deleted the ibarakov/xmlns-per-namespace branch October 20, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants