Skip to content

Use ConfigureExternalJsonOptions in FwLiteJson - #2528

Merged
hahn-kev merged 2 commits into
sillsdev:developfrom
hahn-kev-bot:claude/fwlitejson-configure-options-i78ivn
Aug 6, 2026
Merged

Use ConfigureExternalJsonOptions in FwLiteJson#2528
hahn-kev merged 2 commits into
sillsdev:developfrom
hahn-kev-bot:claude/fwlitejson-configure-options-i78ivn

Conversation

@hahn-kev-bot

Copy link
Copy Markdown
Collaborator

Fix a change missed when migrating


🤖 AI-generated summary

FwLiteJson.ConfigureJsonSerializerOptions now calls harmonyConfig.ConfigureExternalJsonOptions(options) instead of manually layering on harmonyConfig.MakeJsonTypeModifier().

The previous code only added Harmony's JSON type-info modifier. ConfigureExternalJsonOptions does that and wires up Harmony's change converter, giving full IChange/IObject polymorphism support so ChangeEntity<IChange> fields round-trip correctly.

This aligns the Blazor/JSInterop serializer setup with the pattern already used elsewhere in the codebase:

  • FwLiteWeb/FwLiteWebKernel.cs (ASP.NET JsonOptions)
  • LcmCrdt/Json.cs (MakeLcmCrdtExternalJsonOptions)
 options.TypeInfoResolver = (options.TypeInfoResolver ?? new DefaultJsonTypeInfoResolver())
-    .WithAddedModifier(harmonyConfig.MakeJsonTypeModifier())
     .AddExternalMiniLcmModifiers();
+harmonyConfig.ConfigureExternalJsonOptions(options);

MakeJsonTypeModifier has no remaining call sites in the repository after this change.

Test plan

  • Build FwLiteShared (and dependents FwLiteMaui/FwLiteWeb) — not yet compiler-verified in this environment
  • Verify JSInterop serialization still works: open FW Lite Web, create/open a project, and confirm entries load and edit without serialization errors
  • Confirm sync payloads containing ChangeEntity<IChange> fields round-trip correctly

Switch FwLiteJson.ConfigureJsonSerializerOptions to call
harmonyConfig.ConfigureExternalJsonOptions instead of manually adding
harmonyConfig.MakeJsonTypeModifier, matching the pattern used in
FwLiteWebKernel and LcmCrdt.Json. This lets Harmony add both its
type-info modifier and change converter for IChange/IObject polymorphism.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzhApSCWEWcL9E5wjuneqC
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c0a8fd49-7971-40e9-a37d-707b696c1e69

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The JSON serializer configuration now delegates external option setup to harmonyConfig.ConfigureExternalJsonOptions(options) instead of registering a modifier directly.

Changes

JSON serializer configuration

Layer / File(s) Summary
Delegate external JSON option configuration
backend/FwLite/FwLiteShared/Services/FwLiteJson.cs
ConfigureJsonSerializerOptions now calls ConfigureExternalJsonOptions(options) instead of adding the modifier returned by MakeJsonTypeModifier().

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Poem

I’m a small rabbit, pleased to see
JSON options configured cleanly.
No direct modifier hops the chain,
Harmony guides the flow again.
hop hop—the serializer sings!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: using ConfigureExternalJsonOptions in FwLiteJson.
Description check ✅ Passed The description explains the serializer migration, its purpose, related code patterns, and the planned tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@hahn-kev hahn-kev added the self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes label Aug 6, 2026
@argos-ci

argos-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Aug 6, 2026, 8:05 AM
e2e (Inspect) ✅ No changes detected - Aug 6, 2026, 8:12 AM

@hahn-kev
hahn-kev merged commit 6f8fbf1 into sillsdev:develop Aug 6, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants