Repository navigation
Conversation
khanti42
force-pushed
the
feat/confirmation-refresher-keys-alignment
branch
from
September 28, 2026 17:48
3440631 to
5916383
Compare
khanti42
force-pushed
the
feat/confirmation-refresher-keys-alignment
branch
from
September 28, 2026 17:50
5916383 to
0879f5a
Compare
khanti42
force-pushed
the
feat/confirmation-refresher-keys-alignment
branch
from
September 29, 2026 08:56
42aedeb to
11f90fd
Compare
khanti42
force-pushed
the
feat/confirmation-refresher-keys-alignment
branch
from
September 29, 2026 08:59
11f90fd to
b93948b
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The open-path gates are lost, and late snapshot persistence creates a Save race.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Unifies refresher-key resolution and reuses the dialog-open snapshot during MemoEdit saves.
Changes:
- Adds shared refresher-key resolution.
- Persists and reuses enabled refresher keys.
- Expands utility and MemoEdit tests.
| File | Description |
|---|---|
ui/confirmation/controller.tsx |
Resolves, schedules, and persists refresher keys. |
ui/confirmation/utils.ts |
Adds the shared key resolver. |
ui/confirmation/utils.test.ts |
Tests resolver combinations. |
ui/confirmation/api.ts |
Adds refresher keys to confirmation context. |
MemoEdit/events.tsx |
Restarts only snapshot-enabled refreshers. |
MemoEdit/events.test.tsx |
Tests selective and disabled restarts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| const { scope } = baseContext; | ||
| if (canRestartRefresh(baseContext) && typeof scope === 'string') { | ||
| const refresherKeys = Array.isArray(baseContext.refresherKeys) |
Contributor
There was a problem hiding this comment.
nit:
we can use a superstruct to validate the context
const RestartRefreshContextStruct = type({
transaction: string(),
accountId: string(),
transactionsFetchStatus: enums(Object.values(FetchStatus)),
refresherKeys: array(enums(Object.values(ConfirmationContextRefresherKey))),
scope: KnownCaip2ChainIdStruct
})
export type RestartRefreshContext = Infer<typeof RestartRefreshContextStruct>;
canRestartRefresh(context: unknown): asserts context is RestartRefreshContext {
RestartRefreshContextStruct.is(context)
}
…sher keys for ungated MemoEdit Save
…simplify context refresh logic
khanti42
force-pushed
the
feat/confirmation-refresher-keys-alignment
branch
from
October 6, 2026 20:36
5e987e6 to
47882da
Compare
|
This branch was successfully deployed
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.



Explanation
Refactor: Confirmation Context Refreshers
shouldFetch/recoveryResultno-op Error slices such as RequiresMemo) until Save resets status and restarts the chain.resolveRefresherKeysutility that maps enable flags (enablePricing,enableSecurityScan,enableLocalSimulation) to refresher keys. It does not take fetch status.refresherKeys) from the dialog-open snapshot.References
Checklist