Skip to content

fix(db): camelCase EvictionConfig fields for FFI consistency#5

Merged
hitalin merged 1 commit intomainfrom
fix/eviction-config-camelcase
Apr 28, 2026
Merged

fix(db): camelCase EvictionConfig fields for FFI consistency#5
hitalin merged 1 commit intomainfrom
fix/eviction-config-camelcase

Conversation

@hitalin
Copy link
Copy Markdown
Owner

@hitalin hitalin commented Apr 28, 2026

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

#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>
@hitalin hitalin merged commit aedb5af into main Apr 28, 2026
1 check failed
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