-
Notifications
You must be signed in to change notification settings - Fork 47
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
Release v4.0.9 #1918
Release v4.0.9 #1918
Conversation
chore(web): update-subgraph-status-lib
…n-mount Chore/clear local dispute data on mount
WalkthroughThis pull request includes extensive maintenance updates across multiple packages and workflows. It bumps version numbers and dependency versions (including Node.js and various packages), upgrades GitHub Actions in CI/CD configurations, and replaces Web3Modal with AppKit for wallet integration. In addition, it refactors dispute data handling and test assertions, applies minor syntax and styling improvements, and introduces new helper functions and styled components. Overall, the changes aim to improve dependency management, wallet configuration, dispute processing, and UI consistency. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UIComponent
participant AppKit
participant Blockchain
User->>UIComponent: Click "Connect Wallet"
UIComponent->>AppKit: Invoke useAppKit() open() method
AppKit->>Blockchain: Initialize wallet connection via WagmiAdapter
Blockchain-->>AppKit: Return connection details
AppKit-->>UIComponent: Provide connection state and config
UIComponent->>User: Wallet connected successfully
sequenceDiagram
participant ResolverPage
participant DisputeContext
ResolverPage->>DisputeContext: Call resetDisputeData() on mount
DisputeContext->>DisputeContext: Run getInitialDisputeData() to get fresh data
DisputeContext-->>ResolverPage: Return reset dispute data
ResolverPage->>User: Render UI with updated data
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
✅ Deploy Preview for kleros-v2-neo-devtools ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-university ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🧹 Nitpick comments (10)
.github/workflows/deploy-bots.yml (1)
10-14
: Harden Runner and Egress Policy NoteThe Harden Runner action now uses the updated version
4d991eb9b905ef189e4c376166672c3f2f230481
(v2.11.0). Please note the TODO on line 13 regarding switching theegress-policy
fromaudit
toblock
after several runs. If testing is conclusive, consider updating this setting to tighten security..github/workflows/sentry-release.yml (1)
47-51
: Trailing Spaces in Node.js Setup ConfigurationThere are trailing spaces on the
node-version
configuration (line 49) and on the following blank line (line 51). Removing these extra spaces will clean up the YAML formatting and eliminate static analysis warnings.- node-version: 20.x + node-version: 20.x -🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 51-51: trailing spaces
(trailing-spaces)
.github/workflows/contracts-testing.yml (1)
53-57
: Bump Setup Node.js Action to v4.2.0 and Remove Trailing Whitespaces
The Node.js setup action is updated tov4.2.0
. Also, please remove any trailing spaces on the configuration lines to conform with YAML lint standards. For example, modify:- node-version: 20.x + node-version: 20.xand ensure the blank line (line 57) does not contain trailing spaces.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 55-55: trailing spaces
(trailing-spaces)
[error] 57-57: trailing spaces
(trailing-spaces)
web/src/styles/global-style.ts (1)
128-131
: Toast notification positioning adjustment.The added CSS rule for Toastify containers improves the toast notification placement with consistent padding. The
!important
flag is necessary here to override Toastify's default styles.Consider documenting this toast customization in a comment to explain the positioning rationale, as it overrides the default behavior.
kleros-app/src/lib/atlas/providers/AtlasProvider.tsx (2)
56-56
: Validate optional vs. required property.If
wagmiConfig
is meant to be optional in your use case, consider marking it optional in the interface (e.g.,wagmiConfig?: Config
). Otherwise, ensuring it's always provided is fine.
60-61
: Handle missing or invalid config scenario.The calls to
useAccount
anduseChainId
rely onconfig.wagmiConfig
. Consider implementing a fallback or error handling ifwagmiConfig
could be undefined or malformed.web/src/pages/GetPnk/WalletProvider.tsx (3)
22-28
: Validate correctness of the WagmiAdapter instantiation.You're storing a single adapter instance in a ref. This is good for preserving state across renders, but make sure to handle re-initialization logic carefully if you ever need multiple network adapters or dynamic state updates.
36-47
: Check for potential overlapping providers.You’re calling
createAppKit
with a single adapter array, which is straightforward. If in the future you add multiple adapters, ensure no conflicts or race conditions when working with multiple providers.
50-51
: Provide clarity on reconnect behavior.Here,
reconnectOnMount={false}
ensures the app doesn't automatically re-initiate wallets. If you want users to stay connected across reloads, consider toggling it. Evaluate user preferences on repeated sign-in prompts.web/src/pages/Cases/CaseDetails/Voting/Classic/OptionsContainer.tsx (1)
86-103
: Consider using a more unique key.
Usinganswer.title
as the key risks collisions.Here’s how you could make the key more unique:
-<Tooltip text={answer.description} key={answer.title}> +<Tooltip text={answer.description} key={answer.id}>
🛑 Comments failed to post (1)
web/src/consts/chains.ts (1)
9-9: 🛠️ Refactor suggestion
Verify usage of updated types for SUPPORTED_CHAINS and QUERY_CHAINS.
Switching from
Record<number, Chain>
toRecord<number, AppKitNetwork>
might cause subtle typing or runtime issues if other parts of the code assume aChain
type. Please cross-check all references to these constants.Also applies to: 14-14
PR-Codex overview
This PR focuses on updating dependencies and enhancing the dispute resolution process in the application. It includes a version upgrade for
subgraph-status
, updates to theversion
inkleros-app
, and improvements to the dispute data handling in the context.Detailed summary
subgraph-status
from^1.2.3
to^1.2.4
inweb/package.json
andyarn.lock
.kleros-app
version from2.0.2
to2.1.0
inkleros-app/package.json
.web/src/components/Popup/index.tsx
for clarity on popup behavior.useNewDisputeContext
inweb/src/pages/Resolver/index.tsx
to manage dispute data.web/src/context/NewDisputeContext.tsx
to use a function.resetDisputeData
to set fresh data inweb/src/context/NewDisputeContext.tsx
.Summary by CodeRabbit