Skip to content

Conversation

@premtsd-code
Copy link
Contributor

@premtsd-code premtsd-code commented Feb 9, 2026

Summary

  • Replace deepClone (which uses JSON.stringify) with structuredClone in createConservative to fix BigInt serialization crash
  • Integer columns with 64-bit boundary min/max values (BigInt) cause JSON.stringify to throw TypeError: Do not know how to serialize a BigInt, silently preventing the edit panel from opening

Before

image

After

image

Test plan

  • Open an integer column's edit panel via the three-dot menu "Update" action
  • Verify the edit side sheet opens without errors
  • Confirm column name and other fields can be updated successfully

Fixes appwrite/appwrite#11225

@appwrite
Copy link

appwrite bot commented Feb 9, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Environment variable changes require redeployment to take effect

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

Walkthrough

The change replaces the deepClone function with the native structuredClone API in the history tracking initialization within src/lib/helpers/stores.ts. The corresponding deepClone import is removed from the module. This substitution maintains identical functionality while eliminating an external dependency. No public API signatures are affected.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: replacing deepClone with structuredClone to fix BigInt handling in conservative stores.
Linked Issues check ✅ Passed The code change directly addresses the issue by replacing JSON.stringify-based deepClone with structuredClone, which supports BigInt serialization, allowing the edit dialog to open for integer columns.
Out of Scope Changes check ✅ Passed All changes are within scope: replacing deepClone with structuredClone in createConservative function aligns with fixing the BigInt serialization issue.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/bigint-deepclone-serialization

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 and usage tips.

@premtsd-code premtsd-code self-assigned this Feb 9, 2026
@ItzNotABug ItzNotABug merged commit 9e8bde0 into main Feb 10, 2026
4 checks passed
@ItzNotABug ItzNotABug deleted the fix/bigint-deepclone-serialization branch February 10, 2026 05:36
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.

it's impossible to update column name in a table

2 participants