[#267] Indexing recovery UI for failed publish#280
Closed
realproject7 wants to merge 1 commit intomainfrom
Closed
Conversation
- New usePublishIntent hook: saves intent before wallet confirmation, persists tx hash after on-chain confirmation, clears on indexing success, retains on failure with retry count tracking - Integrate intent lifecycle into usePublish: saveIntent before confirming, persistTxHash after receipt, clearIntent on success, clear on user-rejected tx (no false recovery) - New PublishRecovery component: banner with tx hash link, retry indexing button, dismiss option, max retry count (5) warning - Recovery UI mounted on create page and chain page - Treats indexer 409 as idempotent success - Stale intents (24h, no txHash) auto-cleaned on mount Fixes #267 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
requested changes
Mar 17, 2026
Collaborator
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The recovery flow is close, and CI is green, but the new error handling clears persisted publish intent for every wallet write failure. That breaks the issue's required distinction between user-rejected transactions and other sent/failed states.
Findings
- [high] Non-rejection wallet errors now discard recovery state
- File:
src/hooks/usePublish.ts:95 - Suggestion: Only clear the saved intent when the wallet error is positively identified as a user rejection. For other
writeContractAsyncfailures, preserve the intent so the tx can still be recovered if it was broadcast or the failure was an ambiguous provider/network error.
- File:
Decision
Requesting changes because issue #267 explicitly requires correct classification of user-rejected transactions versus sent/confirmed failures, and the current catch block treats all wallet write errors as user rejection.
Owner
Author
|
Closing: stale implementation from before the revert. Issue #267 remains open for a fresh start. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #267
usePublishIntenthook — localStorage-backed intent that tracks pending publishes across browser sessions. Saves before wallet confirmation, persists tx hash after on-chain confirmation, clears on indexing success, retains on failure with retry count.usePublishintegration — Intent lifecycle wired into the 5-state publish flow. User-rejected tx clears intent immediately (no false recovery). Indexer 409 treated as idempotent success.PublishRecoverycomponent — Recovery banner showing tx hash (linked to explorer), retry button, dismiss option, max retry warning (5 retries). Renders nothing when no pending intent exists.src/app/create/page.tsxandsrc/app/chain/page.tsx.Error classification
Test plan
npm run typecheckpassesnpm run lintpasses (no new warnings)🤖 Generated with Claude Code