Skip to content

feat: add support for named terminal add-ons #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025
Merged

feat: add support for named terminal add-ons #99

merged 2 commits into from
May 15, 2025

Conversation

javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented May 14, 2025

Related Issue: #98

This pull request provides a mechanism for server-side retrieval of add-on instances. While it doesn't automate the entire add-on setup process, it's a foundational step towards better overall add-on management.

Expectation:

Also most add-ons come with their object that exposes settings of the add-on. While I consider this a bonus, it would of course be great if somehow these settings objects could be exposed as Java objects."

The getAddon() method indirectly supports this expectation, contingent on add-on design.
By calling xterm.getAddon(MySpecificAddon.class), developers can retrieve the server-side Java instance of MySpecificAddon. If this MySpecificAddon class is designed to hold, manage, or provide access to its settings (which might mirror client-side settings or be purely server-side), then this PR enables to access those settings via methods defined on the MySpecificAddon Java object (e.g., customAddon.getSettings(), customAddon.getSomeSpecificSetting()).

The getAddon() method itself does not automatically create or map client-side JavaScript settings objects into new Java objects if such a mapping isn't already part of the server-side add-on's own implementation. It provides the server-side add-on object; how that object exposes or interacts with settings is determined by the add-on's specific design.

In essence, this PR provides a foundational piece for server-side add-on interaction, which can be leveraged for accessing settings if the add-ons are designed to expose them through their server-side Java API. The automation of client-side loading and direct mapping of purely client-side settings objects are considered out of scope for this particular change but could potentially build upon the mechanism introduced here.

Usage Example:

@NpmPackage(value = "@xterm/addon-web-links", version = "0.11.0")
@JsModule("./fc-xterm/xterm-weblinks-addon.ts")
public class WebLinkAddon extends ClientTerminalAddon {

  private final static String NAME = "addon-web-links";

  public WebLinkAddon(XTermBase xterm) {
    super(xterm);
    xterm.getElement().executeJs("Vaadin.Flow.fcXtermConnector.load_weblinks($0, this)", NAME);
  }

  public void setFoo(String foo) {
    executeJs("this.foo=$0;", foo);
  }

  @Override
  public String getName() {
    return NAME;
  }

}
import { WebLinksAddon } from '@xterm/addon-web-links';
import { XTermElement } from './xterm-element';

(function () { 
  (window as any).Vaadin.Flow.fcXtermConnector = (window as any).Vaadin.Flow.fcXtermConnector || {};
  (window as any).Vaadin.Flow.fcXtermConnector.load_weblinks = (name:string, node: XTermElement) => {
    const addon = new WebLinksAddon();
    node.terminal.loadAddon(addon);
    node.addons[name]=addon;
  };
})();

Summary by CodeRabbit

  • New Features

    • Introduced support for server-side terminal add-ons, enabling enhanced interactions and extensions for the terminal component.
    • Added a mechanism to manage and register add-ons associated with each terminal instance.
    • Provided the ability for add-ons to execute JavaScript code on the client-side terminal.
    • Added a new property to manage add-ons within the client-side terminal element.
  • Other Changes

    • Updated copyright years.
    • Internal version number incremented.

Copy link

coderabbitai bot commented May 14, 2025

Walkthrough

This update introduces a new server-side add-on system for the terminal component. It adds abstract base classes for server-side and client-aware add-ons, updates the terminal to support registration and retrieval of add-ons, and modifies an existing add-on to use the new structure. A corresponding property is also added on the client-side terminal element.

Changes

File(s) Change Summary
pom.xml Project version updated from 3.1.1-SNAPSHOT to 3.2.0-SNAPSHOT.
src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java
src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java
Introduced new abstract classes: TerminalAddon (base for server-side add-ons) and ClientTerminalAddon (for add-ons interacting with client-side JavaScript). Includes registration logic and JavaScript execution support for client-aware add-ons.
src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java Updated to extend TerminalAddon and call its constructor; copyright year updated from 2023 to 2025.
src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java Added a private list for registered add-ons and methods to register and retrieve server-side add-ons by class. Copyright year updated from 2023 to 2025.
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts Added a new public property addons (empty object) to the XTermElement class.

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 2

🧹 Nitpick comments (4)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1)

165-165: Consider using a more specific type instead of Object.

The addons property is typed as Object which is a very generic type. Consider using a more specific interface that describes the structure of the add-ons that can be registered.

-  addons : Object = {};
+  addons : Record<string, ITerminalAddon> = {};

The static analysis tool flagged the use of Object as a banned type, recommending to explicitly define the object shape for better type safety.

🧰 Tools
🪛 Biome (1.9.4)

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (1)

309-311: Generic signature can be simplified for type-safety

<T extends TerminalAddon> T getAddon(Class<? extends T> clazz) works but the wildcard is unnecessary and forces callers to up-cast. Prefer:

-public <T extends TerminalAddon> T getAddon(Class<? extends T> clazz)
+public <T extends TerminalAddon> T getAddon(Class<T> clazz)
src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (2)

3-3: Remove unused import

import com.vaadin.flow.dom.Element; is never referenced.


4-4: Avoid relying on internal Vaadin API

com.vaadin.flow.internal.JsonCodec is an internal class and may change without notice. Prefer the public JsonSerializer utilities or plain Json.create... APIs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1154c1 and a525fbe.

📒 Files selected for processing (6)
  • pom.xml (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (4 hunks)
  • src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1)
src/test/java/com/flowingcode/vaadin/addons/xterm/integration/XTermElement.java (1)
  • Element (32-101)
🪛 Biome (1.9.4)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

🪛 GitHub Actions: Java CI with Maven
src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java

[error] 322-322: Compilation error: illegal start of type at line 322, column 4.

🔇 Additional comments (7)
pom.xml (1)

7-7: Version bump is appropriate for a feature addition.

The project version has been increased from 3.1.1-SNAPSHOT to 3.2.0-SNAPSHOT, which follows semantic versioning standards for adding new functionality.

src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (2)

46-48: LGTM! PreserveStateAddon now integrates with the new add-on system.

The class now extends TerminalAddon while maintaining its existing interfaces, which properly integrates it with the new add-on management framework.


85-85: Correctly initializes the parent class.

The super(xterm) call passes the terminal instance to the TerminalAddon constructor, ensuring proper registration with the terminal's add-on management system.

src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (2)

5-15: Well-documented class purpose and design.

The Javadoc clearly explains the purpose of this abstract base class and its role in the add-on architecture. The documentation provides sufficient context for developers who will extend this class.


16-28:

✅ Verification successful

Sound implementation of the base add-on class.

The class properly implements the foundational aspects of the add-on system:

  1. Takes an XTermBase instance in the constructor
  2. Validates the instance is not null using Objects.requireNonNull
  3. Registers itself with the terminal via xterm.registerServerSideAddon(this)

This design aligns with the PR objectives of enabling server-side retrieval of add-on instances.


🏁 Script executed:

#!/bin/bash
# Verify that XTermBase implements the registerServerSideAddon method
rg "void registerServerSideAddon\(" --type java

Length of output: 188


Approve: TerminalAddon constructor and registration verified

The TerminalAddon constructor correctly null-checks the provided XTermBase instance and calls registerServerSideAddon(this) as intended.

• Verified that XTermBase.java defines

final <T extends TerminalAddon> void registerServerSideAddon(T addon)

ensuring the add-on registration is implemented.

No further changes required.

src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (1)

73-73: Consider thread-safe collection if add-ons may be accessed concurrently

ArrayList is not thread-safe. If add-ons can be registered/retrieved from different threads (e.g., UI access vs. background tasks), use CopyOnWriteArrayList or synchronize access.

src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1)

75-84: Placeholder replacement may generate invalid JS

expression.replaceAll("\\$(\\d+)", "\\$1[$1]") turns $1 into $1[1], e.g. "$1""$1[1]", which is unlikely the intended transformation and produces a broken script. Re-evaluate the algorithm or add tests demonstrating correct behaviour.

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 a525fbe and 1d2164b.

📒 Files selected for processing (5)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (4 hunks)
  • src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java
🧰 Additional context used
🪛 Biome (1.9.4)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

@javier-godoy
Copy link
Member Author

@coderabbitai full review

Copy link

coderabbitai bot commented May 15, 2025

✅ Actions performed

Full review triggered.

@FlowingCode FlowingCode deleted a comment from coderabbitai bot May 15, 2025
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: 0

♻️ Duplicate comments (1)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1)

165-165: Use a more specific type and add documentation for the addons property.

The Object type is too broad and doesn't provide enough type safety. Consider using a more specific interface or type that describes the structure of the add-ons object. Additionally, adding JSDoc documentation would help other developers understand the purpose and usage of this property.

-  addons : Object = {};
+  /**
+   * Storage for client-side terminal add-ons that can be accessed by the server-side Java code.
+   * Used by ClientTerminalAddon to invoke JavaScript on client terminal add-ons.
+   * @example { webLinks: WebLinksAddon, fitAddon: FitAddon }
+   */
+  addons : Record<string, ITerminalAddon> = {};
🧰 Tools
🪛 Biome (1.9.4)

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

🧹 Nitpick comments (3)
src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (1)

5-5: Copyright year should match current release timeline

The copyright year has been updated to 2025, which is several years in the future from the current date. Consider adjusting it to reflect the actual release timeline.

- * Copyright (C) 2020 - 2025 Flowing Code
+ * Copyright (C) 2020 - 2024 Flowing Code
src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (2)

60-62: Consider more descriptive exception message for getName() validation

The current implementation throws an IllegalStateException without a descriptive message when getName() returns null. Adding a clear error message would help developers understand the issue.

