## Problem On a customer's payments view, submitting a manual item quantity change makes the "New balance: X → Y" preview in the dialog briefly flip to the post-change values (e.g. `0 → 10` flashes to `10 → 20`) right before the dialog closes. ## Root cause The preview was computed from the live `currentQuantity` prop, which comes from `useItem()` in the parent row. The SDK's `createItemQuantityChange` awaits its item cache refresh before resolving, so the prop updates to the new quantity while the dialog is still open (and stays visible through the close animation), recomputing the preview with stale input text. ## Fix Snapshot the quantity when the dialog opens (in the existing reset-on-open effect) and compute the preview from the snapshot instead of the live prop. The preview now consistently shows the balance as of when the dialog was opened. ## Before vs after Recorded against built servers (before = `dev`, after = this branch). The transactions refetch is artificially delayed by 5s in both recordings to stretch the flicker window to a visible length — on production latency it's a split-second flash. https://github.com/user-attachments/assets/c005ef3b-45cb-4b75-bd71-5f723eae0c50 ## Tradeoffs If the quantity changes externally while the dialog is open, the preview shows the value from open time. The mutation is a delta, so correctness of the applied change is unaffected. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Stabilized the quantity change preview while the dialog is open. * The “New balance” display now consistently shows the quantity at opening and the calculated updated quantity, even if underlying values change during submission. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hexclave
The user infrastructure platform.
Hexclave handles everything around your users: authentication, teams, payments, emails, analytics, and much more. Start in minutes on the hosted cloud. Your data is always yours to export and self-host.
Get started
Setting up Hexclave is one prompt. Paste this into your coding agent of choice:
Read skill.hexclave.com and help me setup hexclave in this project
For AI agents
If you're an AI coding agent, use your web fetch tool or curl the skill documentation for up-to-date integration instructions:
curl -sSL "https://skill.hexclave.com?question=<your-question>&context=<your-context>"
What's included
Hexclave ships as a catalog of apps you switch on as your product needs them. Each one is built on the same user model, and new apps land regularly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contributing
Hexclave is open source, and contributions are welcome. Read
CONTRIBUTING.md to get started, and say hello in
Discord before picking up anything large.
Found a security issue? Email [email protected].










