Repository navigation
Fold the files derived from a document beneath it in the viewer - #933
Merged
Merged
Conversation
A snapshot library that splits a document into files (a png and the text of each page, a csv per sheet) can say so: DiffRunner.LaunchDerived and AddDerivedDelete name the received file of the pending source a file was derived from. When the viewer is drawing that source as a document, the derived files open no tool, cost nothing against MaxInstancesToLaunch, and are shown beneath the document's row, which accepts or discards them with it. In every other case each file is launched exactly as before, so other diff tools are unaffected. The marker is additive on all three wires: a source line on move, diff and delete requests, a derived line on listings, and an optional Source property on the tray's Move and Delete payloads. An older tray, viewer or library yields ordinary rows, never a lost file.
This was referenced Oct 5, 2026
Merged
This was referenced Oct 5, 2026
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.
A snapshot library that verifies a document often verifies what it computed from the document as well: a png and the text of each page, a csv per sheet. Each is a pending file of its own, so a reviewer accepts the document and then every file derived from it, even though the viewer's row for the document has already shown its pages and its text.
This lets a caller say that a pending file was derived from a pending source, and has the viewer fold derived files beneath the document they came from.
API
Also
LaunchDerived,LaunchDerivedForText,LaunchDerivedForTextAsyncandAddDerivedDelete. Distinct names with no optional parameters, so no shipped signature changes (BinaryCompatibilityTestspins the old and the new).Behavior
MaxInstancesToLaunch, and is tracked with its source.+ Sample.Test (pdf) (5). Accept move +5 and Discard +5 take the document and everything beneath it, the document last. Expand in the row's menu, or a click on the row once it is selected, gives each derived file a row of its own.Wire
Additive on all three, so an older tray, viewer or library yields ordinary rows and never a lost file:
source:line onmove,diffanddeletederived: key|source keyline of its own, asheld:is"Source"on the Move and Delete payloads, which are byte for byte what they were without itThe tray stores and relays the marker; its menu is unchanged. The fold and the combined accept are the viewer's.
Notes
PiperTest.DeleteJsonsnapshotted a Move payload, so the "Add pending delete" sample indocs/tray.mdshowed a Move. It now shows a Delete.DocumentWatch.RereaddroppedWrittenwhen it re-read a held delete. It is carried now.docs/diff-tool.mdanddiffTools.include.mdpick up the20.7.0-beta.1version string. That is the test suite regenerating them, unrelated to this change.todo.mdlists what is open.The consumer is Verify 34, which reports the targets a converter derived from a document this way.