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

docs(synapse-interface): maintenance readme #2988

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

bigboydiamonds
Copy link
Collaborator

@bigboydiamonds bigboydiamonds commented Aug 7, 2024

Summary by CodeRabbit

  • Documentation
    • Introduced a comprehensive maintenance guide for the Synapse Interface and Widget packages, detailing how to manage pause functionality for bridge and swap modules, including key components like banners and countdown progress bars.
    • Expanded documentation with instructions on how to configure JSON for defining paused chains and bridge modules, enhancing usability and operational clarity.

972cd46: synapse-interface preview link
4dd7e18: synapse-interface preview link
2d85766: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Aug 7, 2024

Warning

Rate limit exceeded

@bigboydiamonds has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 14 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 6d5610e and f260f6d.

Walkthrough

The recent changes introduce a comprehensive maintenance guide in the README.md files for the @synapsecns/synapse-interface and @synapsecns/widget packages. This guide elaborates on managing the pause functionality for bridge and swap modules, detailing essential components like banners and countdowns. It provides users with clear instructions on updating JSON configurations to ensure effective maintenance management and enhances overall usability for developers and operators.

Changes

File Path Change Summary
.../Maintenance/README.md, .../README.md Added detailed maintenance documentation covering pause functionalities for chains and modules, including JSON structure examples.

Poem

In a garden where code rabbits play,
New tools for maintenance brighten the day.
With banners and bars to guide our way,
We’ll pause and we’ll swap, come what may!
Hopping along with JSON in sight,
Our webapp shines ever so bright! 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

The new README file provides detailed instructions on using the Maintenance feature in the Synapse Interface Webapp, including component details, JSON updates, and production steps.

  • Added packages/synapse-interface/components/Maintenance/README.md with comprehensive usage instructions.
  • Includes examples of JSON configurations for pausing chains and bridge modules.
  • Clarifies steps to ensure changes are reflected in the production webapp.
  • Essential for developers and maintainers to effectively implement maintenance features.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@abtestingalpha
Copy link
Collaborator

  1. Would move the explanation to the base synapse-interface README.md file since the explanation isn't application level code

  2. Currently the images included increase build size by 50%, so we need to remove them (just explain with words) or host them elsewhere as links/explicitly exclude from build:

Before

npm notice name:          @synapsecns/synapse-interface
npm notice version:       0.32.1
npm notice filename:      @synapsecns/synapse-interface-0.32.1.tgz
npm notice package size:  1.0 MB
npm notice unpacked size: 2.9 MB

After

npm notice name:          @synapsecns/synapse-interface
npm notice version:       0.31.2
npm notice filename:      @synapsecns/synapse-interface-0.31.2.tgz
npm notice package size:  1.5 MB
npm notice unpacked size: 3.5 MB

Copy link
Contributor

@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

Outside diff range, codebase verification and nitpick comments (3)
packages/synapse-interface/components/Maintenance/README.md (3)

80-81: Reword for clarity.

Consider rewording to avoid repetitive sentence beginnings.

- `progressBarMessage` String to display in Countdown Progress Bar.
+ `progressBarMessage` The string to display in the Countdown Progress Bar.
Tools
LanguageTool