-    if (getName() == null) {
-      throw new IllegalStateException();
-    }
+    if (getName() == null) {
+      throw new IllegalStateException("getName() must return a non-null value");
+    }

102-102: Add comment explaining the parameter replacement pattern

The regex replacement on expression parameters is not immediately obvious. A code comment would help future maintainers understand this transformation.

+    // Convert $n placeholder syntax to $n[$n] to make it work with the apply() call and arguments array
    expression = expression.replaceAll("\\$(\\d+)", "\\$1[$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 a1154c1 and bd478fe.

📒 Files selected for processing (6)
  • pom.xml (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (4 hunks)
  • src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

🔇 Additional comments (8)
pom.xml (1)

7-7: Version bump aligns with feature addition

The version update from 3.1.1-SNAPSHOT to 3.2.0-SNAPSHOT follows semantic versioning principles, correctly reflecting the addition of a new feature (server-side add-on management) without breaking existing functionality.

src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (2)

46-48: LGTM: Proper integration with the new add-on architecture

The class now extends TerminalAddon while maintaining its original interfaces, properly integrating it with the new server-side add-on framework.


85-85: LGTM: Appropriate super call

The constructor correctly calls super(xterm) to initialize the base TerminalAddon class, which handles the registration of this add-on with the terminal instance.

src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (1)

25-52: Well-structured base class for the add-on system

The TerminalAddon abstract class provides a solid foundation for the server-side add-on framework. The implementation is clean, with:

  1. Comprehensive JavaDoc explaining the purpose and usage
  2. Proper null checks in the constructor
  3. Automatic registration with the terminal instance
  4. Implementation of Serializable for session state management

This abstraction will make it easier to create consistent add-ons that integrate well with the terminal component.

src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (3)

73-73: LGTM: Good implementation of add-ons collection

The implementation of the add-ons list as a private final field with proper initialization is a good practice.


288-311: LGTM: Well-structured method with comprehensive Javadoc

The getAddon method is well-designed with clear documentation, proper parameter validation, and effective use of Java streams to find the appropriate add-on instance.


313-327: LGTM: Good implementation of add-on registration

The registerServerSideAddon method correctly validates inputs, prevents duplicate registrations, and is properly marked as final since it's called from constructors.

src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1)

1-107: LGTM: Well-designed abstract class for client-side terminal add-ons

The ClientTerminalAddon class provides a solid foundation for implementing terminal add-ons with client-side JavaScript interaction. The implementation includes proper constructor validation, clear documentation, and a useful utility method for JavaScript execution.

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: 0

🧹 Nitpick comments (1)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1)

165-165: Add documentation for the addons property.

The newly added property addons seems to be a key part of your new server-side add-on retrieval mechanism, as mentioned in the PR objectives. While I understand you prefer using Object type (as noted in previous discussions), adding some documentation would help other developers understand the purpose of this property.

-  addons : Object = {};
+  /**
+   * Storage for client-side terminal add-ons that can be accessed by the server-side Java code.
+   * Used by ClientTerminalAddon to invoke JavaScript on client terminal add-ons.
+   */
+  addons : Object = {};
🧰 Tools
🪛 Biome (1.9.4)

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0938ed0 and d6ad8cb.

📒 Files selected for processing (5)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java (1 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java (4 hunks)
  • src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/main/java/com/flowingcode/vaadin/addons/xterm/PreserveStateAddon.java
  • src/main/java/com/flowingcode/vaadin/addons/xterm/TerminalAddon.java
  • src/main/java/com/flowingcode/vaadin/addons/xterm/ClientTerminalAddon.java
  • src/main/java/com/flowingcode/vaadin/addons/xterm/XTermBase.java
🧰 Additional context used
🧠 Learnings (1)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts (1)
Learnt from: paodb
PR: FlowingCode/XTermConsoleAddon#99
File: src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts:165-165
Timestamp: 2025-05-15T19:10:55.084Z
Learning: In the XTermConsoleAddon project, using `Object` as a type for the `addons` property in `xterm-element.ts` is acceptable for the implementation, despite typical TypeScript best practices that would suggest more specific typing.
🪛 Biome (1.9.4)
src/main/resources/META-INF/frontend/fc-xterm/xterm-element.ts

[error] 165-165: Don't use 'Object' as a type.

Prefer explicitly define the object shape. This type means "any non-nullable value", which is slightly better than 'unknown', but it's still a broad type.

(lint/complexity/noBannedTypes)

@paodb paodb merged commit 1a5d16e into master May 15, 2025
4 checks passed
@paodb paodb deleted the feat-addons branch May 15, 2025 19:23
@github-project-automation github-project-automation bot moved this from To Do to Pending release in Flowing Code Addons May 15, 2025
@javier-godoy javier-godoy moved this from Pending release to Blocked in Flowing Code Addons May 26, 2025
@javier-godoy javier-godoy moved this from Blocked to Pending release in Flowing Code Addons Jun 2, 2025
@paodb paodb moved this from Pending release to Done in Flowing Code Addons Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants