Skip to content

0.9.5 snapshot#42

Merged
paodb merged 3 commits into
masterfrom
0.9.5-snapshot
Jul 14, 2026
Merged

0.9.5 snapshot#42
paodb merged 3 commits into
masterfrom
0.9.5-snapshot

Conversation

@javier-godoy

@javier-godoy javier-godoy commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Instrumented routes can now declare a parent RouterLayout to derive and instrument a layout chain.
    • If a route doesn’t already have an @Route, one is generated automatically, copying value/layout and applying the default registerAtStartup behavior.
    • Existing @Route annotations remain unchanged.
  • Bug Fixes

    • Improved runtime compatibility by avoiding unsupported reflective lookups on older versions and throwing a clearer error when required Jackson base support is unavailable.
  • Tests

    • Added InstrumentationViewInitializerTest to cover layout inheritance, annotation generation, and validation behavior.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Instrumented routes now support explicit layouts, generated @Route metadata, and instrumented @ParentLayout chains. Tests cover these behaviors. JSON type lookup adds version-aware handling and explicit failure reporting.

Changes

Route instrumentation

Layer / File(s) Summary
Route contract and bytecode generation
core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java, core/src/main/java/com/flowingcode/vaadin/jsonmigration/ClassInstrumentationUtil.java
InstrumentedRoute adds a layout() attribute, while ASM generation adds missing @Route metadata with the route value, layout, and registerAtStartup=false.
Parent layout route registration
core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializer.java
Route registration derives and instruments the @ParentLayout chain, validates component layouts, and passes the chain to setRoute.
Initializer validation and test coverage
tests-shared/src/test/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializerTest.java, tests-shared/pom.xml, tests-v25/pom.xml
Tests cover layout resolution, hierarchy traversal, invalid layouts, callable layouts, and generated or preserved @Route annotations; both test modules include the suite.

JSON compatibility handling

Layer / File(s) Summary
JSON type lookup fallback
core/src/main/java/com/flowingcode/vaadin/jsonmigration/JsonMigration.java
lookup_BaseJsonNode() returns null on Vaadin versions up to 24, and lookup_setPropertyJson() throws an explicit IllegalStateException when the required Jackson type is unavailable on newer versions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: mlopezfc, paodb

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic and only names a snapshot version, not the main change in the pull request. Use a concise title that describes the primary change, such as adding route instrumentation support for parent layouts.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 0.9.5-snapshot

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java (1)

54-54: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix invalid JavaDoc syntax.

The @see tag does not require the {@link ...} wrapper. Using both together results in malformed HTML in the generated documentation.

♻️ Proposed fix
-   * `@see` {`@link` Route#layout()} 
+   * `@see` Route#layout()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java`
at line 54, Update the JavaDoc `@see` reference in InstrumentedRoute to use valid
`@see` syntax without wrapping Route#layout() in an inline {`@link` ...} tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java`:
- Line 54: Update the JavaDoc `@see` reference in InstrumentedRoute to use valid
`@see` syntax without wrapping Route#layout() in an inline {`@link` ...} tag.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7606c4be-6a39-4795-a5a3-2bdaef5c8bdf

📥 Commits

Reviewing files that changed from the base of the PR and between 6d3cc11 and 13bf156.

📒 Files selected for processing (6)
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/ClassInstrumentationUtil.java
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializer.java
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java
  • tests-shared/pom.xml
  • tests-shared/src/test/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializerTest.java
  • tests-v25/pom.xml

@javier-godoy

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core/src/main/java/com/flowingcode/vaadin/jsonmigration/JsonMigration.java`:
- Around line 64-65: Update lookup_setPropertyJson() to detect when
lookup_BaseJsonNode() returns null before invoking Element.class.getMethod(...).
Preserve the controlled fallback or raise a clear error for the unavailable
BaseJsonNode state, rather than passing BASE_JSON_NODE into the Vaadin 25+
method lookup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1fbf31b6-7b93-4771-84bc-ea4ee07b4c1b

📥 Commits

Reviewing files that changed from the base of the PR and between 13bf156 and 5722b45.

📒 Files selected for processing (7)
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/ClassInstrumentationUtil.java
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializer.java
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/JsonMigration.java
  • tests-shared/pom.xml
  • tests-shared/src/test/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializerTest.java
  • tests-v25/pom.xml
🚧 Files skipped from review as they are similar to previous changes (4)
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializer.java
  • tests-shared/src/test/java/com/flowingcode/vaadin/jsonmigration/InstrumentationViewInitializerTest.java
  • tests-v25/pom.xml
  • core/src/main/java/com/flowingcode/vaadin/jsonmigration/InstrumentedRoute.java

Comment thread core/src/main/java/com/flowingcode/vaadin/jsonmigration/JsonMigration.java Outdated
@javier-godoy
javier-godoy requested review from paodb and scardanzan July 14, 2026 17:16
@javier-godoy
javier-godoy marked this pull request as ready for review July 14, 2026 17:16
@paodb
paodb merged commit 9669a4c into master Jul 14, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Jul 14, 2026
@paodb
paodb deleted the 0.9.5-snapshot branch July 14, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

2 participants