Skip to content
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

feat(message-system): add context banner for sol staking #17373

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

MiroslavProchazka
Copy link
Contributor

This pull request includes updates to the suite-common/message-system/config/config.v1.json file to add a new message and adjust existing configurations. The most important changes include adding a new message for Solana staking and modifying the structure of an existing message category.

New message addition:

  • Added a new message encouraging users to update their Trezor firmware for the best Solana staking experience. This message includes conditions based on device models and firmware versions, and is available in multiple languages.

Configuration updates:

  • Updated the sequence value from 81 to 82 to reflect the new configuration version.
  • Modified the category field of an existing message from a string to an array format.

@MiroslavProchazka MiroslavProchazka marked this pull request as ready for review March 4, 2025 10:07
Copy link

github-actions bot commented Mar 4, 2025

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 26
  • More info

Learn more about 𝝠 Expo Github Action

Copy link

coderabbitai bot commented Mar 4, 2025

Walkthrough

This pull request updates the JSON configuration file by incrementing the "sequence" number from 81 to 82. A new action block has been added that targets devices based on specific conditions for Solana staking. The conditions require that the settings include "sol": true and that the desktop and web application versions are greater than 25.2.1, while leaving the mobile version unspecified. The action is applicable to device models T2B1, T3B1, T2T1, and T3T1 with firmware versions below 2.8.9. Associated with this action is a message that includes properties such as an ID, priority, dismissible flag, variant, and a multilingual content block to prompt users to update their firmware. Additionally, an existing message had its category changed from a string ("banner") to an array (["banner"]).


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6e6581a and d9779d5.

📒 Files selected for processing (1)
  • suite-common/message-system/config/config.v1.json (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: run-desktop-tests (@group=wallet, trezor-user-env-unix bitcoin-regtest)
  • GitHub Check: EAS Update
  • GitHub Check: Analyze with CodeQL (javascript)
  • GitHub Check: build-web
  • GitHub Check: prepare_android_test_app
  • GitHub Check: Setup and Cache Dependencies
🔇 Additional comments (3)
suite-common/message-system/config/config.v1.json (3)

4-4: Sequence Bump Update
The "sequence" value has been incremented from 81 to 82. This update clearly indicates a new configuration version. Please verify that this bump is in line with your versioning strategy and does not conflict with any concurrent updates.


297-388: New Solana Staking Message Addition
A new action block has been added to address Solana staking. The conditions correctly require a setting of "sol": true and enforce that both desktop and web environments have versions greater than 25.2.1 (with mobile explicitly disabled via "!"). In addition, the devices targeted (models T2B1, T3B1, T2T1, and T3T1) are filtered to only include firmware versions less than 2.8.9. The multilingual content is comprehensive, and the CTA is configured as an internal link directing to "firmware-index". Overall, the implementation aligns well with the PR objectives.


1333-1335: Category Field Update for Existing Message
The existing message with ID "a3c3a3b7-efbe-4e39-9ffd-1836338e7811" now defines its "category" as an array (i.e. ["banner"]) instead of a string. This update improves consistency across your configuration messages. Please ensure that any downstream processing expecting a string is updated to handle an array.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@MiroslavProchazka MiroslavProchazka force-pushed the chore/msg-system-sol-stakig branch from 27ac7c6 to 6e6581a Compare March 4, 2025 10:55
@MiroslavProchazka MiroslavProchazka force-pushed the chore/msg-system-sol-stakig branch from 6e6581a to d9779d5 Compare March 4, 2025 13:26
@tomasklim tomasklim merged commit e1f21be into develop Mar 4, 2025
31 checks passed
@tomasklim tomasklim deleted the chore/msg-system-sol-stakig branch March 4, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Approved
Development

Successfully merging this pull request may close these issues.

2 participants