Skip to content

Sync fork with upstream amaify/chainwright#2

Merged
Tobechukwu-fieldlabs merged 8 commits into
devfrom
sync-upstream-2026-07-22
Jul 22, 2026
Merged

Sync fork with upstream amaify/chainwright#2
Tobechukwu-fieldlabs merged 8 commits into
devfrom
sync-upstream-2026-07-22

Conversation

@Tobechukwu-fieldlabs

@Tobechukwu-fieldlabs Tobechukwu-fieldlabs commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Merges the latest dev from upstream (amaify/chainwright) into this fork, and rebuilds dist so git installs pick up the new code.

Upstream changes pulled in:

🤖 Generated with Claude Code

Summary

  • Syncs the fork with the latest upstream dev changes and rebuilds dist for Git-based installs.
  • Replaces notification auto-close cancellation callbacks with AbortController signals for Phantom and Solflare onboarding flows.
  • Ensures Solflare’s “What’s new” modal closes during onboarding.
  • Updates CI to run linting and type checks, narrows TypeScript compilation scope, and includes deployment-related lint fixes.
  • Bumps the package version to 0.10.11 and updates the changelog.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change introduces AbortSignal-based notification cancellation for Phantom and Solflare flows, adds combined lint and TypeScript CI checks, narrows TypeScript inclusion, and updates release metadata and notes.

Changes

Notification cancellation

Layer / File(s) Summary
AbortSignal notification runners
src/wallets/phantom/utils.ts, src/wallets/solflare/utils.ts
Notification utilities now stop on abort or page closure and return after clicking the close button.
Onboarding and fixture integration
src/wallets/phantom/..., src/wallets/solflare/...
Onboarding and fixtures pass AbortController signals to notification runners and abort them during teardown or completion.

CI and release configuration

Layer / File(s) Summary
CI and TypeScript checks
package.json, tsconfig.json, .github/workflows/linting-and-unit-tests.yaml
Combined CI scripts run linting and TypeScript checks, and the workflow invokes them with a narrower TypeScript inclusion set.
Version and changelog updates
package.json, CHANGELOG.md
The package version changes to 0.10.11, with release notes added for versions 0.10.11 and 0.10.10.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects that this PR syncs the fork with upstream changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/linting-and-unit-tests.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

tsconfig.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Comment @coderabbitai help to get the list of available commands.

@mgiagante mgiagante assigned mgiagante and unassigned mgiagante Jul 22, 2026
@mgiagante
mgiagante self-requested a review July 22, 2026 12:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/wallets/phantom/actions/onboard.phantom.ts`:
- Around line 202-208: Ensure the notification runners are always stopped by
moving abort calls into finally blocks: in
src/wallets/phantom/actions/onboard.phantom.ts lines 202-208, wrap the
additional-account flow around autoClosePhantomNotification in try/finally and
abort autoCloseController in finally; apply the same try/finally cleanup to the
post-runner onboarding work in src/wallets/solflare/actions/onboard.solflare.ts
lines 46-64, aborting its controller in finally.

In `@src/wallets/phantom/utils.ts`:
- Around line 12-14: In the click conditions of the notification back-button
flows, re-check both cancellation and page state immediately before clicking:
update src/wallets/phantom/utils.ts lines 12-14 and
src/wallets/solflare/utils.ts lines 17-19 to require !signal.aborted and
!page.isClosed() alongside visibility before invoking the click.

In `@tsconfig.json`:
- Line 26: Update the TypeScript include configuration in tsconfig.json to cover
executable entry points under scripts/**/*.ts, ensuring scripts such as
add-wallet.ts are checked by check:types alongside the existing source and test
patterns.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8e9b6429-f49b-4056-ad3a-66103b55688b

📥 Commits

Reviewing files that changed from the base of the PR and between db4ae47 and 731fcbf.

⛔ Files ignored due to path filters (2)
  • dist/wallets/phantom/index.js is excluded by !**/dist/**
  • dist/wallets/solflare/index.js is excluded by !**/dist/**
📒 Files selected for processing (12)
  • .github/workflows/linting-and-unit-tests.yaml
  • CHANGELOG.md
  • package.json
  • src/wallets/phantom/actions/onboard.phantom.ts
  • src/wallets/phantom/phantom-fixture.ts
  • src/wallets/phantom/phantom-worker-scope-fixture.ts
  • src/wallets/phantom/utils.ts
  • src/wallets/solflare/actions/onboard.solflare.ts
  • src/wallets/solflare/solflare-fixture.ts
  • src/wallets/solflare/solflare-worker-scope-fixture.ts
  • src/wallets/solflare/utils.ts
  • tsconfig.json

Comment on lines +202 to +208
const autoCloseController = new AbortController();

autoClosePhantomNotification(newPage, isCancelled).catch((error) => console.error({ error }));
autoClosePhantomNotification(newPage, autoCloseController.signal).catch((error) => console.error({ error }));

for (const { accountName, chain, privateKey } of additionalAccounts) {
await addAccount({ page: newPage, privateKey, accountName, chain });
cancelled = true;
autoCloseController.abort();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Abort the notification runner in a finally block.

A failed account, rename, or network action skips abort(), leaving the runner polling until page teardown.

  • src/wallets/phantom/actions/onboard.phantom.ts#L202-L208: wrap the additional-account flow in try/finally and abort in finally.
  • src/wallets/solflare/actions/onboard.solflare.ts#L46-L64: wrap the post-runner onboarding work in try/finally and abort in finally.
📍 Affects 2 files
  • src/wallets/phantom/actions/onboard.phantom.ts#L202-L208 (this comment)
  • src/wallets/solflare/actions/onboard.solflare.ts#L46-L64
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/wallets/phantom/actions/onboard.phantom.ts` around lines 202 - 208,
Ensure the notification runners are always stopped by moving abort calls into
finally blocks: in src/wallets/phantom/actions/onboard.phantom.ts lines 202-208,
wrap the additional-account flow around autoClosePhantomNotification in
try/finally and abort autoCloseController in finally; apply the same try/finally
cleanup to the post-runner onboarding work in
src/wallets/solflare/actions/onboard.solflare.ts lines 46-64, aborting its
controller in finally.

Comment on lines 12 to +14
if (isNotificationButtonVisible) {
await notificationPopupBackButton.click();
IS_POLLING_COMPLETE = true;
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Re-check cancellation immediately before clicking.

An abort can occur while isVisible() is awaited. The current iteration can then click a notification after fixture teardown or onboarding cancellation.

  • src/wallets/phantom/utils.ts#L12-L14: include !signal.aborted and !page.isClosed() in the click condition.
  • src/wallets/solflare/utils.ts#L17-L19: include !signal.aborted and !page.isClosed() in the click condition.
📍 Affects 2 files
  • src/wallets/phantom/utils.ts#L12-L14 (this comment)
  • src/wallets/solflare/utils.ts#L17-L19
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/wallets/phantom/utils.ts` around lines 12 - 14, In the click conditions
of the notification back-button flows, re-check both cancellation and page state
immediately before clicking: update src/wallets/phantom/utils.ts lines 12-14 and
src/wallets/solflare/utils.ts lines 17-19 to require !signal.aborted and
!page.isClosed() alongside visibility before invoking the click.

Comment thread tsconfig.json
}
},
"include": ["**/*.ts", "**/*.tsx"],
"include": ["src/**/*.ts", "tests/**/*.ts", "environment.d.ts"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep executable TypeScript entry points in the type-check scope.

check:types now excludes scripts/add-wallet.ts, even though it is an exposed project script. A broken script can therefore pass CI and fail only when invoked; include scripts/**/*.ts or document why it is intentionally excluded.

Proposed fix
-    "include": ["src/**/*.ts", "tests/**/*.ts", "environment.d.ts"],
+    "include": ["src/**/*.ts", "tests/**/*.ts", "scripts/**/*.ts", "environment.d.ts"],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"include": ["src/**/*.ts", "tests/**/*.ts", "environment.d.ts"],
"include": ["src/**/*.ts", "tests/**/*.ts", "scripts/**/*.ts", "environment.d.ts"],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tsconfig.json` at line 26, Update the TypeScript include configuration in
tsconfig.json to cover executable entry points under scripts/**/*.ts, ensuring
scripts such as add-wallet.ts are checked by check:types alongside the existing
source and test patterns.

@Tobechukwu-fieldlabs
Tobechukwu-fieldlabs merged commit ffc150d into dev Jul 22, 2026
6 checks passed
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.

4 participants