Conversation
Manually cleaning the codecs introduced side effects, and the Codecs were unavailable once a story was visited. For example, display a story using the Model Codecs like Monitoring story, then going to another story and displaying the Monitoring story again. In the latter, the model wasn't fill. This was because ModelSerializer registers the Codecs but only once. If we unregistered the Codecs manually as we do for stories, the ModelSerializer is currently unable to know it has to register the Codecs again (by forcing the registration). The workaround is to force registration of Model Codecs before loading every story.
WalkthroughThis change introduces the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant ResetFunction as resetMaxGraphConfigs
participant CodecRegistrar as registerModelCodecs
participant ModelSerializer
Caller->>ResetFunction: Call resetMaxGraphConfigs()
ResetFunction->>ResetFunction: Reset and clear codec registry
ResetFunction->>CodecRegistrar: Invoke registerModelCodecs()
CodecRegistrar->>ModelSerializer: (Re)register model codecs
ModelSerializer-->>CodecRegistrar: Acknowledge registration
CodecRegistrar-->>ResetFunction: Complete re-registration
ResetFunction-->>Caller: Return control
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|



Manually cleaning the codecs introduced side effects, and the Codecs were unavailable once a story was visited.
For example, display a story using the Model Codecs like Monitor story, then going to another story and displaying
the Monitor story again. In the latter, the model wasn't fill.
This was because
ModelSerializerregisters the Codecs but only once. If we unregistered the Codecs manually as we dofor stories, the
ModelSerializeris currently unable to know it has to register the Codecs again (by forcing the registration).The workaround is to force registration of Model Codecs before loading every story.
Summary by CodeRabbit