[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...isplay in Banner. progressBarMessage String to display in Countdown Progress Bar. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~81-~81: You might be missing the article “the” here.
Context: ...rogressBarMessageString to display in Countdown Progress Bar. disableBanner` Boolean ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


84-84: Add missing article.

Consider adding "the" for clarity.

- `disableBanner` Boolean indicating whether to hide Banner.
+ `disableBanner` Boolean indicating whether to hide the Banner.
Tools
LanguageTool

[uncategorized] ~84-~84: You might be missing the article “the” here.
Context: ...nerBoolean indicating whether to hide Banner. disableWarning` Boolean indicating w...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


89-90: Reword for clarity.

Consider rewording to avoid repetitive sentence beginnings and add missing article.

- `disableCountdown` Boolean indicating whether to hide Countdown Progress Bar.
+ `disableCountdown` Boolean indicating whether to hide the Countdown Progress Bar.
Tools
LanguageTool

[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ridge or Swap card. disableCountdown Boolean indicating whether to hide Countdown Pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~90-~90: You might be missing the article “the” here.
Context: ...ownBoolean indicating whether to hide Countdown Progress Bar. ### Example paused-ch...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bf40e0a and ea9592d.

Files ignored due to path filters (2)
  • packages/synapse-interface/components/Maintenance/images/maintenance-banner.png is excluded by !**/*.png
  • packages/synapse-interface/components/Maintenance/images/maintenance-bridge-card.png is excluded by !**/*.png
Files selected for processing (1)
  • packages/synapse-interface/components/Maintenance/README.md (1 hunks)
Additional context used
LanguageTool
packages/synapse-interface/components/Maintenance/README.md

[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...isplay in Banner. progressBarMessage String to display in Countdown Progress Bar. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~81-~81: You might be missing the article “the” here.
Context: ...rogressBarMessageString to display in Countdown Progress Bar. disableBanner` Boolean ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~84-~84: You might be missing the article “the” here.
Context: ...nerBoolean indicating whether to hide Banner. disableWarning` Boolean indicating w...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ridge or Swap card. disableCountdown Boolean indicating whether to hide Countdown Pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~90-~90: You might be missing the article “the” here.
Context: ...ownBoolean indicating whether to hide Countdown Progress Bar. ### Example paused-ch...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

Additional comments not posted (5)
packages/synapse-interface/components/Maintenance/README.md (5)

1-4: LGTM!

The introduction is clear and provides a good overview of the maintenance feature.


5-15: LGTM!

The section is well-structured and informative, providing a clear explanation of the components involved in the maintenance feature.


36-150: LGTM!

The section is comprehensive and includes all necessary details for pausing chain functionalities.

Tools
LanguageTool

[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...isplay in Banner. progressBarMessage String to display in Countdown Progress Bar. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~81-~81: You might be missing the article “the” here.
Context: ...rogressBarMessageString to display in Countdown Progress Bar. disableBanner` Boolean ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~84-~84: You might be missing the article “the” here.
Context: ...nerBoolean indicating whether to hide Banner. disableWarning` Boolean indicating w...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ridge or Swap card. disableCountdown Boolean indicating whether to hide Countdown Pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~90-~90: You might be missing the article “the” here.
Context: ...ownBoolean indicating whether to hide Countdown Progress Bar. ### Example paused-ch...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


155-193: LGTM!

The section is clear and includes all necessary details for pausing specific bridge modules.


93-194: LGTM!

The examples are clear and well-formatted, providing practical guidance for implementing pauses.

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.64961%. Comparing base (bf40e0a) to head (f260f6d).

Additional details and impacted files
@@                 Coverage Diff                  @@
##              master       #2988          +/-   ##
====================================================
+ Coverage   25.29264%   90.64961%   +65.35696%     
====================================================
  Files            780          54         -726     
  Lines          56811        1016       -55795     
  Branches          82          82                  
====================================================
- Hits           14369         921       -13448     
+ Misses         40962          93       -40869     
+ Partials        1480           2        -1478     
Flag Coverage Δ
agents ?
cctp-relayer ?
core ?
ethergo ?
explorer ?
git-changes-action ?
omnirpc ?
opbot ?
packages 90.64961% <ø> (+0.09842%) ⬆️
rfq ?
screener-api ?
scribe ?
tools ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cloudflare-workers-and-pages bot commented Aug 7, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: f260f6d
Status: ✅  Deploy successful!
Preview URL: https://9f448a26.sanguine-fe.pages.dev
Branch Preview URL: https://docs-maintenance-readme.sanguine-fe.pages.dev

View logs

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

The PR introduces a comprehensive README.md file for the Maintenance feature of the Synapse Interface Webapp, consolidating instructions and examples for managing maintenance events.

  • Updated packages/synapse-interface/README.md with detailed maintenance instructions.
  • Removed packages/synapse-interface/components/Maintenance/README.md to centralize documentation.
  • Included JSON configuration examples for pausing chains and bridge modules.
  • Outlined steps to ensure maintenance changes are reflected in the production webapp.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@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

Outside diff range, codebase verification and nitpick comments (4)
packages/synapse-interface/README.md (4)

62-63: Clarify the scope of the maintenance guide.

Specify that the guide applies to both @synapsecns/synapse-interface and @synapsecns/widget packages at the beginning of the section.

- This guide explains how to use the Maintenance feature to pause a chain or bridge module for `@synapsecns/synapse-interface` and `@synapsecns/widget` packages.
+ This guide explains how to use the Maintenance feature to pause a chain or bridge module for both `@synapsecns/synapse-interface` and `@synapsecns/widget` packages.

91-93: Clarify the scope of chain pause.

Specify that pauses can be applied independently to Bridge or Swap functions, or to both simultaneously.

- You can pause the Bridge and Swap functionalities on specific chains using their chainIds.
+ You can pause the Bridge and Swap functionalities on specific chains using their chainIds. Pauses can be applied independently to Bridge or Swap functions, or to both simultaneously.

100-105: Improve clarity of id property description.

Clarify the format of the id property by providing an example.

- Unique ID used to distinguish maintenance component instances. Use 'EVENT_NAME-pause' format. (e.g: arbitrum-chain-pause)
+ Unique ID used to distinguish maintenance component instances. Use 'EVENT_NAME-pause' format. For example, 'arbitrum-chain-pause'.

210-212: Clarify the scope of bridge module pause.

Specify that the bridge module pause applies to specific bridge modules on a given chain.

- You can pause a specific bridge module on a given chain. Currently, there are the following bridge modules:
+ You can pause specific bridge modules on a given chain. Currently, there are the following bridge modules:
Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ea9592d and 6d5610e.

Files selected for processing (1)
  • packages/synapse-interface/README.md (1 hunks)
Additional context used
LanguageTool
packages/synapse-interface/README.md

[style] ~135-~135: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...isplay in Banner. progressBarMessage String to display in Countdown Progress Bar. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~144-~144: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ridge or Swap card. disableCountdown Boolean indicating whether to hide Countdown Pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

Additional comments not posted (3)
packages/synapse-interface/README.md (3)

150-207: Verify the correctness of the example JSON configuration.

Ensure that the example JSON configuration is correct and follows the described format.


227-248: Verify the correctness of the example JSON configuration.

Ensure that the example JSON configuration is correct and follows the described format.


72-75: Verify the accessibility of linked JSON files.

Ensure that the linked JSON files are accessible and up-to-date.

Verification successful

The linked JSON files are accessible and have been updated recently:

  • paused-chains.json: Last updated on 2024-06-26
  • paused-bridge-modules.json: Last updated on 2024-04-30
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility of linked JSON files.

# Test: Check if the JSON files are accessible.
curl -I https://github.com/synapsecns/sanguine/blob/master/packages/synapse-interface/public/pauses/v1/paused-chains.json
curl -I https://github.com/synapsecns/sanguine/blob/master/packages/synapse-interface/public/pauses/v1/paused-bridge-modules.json

Length of output: 9798


Script:

#!/bin/bash
# Description: Check the latest commit dates for the JSON files in the GitHub repository.

# Get the latest commit date for paused-chains.json
curl -s https://api.github.com/repos/synapsecns/sanguine/commits?path=packages/synapse-interface/public/pauses/v1/paused-chains.json | jq -r '.[0].commit.committer.date'

# Get the latest commit date for paused-bridge-modules.json
curl -s https://api.github.com/repos/synapsecns/sanguine/commits?path=packages/synapse-interface/public/pauses/v1/paused-bridge-modules.json | jq -r '.[0].commit.committer.date'

Length of output: 397

packages/synapse-interface/README.md Show resolved Hide resolved
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

The PR enhances the README.md file in the synapse-interface package, providing a detailed guide on managing maintenance events.

  • Updated packages/synapse-interface/README.md with comprehensive maintenance instructions.
  • Removed packages/synapse-interface/components/Maintenance/README.md to centralize documentation.
  • Included JSON configuration examples for pausing chains and bridge modules.
  • Outlined steps to ensure maintenance changes are reflected in the production webapp.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@bigboydiamonds
Copy link
Collaborator Author

  1. Would move the explanation to the base synapse-interface README.md file since the explanation isn't application level code
  2. Currently the images included increase build size by 50%, so we need to remove them (just explain with words) or host them elsewhere as links/explicitly exclude from build:

Before

npm notice name:          @synapsecns/synapse-interface
npm notice version:       0.32.1
npm notice filename:      @synapsecns/synapse-interface-0.32.1.tgz
npm notice package size:  1.0 MB
npm notice unpacked size: 2.9 MB

After

npm notice name:          @synapsecns/synapse-interface
npm notice version:       0.31.2
npm notice filename:      @synapsecns/synapse-interface-0.31.2.tgz
npm notice package size:  1.5 MB
npm notice unpacked size: 3.5 MB

Great points, thank you! Moved the maintenance documentation to the root level in 6d5610e, as well as removing images due to the unnecessary increase in package size.

@bigboydiamonds bigboydiamonds merged commit e56c792 into master Aug 7, 2024
38 checks passed
@bigboydiamonds bigboydiamonds deleted the docs/maintenance-readme branch August 7, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants