Skip to content

Conversation

@zoeyTM
Copy link
Contributor

@zoeyTM zoeyTM commented May 28, 2025

resolves #6682

@changeset-bot
Copy link

changeset-bot bot commented May 28, 2025

🦋 Changeset detected

Latest commit: f2caa02

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@nomicfoundation/ignition-core Patch
@nomicfoundation/hardhat-ignition-ethers Patch
@nomicfoundation/hardhat-ignition-viem Patch
@nomicfoundation/hardhat-ignition Patch
@nomicfoundation/ignition-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation bot moved this to Backlog in Hardhat May 28, 2025
@zoeyTM zoeyTM changed the title [WIP] integrate user interruptions flow with ignition UI integrate user interruptions flow with ignition UI May 28, 2025
@zoeyTM zoeyTM marked this pull request as ready for review May 28, 2025 15:15
@zoeyTM zoeyTM force-pushed the ignition/ui-interruptions branch from c9fae37 to 89c93f8 Compare May 28, 2025 15:15
@zoeyTM zoeyTM requested review from alcuadrado and kanej May 28, 2025 15:17
@zoeyTM zoeyTM added v-next A Hardhat v3 development task and removed status:triaging labels May 28, 2025
@zoeyTM zoeyTM linked an issue May 28, 2025 that may be closed by this pull request
@zoeyTM zoeyTM requested a review from fvictorio June 9, 2025 15:32
@kanej kanej removed request for alcuadrado and fvictorio June 9, 2025 15:33
@zoeyTM zoeyTM force-pushed the ignition/ui-interruptions branch from ccbb570 to 1be8ca3 Compare June 10, 2025 12:35
@alcuadrado alcuadrado self-requested a review June 25, 2025 15:17
@zoeyTM zoeyTM force-pushed the ignition/ui-interruptions branch from 7465849 to 31311ca Compare July 31, 2025 07:13
@zoeyTM zoeyTM changed the base branch from v-next to v3-hh-ledger July 31, 2025 07:13
Base automatically changed from v3-hh-ledger to main October 17, 2025 10:03
@michalbrabec michalbrabec linked an issue Oct 28, 2025 that may be closed by this pull request
@alcuadrado alcuadrado force-pushed the ignition/ui-interruptions branch from 31311ca to c4b3f9d Compare November 6, 2025 00:28
@kanej kanej added no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation and removed no changeset needed This PR doesn't require a changeset labels Nov 6, 2025
@alcuadrado alcuadrado force-pushed the ignition/ui-interruptions branch from 25d6330 to 8fe7584 Compare November 6, 2025 10:47
@alcuadrado alcuadrado requested a review from Copilot November 6, 2025 10:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates user interruption handling into the Hardhat Ignition UI by introducing custom hooks that manage terminal display updates during user interruptions. The key changes include:

  • Refactoring PrettyEventHandler to consolidate display updates through a centralized _writeToDisplay method that respects user interruptions
  • Creating user interruption handlers that save/restore cursor position and clear output to prevent UI corruption during prompts
  • Removing the obsolete VerboseEventHandler class
  • Updating the calculateDeploymentCompleteDisplay function signature to accept the result directly from UI state rather than from an event

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
v-next/hardhat-ignition/test/ui/helpers/calculate-deployment-complete-display.ts Updated tests to pass result directly instead of wrapping it in a DeploymentCompleteEvent
v-next/hardhat-ignition/src/internal/ui/verbose-event-handler.ts Removed entire VerboseEventHandler class (309 lines)
v-next/hardhat-ignition/src/internal/ui/helpers/calculate-deployment-complete-display.ts Changed function signature to accept result from uiState instead of event
v-next/hardhat-ignition/src/internal/tasks/deploy.ts Added registration/unregistration of user interruption handlers with try/finally
v-next/hardhat-ignition/src/internal/hook-handlers/user-interruptions.ts New file implementing cursor save/restore logic for handling user interruptions
v-next/hardhat-ignition/src/helpers/pretty-event-handler.ts Refactored to use centralized display writing with user interruption support and replaced readline with ANSI escape codes
v-next/hardhat-ignition/src/helpers.ts Exported getUserInterruptionsHandlers function
v-next/hardhat-ignition-viem/src/internal/viem-ignition-helper.ts Added hooks parameter and user interruption handler registration
v-next/hardhat-ignition-viem/src/internal/hook-handlers/network.ts Passed hooks to helper constructor
v-next/hardhat-ignition-ethers/src/internal/hook-handlers/network.ts Passed hooks to helper constructor
v-next/hardhat-ignition-ethers/src/internal/ethers-ignition-helper.ts Added hooks parameter and user interruption handler registration
.changeset/green-toys-fix.md Added changeset documenting the feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation v-next A Hardhat v3 development task

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Rework Ignition UI to be based off of the HH3 user interruption api Support hardhat-ledger use in Ignition

4 participants