Skip to content

Add simple-name class lookup and input normalization; extend smoke tests for implicit UI types#4662

Closed
liannacasper wants to merge 5 commits intomasterfrom
codex/fix-playground-component-recognition-error-7ongms
Closed

Add simple-name class lookup and input normalization; extend smoke tests for implicit UI types#4662
liannacasper wants to merge 5 commits intomasterfrom
codex/fix-playground-component-recognition-error-7ongms

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Improve robustness of runtime class lookup by allowing simple (unqualified) names and string forms like class Foo or trailing .class to resolve to indexed classes.
  • Ensure core UI types can be resolved by the playground runtime without requiring explicit imports, and catch regressions with a smoke test.

Description

  • Introduced a secondary index SIMPLE_CLASS_INDEX built by buildSimpleClassIndex() that maps simple class names to Class<?> entries.
  • Enhanced findClass(String) to normalize input via normalizeClassName(String) and to fall back to SIMPLE_CLASS_INDEX when a fully-qualified lookup in CLASS_INDEX fails.
  • Implemented normalizeClassName to trim input and strip leading class and trailing .class tokens.
  • Added smoke test smokeCoreUiTypesResolveWithoutExplicitImport() to PlaygroundSmokeHarness and added additional require checks for various Component lookup forms in smokeGeneratedRegistry().

Testing

  • Ran the playground unit smoke harness PlaygroundSmokeHarness and the modified smoke tests passed.
  • Compiled and ran the project unit test suite including the updated tests, and all executed tests succeeded.

Codex Task

@github-actions
Copy link
Copy Markdown

Cloudflare Preview

@github-actions
Copy link
Copy Markdown

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant