feat: telemetry motion, dark-mode chip fallback, debounced dispatch, request_withdrawal invariants - #1064
Merged
leojay-net merged 1 commit intoJun 27, 2026
Conversation
…request_withdrawal invariants Implements four assigned issues: - chatTelemetry: reduced-motion-aware, intent-weighted framer-motion variants (leojay-net#674) - useTransactionFilters: dark-mode fallback for filter chip tones (leojay-net#671) - chatStateMachine: debounced event dispatcher that collapses rapid event bursts (leojay-net#588) - stellar-contracts: invariant tests for request_withdrawal (leojay-net#572) The contract crate did not compile on main due to a pre-existing botched merge: math.rs had duplicated mul_div_floor/mul_div_ceil and was missing the checked_mul_div_* helpers that lib.rs already calls, and test.rs referenced a renamed binding. Minimal fixes restore the intended API so the new invariant tests compile and the full suite passes. Closes leojay-net#674 Closes leojay-net#671 Closes leojay-net#588 Closes leojay-net#572
|
@davidmaronio Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
leojay-net
added a commit
that referenced
this pull request
Jul 25, 2026
feat: telemetry motion, dark-mode chip fallback, debounced dispatch, request_withdrawal invariants
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
Implements four assigned issues in a single PR.
feat(frontend): framer-motion animation in chatTelemetry.ts(#674)Adds reduced-motion-aware, intent-weighted framer-motion variants for telemetry chips/toasts:
getTelemetryMotionVariants({ reducedMotion?, intent? })returns intent-weighted enter/exit variants, or a movement-free fade when reduced motion is requested.prefersReducedMotion()— SSR-safeprefers-reduced-motiondetection (honours the user's OS setting, falls back tofalseon the server).reducedTelemetryMotionVariants(opacity-only) andtelemetryEventMotionIntent(name)to map event names → visual weight.telemetryMotionVariantsexport is unchanged.feat(frontend): dark mode fallback in useTransactionFilters.ts(#671)Guarantees filter chip tones render correctly in dark mode:
withDarkModeFallback(tone)/ensureDarkModeClasses(className, fallback)backfill neutraldark:classes onto any tone field that lacks them.getAccessibleFilterChipTonenow passes tones through the fallback. Built-in palettes already shipdark:variants, so they are returned unchanged (no regression).feat(frontend): debounce mechanism in chatStateMachine.ts(#588)Adds
createDebouncedDispatcher(machine, delayMs)— a debounced event dispatcher that collapses rapid event bursts (e.g. fast typing repeatedly firingSEND_MESSAGE) into a single trailing transition. Exposesdispatch/flush/cancel/isPendingand aDEFAULT_DISPATCH_DEBOUNCE_MSdefault.feat(contract): invariant tests for request_withdrawal(#572)New
test_issue_572module locking in the accounting invariantsrequest_withdrawalenforces viacheck_invariants:total_liabilities <= net_depositedand on-chain balance covers the net position;WithdrawalRequestedevent.Build unblock (pre-existing, not caused by this change)
The contract crate did not compile on
maindue to a botched merge, which also blocked these new tests from compiling. Minimal fixes restore the intended API:src/math.rshad duplicatemul_div_floor/mul_div_ceildefinitions (one mangled) and was missing thechecked_mul_div_floor/checked_mul_div_ceilhelpers thatlib.rsalready calls at two sites. Reconstructed the checked helpers + panicking wrappers; behaviour is validated by the crate's existingmathtests.src/test.rsreferenced a renamed binding (token→_token).Test plan
pnpm exec vitest runfor the three affected frontend test files — 109 passedtsc --noEmit— no errors in the changed fileseslint— clean on all changed frontend filescargo test(contract crate) — 379 passed, 0 failed (incl. the 7 new invariant tests and themathtests)cargo clippy— no warnings introduced by the changed/added filesOut of scope (pre-existing on
main)Dechat/dex_with_fiat_frontend/src/hooks/useChat.tsstill contains unresolved merge-conflict markers (failstsc/build) — untouched here.clippywarnings in other contract test files (unused variables) remain; none are in the files changed by this PR.Closes #674
Closes #671
Closes #588
Closes #572