Plugin-host parse-fidelity API + semantic-validation tier#213
Merged
Conversation
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.
Closes #202.
Bundles the four follow-up items from #202:
ClipParseReportonClipData— plugins can now read fidelity diagnostics without re-parsing via the newClipData.ParseReportinit-only property.PluginHostpopulates it at everynew ClipDatasite from the liveClipaggregate's cached parse.IPluginHost.ValidateClipXml(clipType, xml) → ClipParseReport— pure pre-flight validator routed throughClipTypeRegistry.For(clipType).Parse(xml).Report. No mutation, no UI-thread gating. Lets external callers inspect lossiness before pushing XML throughUpdateClipXml/UpdateSelectedClipXml.Semantic-validator framework (no rules) — new
SharpFM.Model.Validationnamespace withIClipSemanticValidatorandSemanticValidatorRegistry. Wired intoClip.FromXmlandClip.FromEditorso diagnostics fold into a separateClipParseReport.SemanticDiagnosticslist. Structural and semantic axes stay distinct —IsLosslesskeeps its existing meaning, and a newIsSemanticallyValidmirrors it on the semantic side. Ships withBuiltIns = []; concrete rules land in follow-ups.Clip.Renamewired to a UI command — new "Rename..." context-menu item on the clip tree, backed byMainWindowViewModel.RenameSelectedClip. Adds theSharpFM.Dialogsnamespace (IInputPrompt+InputDialog) and fills in the previously-stubbedIPluginHost.ShowInputDialogAsyncvia the same plumbing.Also fixes a pre-existing UX gap: right-clicking a clip in the tree now promotes that node into the active selection before the context menu opens, so Rename / Delete / Copy operate on the right-clicked clip rather than whatever was previously focused.
1345 tests pass (
dotnet test SharpFM.sln).