Skip to content

Conversation

@javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Nov 17, 2025

Summary by CodeRabbit

  • Chores
    • Updated project dependencies with JSON migration helper library
    • Updated build configuration to exclude additional generated frontend assets

@coderabbitai
Copy link

coderabbitai bot commented Nov 17, 2025

Walkthrough

Introduces JSON migration support to the ChatAssistant addon by adding a new Maven dependency (json-migration-helper), applying the @ExtensionMethod annotation to the ChatAssistant class, and extending .gitignore to exclude generated frontend assets in the /src/main/frontend directory.

Changes

Cohort / File(s) Summary
Build Configuration
.gitignore, pom.xml
Added two paths to .gitignore for generated frontend assets (/src/main/frontend/generated, /src/main/frontend/index.html). Added Maven dependency com.flowingcode.vaadin:json-migration-helper:0.0.1-SNAPSHOT.
Source Code
src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
Added import of JsonMigration and Lombok ExtensionMethod. Applied @ExtensionMethod(value = JsonMigration.class, suppressBaseMethods = true) annotation to ChatAssistant class to enable JSON migration extension methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify the json-migration-helper dependency version (0.0.1-SNAPSHOT) is appropriate and its Maven coordinates are correct
  • Confirm suppressBaseMethods = true in the @ExtensionMethod annotation is the intended behavior and doesn't mask critical base methods
  • Review the generated frontend asset paths added to .gitignore align with the project's build output structure

Possibly related PRs

Suggested labels

enhancement

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add json-migration-helper' accurately describes the main change: adding a new dependency and integrating the json-migration-helper library with the ChatAssistant class.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch json-migration

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5596ced and 2f52f9a.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • pom.xml (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java (3 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-07-24T13:40:40.471Z
Learnt from: mlopezFC
Repo: FlowingCode/ChatAssistant PR: 35
File: src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java:179-186
Timestamp: 2025-07-24T13:40:40.471Z
Learning: In ChatAssistant's initializeAvatar method (src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java), direct DOM manipulation using executeJs is intentionally used to move the Avatar component to be a child of a button that is inside a div within the React-controlled web component structure. This approach is necessary because the target elements are created by React, and standard Vaadin component hierarchy methods cannot be used due to ReactAdapterComponent limitations.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
📚 Learning: 2024-11-11T17:49:24.845Z
Learnt from: paodb
Repo: FlowingCode/ChatAssistant PR: 31
File: pom.xml:317-317
Timestamp: 2024-11-11T17:49:24.845Z
Learning: In `src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java`, the parameter `position` in the method `scrollToIndex(int position)` is properly documented at line 328.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
📚 Learning: 2025-07-22T19:52:28.019Z
Learnt from: mlopezFC
Repo: FlowingCode/ChatAssistant PR: 35
File: src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java:179-186
Timestamp: 2025-07-22T19:52:28.019Z
Learning: When using ReactAdapterComponent with custom React components in ChatAssistant, standard Vaadin component hierarchy methods like add() cannot be used because the component doesn't implement HasComponents, and the DOM structure is controlled by React. Direct DOM manipulation with executeJs may be necessary to integrate Vaadin components (like Avatar) into React-generated DOM structures.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
📚 Learning: 2025-07-24T13:41:19.117Z
Learnt from: mlopezFC
Repo: FlowingCode/ChatAssistant PR: 35
File: src/main/resources/META-INF/frontend/react/animated-fab.tsx:0-0
Timestamp: 2025-07-24T13:41:19.117Z
Learning: In the ChatAssistant animated-fab React component (src/main/resources/META-INF/frontend/react/animated-fab.tsx), the Floating Action Button (FAB) appears empty in the React code but gets its icon content from the Avatar Vaadin component, which is inserted via DOM manipulation from the Java backend's initializeAvatar method.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
📚 Learning: 2025-07-22T20:00:43.518Z
Learnt from: mlopezFC
Repo: FlowingCode/ChatAssistant PR: 35
File: src/main/resources/META-INF/frontend/styles/chat-assistant-styles.css:20-28
Timestamp: 2025-07-22T20:00:43.518Z
Learning: In ChatAssistant's CSS (src/main/resources/META-INF/frontend/styles/chat-assistant-styles.css), the double 180-degree rotation trick on both .chat-assistant-resizable-vertical-layout and .chat-assistant-container-vertical-layout is used to move the resize handle from the default bottom-right corner to the upper-left corner. This positioning is more suitable for resizing the chat window since the chat bubble is positioned in the bottom-right part of the viewport.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
📚 Learning: 2025-08-12T15:44:17.868Z
Learnt from: flang
Repo: FlowingCode/ChatAssistant PR: 46
File: src/main/resources/META-INF/resources/frontend/fcChatAssistantConnector.js:92-118
Timestamp: 2025-08-12T15:44:17.868Z
Learning: In ChatAssistant's fcChatAssistantConnector.js, the clampToViewport function intentionally does not reset maxWidth/maxHeight dimensions to avoid flickering during resize operations. Instead, dimensions are reset only on touchstart/mousedown events when the user starts dragging, allowing for smooth resizing while still preventing viewport overflow.

Applied to files:

  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-vaadin24
  • GitHub Check: build-vaadin25
🔇 Additional comments (2)
.gitignore (1)

20-21: LGTM!

The new ignore patterns for /src/main/frontend/generated and /src/main/frontend/index.html are consistent with the existing patterns for /frontend/ and appropriate for Vaadin projects.

pom.xml (1)

136-140: Confirm SNAPSHOT dependency stability with maintainers before production use.

The json-migration-helper:0.0.1-SNAPSHOT dependency is confirmed available in the Flowing Code snapshots repository. However, since this appears to be a proprietary package without publicly available stable versions, verify with the Flowing Code team that:

  • This SNAPSHOT will remain stable and available during your release cycle
  • No stable releases are planned that this should depend on instead
  • SNAPSHOT updates won't introduce breaking changes to your build

@paodb paodb merged commit d82add2 into master Nov 17, 2025
5 checks passed
@paodb paodb deleted the json-migration branch November 17, 2025 20:05
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