fix(db): camelCase EvictionConfig fields for FFI consistency#5
Merged
Conversation
#4 で導入した EvictionConfig は serde rename_all 指定なしで snake_case フィールド (per_account_limit / ttl_days) を出力していた。 notecli の他の specta 型はすべて camelCase で統一されているため、 EvictionConfig だけ 不揃いになり tauri-specta 経由の TS bindings で違和感が出ていた。 #[serde(rename_all = "camelCase")] を追加し、 perAccountLimit / ttlDays に 揃える。 Rust 側のフィールド名は変更なし。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
6 tasks
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
#4 で導入した
EvictionConfigに#[serde(rename_all = \"camelCase\")]を追加し、TypeScript bindings をperAccountLimit/ttlDaysに揃える。Why
notecli の他の specta 型は基本 camelCase で統一されているが、
EvictionConfigだけ rename_all 指定が抜けていて snake_case (per_account_limit/ttl_days) のまま FFI 境界に出ていた。アプリ側 (notedeck) で扱うときに違和感が出るので一発で揃える。Rust 側のフィールド名は変更しない (snake_case のまま)。
Test plan
cargo test --lib db::で 27 件 全 pass