Skip to content

Conversation

@javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Jan 26, 2026

Close #104
Close #105

Summary by CodeRabbit

  • Chores

    • Bumped project version to 3.3.0-SNAPSHOT.
    • Updated Lombok to version 1.18.42.
    • Added json-migration-helper dependency for enhanced JSON handling.
    • Replaced testbench dependency with improved alternative.
  • Tests

    • Added integration test infrastructure for client terminal addon functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

Walkthrough

This PR upgrades the add-on from version 3.2.1-SNAPSHOT to 3.3.0-SNAPSHOT with Vaadin 25 compatibility support. It introduces version-aware JSON encoding via reflection-based MethodHandle resolution for ClientTerminalAddon, adds a json-migration-helper dependency, updates Lombok, replaces testbench dependencies, and establishes new integration test infrastructure for testing client-side terminal addons.

Changes

Cohort / File(s) Summary
Dependency Management
pom.xml
Version bumped to 3.3.0-SNAPSHOT; Lombok upgraded from 1.18.34 to 1.18.42; new dependency added: json-migration-helper:0.9.2; vaadin-testbench replaced with testbench-rpc:1.4.0 (test scope).
Core Library – Version-Aware Encoding
src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java
Replaces direct JsonCodec.encodeWithTypeInfo with dynamic MethodHandle-based resolution; encodes parameters based on Vaadin major version (Jackson for v>24, legacy JsonCodec for older versions); introduces JsonMigration.convertToJsonValue for result conversion and exception handling.
Core Library – Extension Annotations
src/main/java/com/flowingcode/vaadin/addons/xterm/ITerminalConsole.java, src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java
Adds @ExtensionMethod(value = JsonMigration.class, suppressBaseMethods = true) annotations to both classes; enables extension method support without altering existing method signatures.
Integration Test Infrastructure
src/test/java/com/flowingcode/vaadin/addons/xterm/integration/AbstractViewTest.java, IntegrationView.java, IntegrationViewCallables.java, SampleClientTerminalAddon.java, SampleClientTerminalAddonIT.java
AbstractViewTest constructor now defaults to IntegrationView.ROUTE; introduces new IntegrationView class with XTerm component configuration and ClientCallable method; new IntegrationViewCallables interface defines callable contract; SampleClientTerminalAddon extends ClientTerminalAddon with injectable JavaScript registration; SampleClientTerminalAddonIT provides test coverage for sample addon using RPC proxy.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mlopezFC
  • paodb
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add support for Vaadin 25' accurately summarizes the main objective of the changeset, which centers on compatibility updates for Vaadin 25.
Linked Issues check ✅ Passed The PR addresses both linked issues (#104 and #105) by implementing Vaadin version-aware encoding logic and integrating test cases that verify both color and history functionality work correctly.
Out of Scope Changes check ✅ Passed All changes are directly related to Vaadin 25 support: dependency updates (json-migration-helper, testbench-rpc), version-aware encoding, extension methods for JSON migration, and integration tests for new functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/test/java/com/flowingcode/vaadin/addons/xterm/integration/SampleClientTerminalAddonIT.java`:
- Around line 31-36: testSelectionFeature1 currently calls
$server.setSampleClientTerminalAddonValue(BAR) and immediately asserts
getSampleClientTerminalValue(term), which can race because
setSampleClientTerminalAddonValue is asynchronous; modify the test to wait for
the client-side addon value to appear before asserting (e.g., use a
TestBench/waitUntil or Awaitility loop that repeatedly calls
getSampleClientTerminalValue(term) until it equals BAR or a timeout is reached)
so the assertion only runs once the value is visible.

@javier-godoy javier-godoy marked this pull request as draft January 26, 2026 17:48
@javier-godoy javier-godoy marked this pull request as ready for review January 26, 2026 17:48
@paodb paodb merged commit 8378112 into master Jan 26, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from To Do to Pending release in Flowing Code Addons Jan 26, 2026
@paodb paodb deleted the vaadin25 branch January 26, 2026 18:51
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.

Vaadin 25: history does not work Vaadin 25: color on demo does not work

3 participants