Repository navigation
Try it: edit and run every documentation snippet in place - #6054
Conversation
Every Java snippet in the developer guide, the API reference and blog posts gets a "Try it" button that swaps the block for the Playground in inline mode (editor + live preview), loaded only on click. One frame serves the page; later snippets are posted to it instead of rebooting the VM. - Playground ?mode=inline: compact layout, Reset, no saved-state writes; host page messaging through WebsiteThemeNative. - Auto-import of names exactly one API class answers to; top-level fields with an access modifier or static in script mode. - Server code (role=cn1-no-try, backend reference) gets no button. - scripts/check-doc-snippets.py + baseline ratchet + workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce85c32dd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Cloudflare Preview
|
|
Compared 206 screenshots: 206 matched. |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
|
Compared 170 screenshots: 170 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
- check-doc-snippets.py builds the Playground through its reactor (-pl common -am install) so the cn1lib siblings exist on a fresh runner. - The check also covers the CLDC API sources and undelimited include-only source blocks, and stale baseline entries now fail. - Script fields may carry annotations. - Inline results carry a request id, so a stale result never lands on a newer snippet; failures are labelled neutrally. - The frame takes code only from a same-origin parent; backend imports in blog snippets get no button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7398b7333
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
|
- check-doc-snippets.py extracts the blog's Java fences, skipping the ones the runner skips (cn1-no-try, backend imports); 307 existing ones join the baseline. - The workflow runs when any tree the guide includes Java from changes. - Standard Codename One headers on the eight playground and javadoc files this PR touches that had none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19866d9f07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…d-compat tests - Script fields: transient and volatile mark a member as a field, like an access modifier or static. - check-doc-snippets.py skips com.codename1.impl, which the javadoc build never publishes; two baseline entries go with it. - generate_developer_guide.rb: note that Hugo applies fence attributes with its default configuration (measured), so hugo.toml needs no change. - android-compat tests: cleanDisplay resets dark mode AND refreshes the cached configuration, and AutoCancelReleaseTest starts the display it needs. Both failed or passed with the order the classes ran in (build-linux-jdk8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Focusing the hidden text-input textarea let the browser scroll it into view, which scrolls every scrollable ancestor -- including the host page when the app runs in an iframe. In the documentation's inline Playground a double click in the editor threw the page hundreds of pixels down in Firefox. The JSO bridge now focuses with preventScroll, as does the clipboard fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: Intel64 Family 6 Model 173 Stepping 1, GenuineIntel (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: INTEL(R) XEON(R) PLATINUM 8573C (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 168 screenshots: 168 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
After b.getAllStyles(). the editor offered global names: it only recognized a bare identifier before the dot. The receiver is now read as a chain -- a variable, global, type, constructor call or string literal, then any number of .field and .method(args) steps -- each typed from the API's class files (return and field types, overloads told apart by argument count). A member position whose receiver cannot be typed offers nothing instead of unrelated names. PlaygroundCompletionHarness covers it and runs in the smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Savor implementor's guide, new on master, includes nine blocks from scripts/savor/backend -- server code the browser Playground cannot run. Marked cn1-no-try like Wayline's backend blocks, and scripts/savor joins the snippet workflow's paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JUnit extension applied @DarkMode and never put it back, so CodenameOneExtensionTest.darkModeEnabled left the rest of the JVM dark and OtpFieldRenderingTest's ink measurements inverted. LocalContinuityTest inherited a catch-all route dispatcher from earlier classes, so an unregistered route restored successfully. Both fail master's CI depending on test order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 12 screenshots: 12 matched. |
…ay in the editor test Backend-Web.asciidoc gained a backend include without the cn1-no-try role. CodeEditorInteractionTest built Components without initializing Display and passed only when another class ran first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Java snippet in the developer guide, the API reference and blog posts gets a Try it button. It replaces the static block with the Playground in inline mode -- the editor holding the snippet plus a live preview -- so a reader can change the code and watch it run where they read it. Nothing of the Playground loads until the first click.
Changes
docs/website/static/js/cn1-snippet-runner.js, loaded on guide, javadoc and blog pages. One frame serves the whole page; opening another snippet posts the code to the running frame (about 1 s) instead of booting a second VM (about 3.6 s).javadoc-highlight-init.jsdelegates to it on the site and keeps the plain link in the offline javadocs.zip.?mode=inline: compact editor/preview split with a Reset button. It does not read or write the reader's saved Playground state. Run results and an edited-code URL are posted to the page throughWebsiteThemeNative.staticbecome script fields.role=cn1-no-try(backend chapters, includes frombackend/src) and the backend API reference.generate_developer_guide.rbcarries the role to the fence.scripts/check-doc-snippets.pycompiles every snippet the way the frame does. Snippets that do not run are listed inscripts/doc-snippet-baseline.txt(887 of 1506; 619 run as written, up from 228). New workflowcheck-doc-snippets.yml.Verification
JavaCompilerConformanceTest7/7 and the guide generator tests pass.🤖 Generated with Claude Code