Skip to content

feat: TASK-21462 delete redux + dead-dep sweep - #2950

Merged
jjramirezn merged 7 commits into
tech-debtfrom
feat/TASK-21462-delete-redux
Sep 4, 2026
Merged

jjramirezn merged 7 commits into
tech-debtfrom
feat/TASK-21462-delete-redux

Conversation

@jjramirezn

@jjramirezn jjramirezn commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Lands via the tech-debt integration train (dev is merge-frozen). STACKED on #2949 (which stacks on #2917): base is temporarily the #2949 branch so this diff shows only the redux-deletion delta. Merge order: #2917 → #2949 → this; when #2949 merges (delete its branch), GitHub retargets this PR — verify the base is tech-debt before merging.

Summary

Deletes src/redux/ (all of it) and the five dead dependencies. The task's premise held: after the withdraw (#2917) and setup (#2949) rebuilds drained the two slices with real structure, what remained was mirrors.

Per-slice dissolution (the TASK-21462 map, as found):

  • user (19 read sites): it mirrored the [USER] TanStack query — useUserQuery fetched, then dispatched the same payload into redux, and the query's own placeholderData read the redux value back (self-referential). Readers now take user from useAuth() (same object, same query). Demo mode keeps its never-null-first-render guarantee (protected-route redirect race) via placeholderData: isDemoMode() ? DEMO_USER : undefined on the query — that was the slice's initialState seed.
  • wallet (1 consumer): a write-only echo of the ['balance'] query inside useWallet itself, plus a fallback that could only ever return the same query's last value. The query is now the single owner; while the address gate is unresolved the balance is undefined, which every downstream gate already treats as loading, never as headroom.
  • zeroDev (flags + kernel address): moved to src/hooks/useZeroDevFlow.ts — a module-level external store behind useSyncExternalStore. Not a context: writers sit on both sides of the provider tree (authContext resets it on logout, and authContext mounts ABOVE KernelClientProvider, so a context hook there is an import cycle). Singleton semantics identical to the slice. Consumers: useZeroDev, kernelClient.context, useStaleDeploymentReload, authContext.
  • bankForm: zero consumers left (feat: TASK-21816 withdraw on a URL-backed stepper + TASK-21454 Field #2917 moved DynamicBankAccountForm to react-hook-form). Deleted, along with the stale jest.mocks that still referenced it.
  • setup: already gone (feat: TASK-21460 setup flow on the URL stepper, kills the redux setup slice #2949).
  • On logout, queryClient.clear() (already there, deliberately ordered before the token wipe) is what wipes the user — the removed setUser(null) dispatch only cleared the mirror.

Dead-dep sweep:

  • Dropped @reduxjs/toolkit, react-redux, redux, ethers, siwe (the last two: zero imports anywhere).
  • knip entry config fixed: entry: ["src/**/*"] made every file an entry, which disabled unused-file/dead-export detection entirely — knip could only ever report unused deps. Now the Next plugin derives the real entries (+ src/app/sw.ts, which it misses). What it starts reporting — 18 unused files, 125 unused exports, 132 unused types, all pre-existing — is backlog, deliberately NOT deleted here (pnpm knip is a manual script, not a CI gate).
  • One shared FlowErrorState in interfaces.ts replaces the withdraw/onramp duplicate {showError, errorMessage} shapes. (The DirectSendFlowErrorState-style duplicates in features/payments/ flows are the same shape — left for the payments extraction lane, flagged here.)

Deferred (from the task's rider list)

  • @types/react 19 bump: attempted; it surfaces 25 real type errors across 12 files, including qr-pay/page.tsx (another lane's surface). Reverted — needs its own PR. (react itself is already 19.2.1, so the mismatch is real and worth that PR.)

Risks / breaking changes

  • Blast radius is wide but shallow: 19 user-slice read sites changed one hook call; the money-path files (useWallet, useZeroDev, kernelClient.context) changed only where their state lives, not what they do.
  • Wallet-balance behavior change (deliberate): the removed redux fallback could serve a stale balance while the query key flapped through the address gate; now the balance is honestly undefined there and the existing stable/last-known display cache covers paint. Gates fail closed either way.
  • AppStateProviders now mounts only wagmi. Provider order unchanged otherwise.
  • No backend changes.

QA

  • npm run typecheck clean · prettier clean · eslint on all touched files: 0 errors (2 pre-existing advisory warnings untouched) · npm run build green.
  • Jest: 5,415 passing, 1 failing — the documented pre-existing add-money-states › loaded EVM deposit case (fails identically on pristine dev; see feat: TASK-21816 withdraw on a URL-backed stepper + TASK-21454 Field #2917).
  • Test migration: every jest.mock('@/redux/...') re-pointed to what the source now reads (useAuth / useZeroDevFlow), merged where an authContext mock already existed; the useZeroDev login-failure assertion now checks setIsLoggingIn(false) directly; stale mocks of already-drained slices (bankForm, setup) deleted.

TASK-21462, last of the three rebuild PRs — the withdraw (TASK-21816) and
setup (TASK-21460) rebuilds drained the two slices with real structure, so
what remained was mirrors: the user slice echoed the [USER] TanStack query,
the wallet slice echoed the ['balance'] query, and bankForm had no consumers
left. Readers now use the query-backed useAuth()/useBalance directly.

The zeroDev flags move to a module-level external store
(src/hooks/useZeroDevFlow.ts, useSyncExternalStore): writers sit on both
sides of the provider tree (authContext resets on logout above
KernelClientProvider), so a context hook would be an import cycle.

Demo mode keeps its never-null-first-render guarantee via placeholderData
on the user query (was the slice's initialState seed).

Dead weight: drop @reduxjs/toolkit, react-redux, redux, ethers, siwe (the
last two had zero imports). knip's entry config listed every src file as an
entry, which disabled dead-export detection entirely — now only the real
entries are declared (sw.ts is the one the Next plugin misses); the findings
it starts reporting are backlog, not regressions. One shared FlowErrorState
(interfaces.ts) replaces the withdraw/onramp duplicates.

Deferred: @types/react 19 bump — tried, 25 type errors across 12 files
including qr-pay (a surface owned by another lane); follow-up PR.
@notion-workspace

Copy link
Copy Markdown

@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
peanut-wallet Ready Ready Preview Sep 4, 2026 7:20pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 33c74c49-f97a-4396-8719-45cdba8b51d0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

1 similar comment
@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

@jjramirezn
jjramirezn changed the base branch from tech-debt to feat/TASK-21460-setup-url-stepper September 3, 2026 16:04
@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Chip review — no blocking findings — this is not an approval

The Redux removal is coherent and CI is green, but the new shared ZeroDev external store has no behavioral coverage of its real subscription and reset contract.

Findings

  • MAJOR · src/hooks/useZeroDevFlow.ts:33 · Test the real ZeroDev store contract
    useZeroDevFlow now owns wallet address, kernel readiness, and UserOp-in-flight state for multiple consumers, but every test that mentions it replaces the module with a mock. A regression where an action updates the snapshot without notifying all subscribers, or where logout reset leaves address or isSendingUserOp behind, would still pass while the wallet remains blocked on stale identity state or stale-deployment reload becomes unsafe during a live UserOp. Add a focused hook test that mounts multiple real subscribers, drives the actions, verifies fan-out and unsubscribe behavior, and verifies reset() restores every field.

  • MINOR · src/hooks/useZeroDevFlow.ts:52 · [claude-opus] New zerodev shared-state store has no direct test; all consumers mock it
    src/hooks/useZeroDevFlow.ts is a new hand-rolled module-level store (mutable state, a listeners Set, write(), reset()) that replaces the deleted redux zeroDev slice. It is app-global shared state written from three places on both sides of the provider tree (authContext logout, kernelClient.context as clients build, useZeroDev around register/login/send), yet no test exercises the module itself: useStaleDeploymentReload.test.tsx, useZeroDev-invite-onboarding.test.tsx and useZeroDev-login-failure.test.tsx all jest.mock('@/hooks/useZeroDevFlow', ...), replacing both the hook and every action with stubs.

Exact untested cases:

  1. zeroDevFlowActions.setIsSendingUserOp(true) is observed by a mounted useZeroDevFlow() subscriber. This is the interlock useStaleDeploymentReload.ts:112 depends on (isSafeRef.current = !hasPendingTransactions && !isSendingUserOp && ...) to refuse a stale-deployment document reload while a userOp is in flight. If write() ever failed to notify, or the snapshot went stale, the app would reload mid-transaction and every current test would still pass, because they all mock the store.
  2. zeroDevFlowActions.reset() clears address and all four flags and notifies subscribers — the logout path in authContext.tsx:298 and the pre-registration wipe in useZeroDev.ts:82 both rely on this to drop the previous account's kernel address.

Fix: add a small src/hooks/tests/useZeroDevFlow.test.ts that renders useZeroDevFlow() with renderHook, asserts a subscriber re-renders with the new value after act(() => zeroDevFlowActions.setIsSendingUserOp(true)), and that after zeroDevFlowActions.setAddress('0x…') a reset() returns address to undefined and the flags to false. The repo already tests a comparable module-level useSyncExternalStore this way in src/hooks/tests/useNotifications.test.ts.

Checked clean

  • Verified the detached worktree HEAD, supplied merge base, trusted author, PR metadata, and exact-head CI checks.
  • Traced user ownership through useUserQuery and AuthProvider, including demo placeholder data, refresh behavior, and logout query clearing.
  • Traced wallet balance ownership through useBalance/useWallet, address matching, stale display caching, and spendability gates.
  • Traced all ZeroDev state readers and writers across registration, login, kernel initialization, logout, UserOp submission, and stale-deployment reload.
  • Checked the provider tree and all production imports; no runtime Redux imports remain.
  • Checked dependency and lockfile removal, knip entry configuration, and whitespace errors. The removed Redux package names remain as harmless stale externalization strings in both Next configs.

Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.

Third opinion by claude-opus: 1 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.

Exact head: 52e258ea07f5 · Context: repo · Took 10m (queued 25m)

Comment thread src/hooks/useZeroDevFlow.ts
…ePackageImports (Chip round 1)

Every consumer spec mocks the store, so nothing exercised the actual
subscription mechanics: fan-out to every mounted subscriber (the
stale-deployment-reload interlock reads isSendingUserOp live), unsubscribe
on unmount, per-field writes, and reset() restoring every field — which the
logout and pre-registration wipes rely on to drop the previous account's
kernel address. New useZeroDevFlow.test.ts runs all of it against the real
module. Also removes the two stale redux entries from both Next configs'
optimizePackageImports.
@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Chip review — no blocking findings — this is not an approval

Clean. The direct useZeroDevFlow contract tests added at this head resolve both prior missing-test findings, and the Redux removal preserves the reviewed user, wallet, ZeroDev, and logout behavior.

Checked clean

  • Confirmed the detached worktree HEAD and merge base exactly match the supplied head and base SHAs.
  • Checked prior findings P1 and P2 against the real useZeroDevFlow implementation and its new direct fan-out, field-isolation, unsubscription, and full-reset tests; both are fixed.
  • Reviewed the Redux-to-AuthContext and TanStack Query user-state migration, including demo seeding, auth failures, and logout cache clearing.
  • Reviewed the wallet balance mirror removal and ZeroDev shared-state writers/readers across registration, login, transaction sending, kernel initialization, stale-deployment reload protection, and logout.
  • Checked removed dependencies and source imports; no Redux, ethers, or siwe runtime imports remain.
  • Exact-head CI completed successfully, including unit, typecheck, eslint, format, and aggregate ci-success checks; the detached worktree has no installed Jest binary for an additional local run.

Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.

Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.

Exact head: 7f0238ab2000 · Context: repo · Took 8m

@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Chip review — no blocking findings — this is not an approval

Clean at the exact head. Both prior shared-store test findings are fixed by direct real-store coverage, and the broader Redux/dependency removal preserves the reviewed auth, wallet, and ZeroDev contracts.

Checked clean

  • Pinned worktree HEAD and merge base match the supplied head and base SHAs.
  • Prior P1 and P2 are fixed: useZeroDevFlow.test.ts imports the real store and covers initial state, multi-subscriber fan-out, field-preserving writes, unsubscribe, and full reset; the exact-head unit check passed.
  • ZeroDev writers and the stale-deployment reader preserve the former singleton transitions, including logout and pre-registration address resets plus the in-flight UserOp reload interlock.
  • User reads now share AuthProvider/TanStack data inside the same app provider boundary; the native demo route seeds the USER query synchronously before navigation.
  • Removing the wallet Redux fallback leaves unresolved or mismatched addresses undefined/loading and cannot create spendable headroom; the removed slice only mirrored the same address-gated query.
  • No imports of the deleted Redux, ethers, or siwe dependencies remain; exact-head unit, typecheck, eslint, format, design-system lint, baseline, and dependency-age checks passed.
  • The shared FlowErrorState move is shape-identical, and the web/native Next configs no longer retain deleted Redux packages in optimizePackageImports.
  • The aggregate report check was still in progress when this review completed; no completed exact-head check was failing.

Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.

Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.

Exact head: 85a796a099e4 · Context: repo · Took 10m

@jjramirezn
jjramirezn changed the base branch from feat/TASK-21460-setup-url-stepper to tech-debt September 4, 2026 19:08
…delete-redux

# Conflicts:
#	src/context/authContext.tsx
#	src/hooks/useZeroDev.ts
Came in with the encode-before-flag merge; its useAppDispatch/useZerodevStore
mocks pointed at the deleted module — now mocks useZeroDevFlow like the rest.
@jjramirezn

Copy link
Copy Markdown
Contributor Author

/chip review

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 7188.22 → 7218.88 (+30.66)
Findings: +293 net (+421 new, -128 resolved)

🆕 New findings (421)

  • critical complexity — src/context/kernelClient.context.tsx — CC 102, MI 57.33, SLOC 467
  • critical complexity — src/hooks/wallet/useWallet.ts — CC 59, MI 55.58, SLOC 210
  • critical complexity — src/features/home/components/HomeModals.tsx — CC 52, MI 63.37, SLOC 126
  • high hotspot — src/context/authContext.tsx — 57 commits, +343/-221 lines since 6 months ago
  • high hotspot — src/hooks/useZeroDev.ts — 56 commits, +668/-414 lines since 6 months ago
  • high hotspot — src/hooks/useSumsubKycFlow.ts — 53 commits, +760/-303 lines since 6 months ago
  • high hotspot — src/components/Home/HomeHistory.tsx — 43 commits, +429/-335 lines since 6 months ago
  • high complexity — src/context/authContext.tsx — CC 37, MI 55.19, SLOC 239
  • high complexity — src/components/Claim/Link/Onchain/Success.view.tsx — CC 36, MI 60.37, SLOC 153
  • medium high-mdd — src/components/Home/HomeHistory.tsx:57 — HomeHistory: MDD 102.2 (uses across many lines from declarations)
  • medium high-mdd — src/context/authContext.tsx:67 — AuthProvider: MDD 96.4 (uses across many lines from declarations)
  • medium high-mdd — src/context/kernelClient.context.tsx:311 — KernelClientProvider: MDD 90.9 (uses across many lines from declarations)
  • medium high-mdd — src/components/Claim/Link/Onchain/Success.view.tsx:31 — SuccessClaimLinkView: MDD 76.0 (uses across many lines from declarations)
  • medium high-dlt — src/hooks/useZeroDev.ts:63 — useZeroDev: DLT 72 (calls 72 distinct functions — high context load)
  • medium high-mdd — src/app/(mobile-ui)/history/page.tsx:46 — HistoryPage: MDD 56.9 (uses across many lines from declarations)
  • medium high-dlt — src/context/kernelClient.context.tsx:311 — KernelClientProvider: DLT 55 (calls 55 distinct functions — high context load)
  • medium high-dlt — src/components/Home/HomeHistory.tsx:57 — HomeHistory: DLT 54 (calls 54 distinct functions — high context load)
  • medium high-mdd — src/features/withdraw/WithdrawFlowContext.tsx:54 — WithdrawFlowProvider: MDD 49.5 (uses across many lines from declarations)
  • medium high-dlt — src/app/(mobile-ui)/history/page.tsx:46 — HistoryPage: DLT 49 (calls 49 distinct functions — high context load)
  • medium high-dlt — src/context/authContext.tsx:67 — AuthProvider: DLT 48 (calls 48 distinct functions — high context load)

…and 401 more.

✅ Resolved (128)

  • src/context/kernelClient.context.tsx — CC 102, MI 56.99, SLOC 481
  • src/hooks/wallet/useWallet.ts — CC 63, MI 55.68, SLOC 221
  • src/features/home/components/HomeModals.tsx — CC 52, MI 63.21, SLOC 128
  • src/context/authContext.tsx — 55 commits, +337/-212 lines since 6 months ago
  • src/hooks/useZeroDev.ts — 54 commits, +650/-394 lines since 6 months ago
  • src/hooks/useSumsubKycFlow.ts — 52 commits, +758/-301 lines since 6 months ago
  • src/components/Home/HomeHistory.tsx — 42 commits, +428/-333 lines since 6 months ago
  • src/context/authContext.tsx — CC 37, MI 54.97, SLOC 244
  • src/components/Claim/Link/Onchain/Success.view.tsx — CC 36, MI 60.24, SLOC 155
  • src/context/authContext.tsx:69 — AuthProvider: MDD 103.0 (uses across many lines from declarations)
  • src/components/Home/HomeHistory.tsx:58 — HomeHistory: MDD 102.2 (uses across many lines from declarations)
  • src/context/kernelClient.context.tsx:312 — KernelClientProvider: MDD 101.3 (uses across many lines from declarations)
  • src/components/Claim/Link/Onchain/Success.view.tsx:32 — SuccessClaimLinkView: MDD 76.4 (uses across many lines from declarations)
  • src/hooks/useZeroDev.ts:64 — useZeroDev: DLT 74 (calls 74 distinct functions — high context load)
  • src/hooks/useZeroDev.ts:64 — useZeroDev: MDD 70.8 (uses across many lines from declarations)
  • src/app/(mobile-ui)/history/page.tsx:47 — HistoryPage: MDD 56.9 (uses across many lines from declarations)
  • src/context/kernelClient.context.tsx:312 — KernelClientProvider: DLT 57 (calls 57 distinct functions — high context load)
  • src/components/Home/HomeHistory.tsx:58 — HomeHistory: DLT 55 (calls 55 distinct functions — high context load)
  • src/context/authContext.tsx:69 — AuthProvider: DLT 52 (calls 52 distinct functions — high context load)
  • src/app/(mobile-ui)/history/page.tsx:47 — HistoryPage: DLT 50 (calls 50 distinct functions — high context load)

…and 108 more.

📈 Painscore deltas (top movers)

File Before After Δ
src/hooks/useZeroDevFlow.ts 0.0 4.1 +4.1
src/services/services.types.ts 2.8 4.8 +2.0
src/constants/kyc.consts.ts 4.4 6.2 +1.8
src/utils/general.utils.ts 17.2 18.7 +1.5
src/interfaces/interfaces.ts 2.6 3.8 +1.2
src/interfaces/peanut-sdk-types.ts 0.5 1.6 +1.1
src/utils/history.utils.ts 10.7 11.6 +0.9
src/utils/mode.ts 5.3 6.2 +0.9
src/components/Global/InvitesGraph/types.ts 4.1 5.0 +0.9
src/constants/routes.ts 8.0 8.8 +0.7
src/types/api.generated.ts 3.2 3.9 +0.7
src/i18n/config.ts 5.3 6.0 +0.7
src/features/payments/shared/hooks/useCrossChainTransfer.ts 12.9 13.6 +0.7
src/context/kernelClient.context.tsx 13.4 14.0 +0.6
src/components/TransactionDetails/transactionTransformer.ts 15.8 16.4 +0.6
src/app/(mobile-ui)/dev/ds/audit/audit-data.ts 13.3 13.8 +0.6
src/lib/content.ts 9.4 10.0 +0.6
src/app/(mobile-ui)/dev/journey/journeyTypes.ts 1.7 2.2 +0.6
src/utils/webauthn.utils.ts 7.9 8.4 +0.5
src/utils/passkeyCeremony.utils.ts 5.4 6.0 +0.5

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • ✅ unit: 5477 ran, 0 failed, 0 skipped, 1.6m

📊 Coverage (unit)

metric %
statements 74.2%
branches 60.6%
functions 67.4%
lines 75.2%
⏱ 10 slowest test cases
time test
4.3s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
1.7s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › prefers the server value over a stale device mirror
1.4s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › saves the declared residence, refetches, and closes
1.3s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › moving to a country in neither slot leaves the second document alone
1.3s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › promoting the second document country swaps the pair instead of dropping one
1.1s src/components/Setup/Views/__tests__/Residence.test.tsx › reveals the second selector via the multi-doc link
1.1s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › the change cooldown shows its date and blocks changing to another country, not re-saving
1.0s src/hooks/query/__tests__/user.test.tsx › does NOT clear a token that rotated mid-request (stale 401 racing a fresh login)
1.0s src/components/Setup/Views/__tests__/Residence.test.tsx › returns to the selector from the congrats view
1.0s src/components/Profile/views/__tests__/ResidenceChangeModal.test.tsx › swaps from the server value with no device mirror at all
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Chip review — no blocking findings — this is not an approval

The Redux removal is functionally sound and the prior real-store coverage gap is fixed, but one migrated hook still documents Redux as its live source.

Findings

  • MINOR · src/components/Badges/useBadgeEarnToast.ts:16 · Update the badge-state ownership comment
    This hook now reads the profile from useAuth(), backed by the [USER] TanStack query, but its adjacent contract still says the badge list comes through the Redux user store. After this PR deletes that store entirely, a maintainer tracing badge refreshes is sent to a path that no longer exists. Update the comment to name AuthContext/the user query.

Inline anchors unavailable for 1 finding(s); the findings remain in this summary.

Checked clean

  • Verified the detached worktree head, supplied base SHA, and merge base exactly match the requested review target.
  • Rechecked prior finding P1: the new test imports the real useZeroDevFlow module and covers multi-subscriber fan-out, unmount, partial writes, and full reset including address, so it is fixed at this head.
  • Traced the user, wallet, and ZeroDev migrations through AuthProvider, KernelClientProvider, stale-deployment reload, demo entry, logout, and all changed production consumers.
  • Confirmed the repository has no live imports or runtime references to the five removed direct dependencies and that the lockfile prunes their dependency chains.
  • Checked exact-head CI: aggregate, unit, typecheck, lint, format, analysis, design-system lint, provenance, baseline, and preview checks passed; the non-gating screenshot job remained in progress.
  • Ran git diff --check and confirmed the detached worktree stayed clean; local focused tests were not rerun because this read-only worktree has no installed dependencies.

Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.

Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.

Exact head: 2acaa1ec5344 · Context: repo · Took 14m

@jjramirezn
jjramirezn marked this pull request as ready for review September 4, 2026 19:33
@jjramirezn
jjramirezn requested a review from Hugo0 as a code owner September 4, 2026 19:33
@jjramirezn
jjramirezn merged commit 0f5df20 into tech-debt Sep 4, 2026
22 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2acaa1ec Deployed Sep 4, 2026 by vercel[bot]
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.

1 participant