Repository navigation
Add the set view with the per-item diff rendered progressively - #2576
Merged
Merged
Conversation
This was referenced Oct 19, 2026
pournasserian
added a commit
that referenced
this pull request
Oct 20, 2026
…test gaps (#2657) Closes #2627 ## What Follow-ups from the independent review of #2576 (F-DSK, #2422). - **The set view's diff island carries its prerendered diff into the circuit.** - The island keeps the diff it prerendered in `PersistentComponentState`, and the circuit takes it back. - The circuit shows the same items at once. It doesn't read the diff again and never shows "Loading the items…" in their place. - `ItemDiff.Restore` and `ValueDiff.Restore` rebuild the diff model from what was kept, as `ChangeOperation.Restore` already does for operations. - **The circuit hub takes messages up to 1 MB.** Kept state travels in the circuit's first message, so the 32 KB default would refuse a large set's diff. The hub requires a signed-in person. Kept state reaches the hub about 1.8 times as large as its JSON, because Blazor encodes it twice and encrypts it. So a diff over 480 KB of JSON isn't kept, and the circuit reads it again as before. `AdminLimits` holds both sizes. - **A source with a look-alike host** shows the host it resolves to next to the link text. For example, `https://аpple.com/` with a Cyrillic "а" shows `(host xn--pple-43d.com)`. The address the link opens is unchanged. - **History labels go through the localizer.** An event without its own label reads "Other event (operation)", and the "UTC" suffix is localized. ## Why - **Persisted state, not a second read.** On PostgreSQL the second read was truly asynchronous, so the list emptied while it ran: the scroll jumped, folded items opened again, and focus on a summary was lost. Carrying the diff costs the size of the state, which the hub limit covers. ## Tests - **Browser, on PostgreSQL when it is configured (as in CI):** a 200-item set arrives in batches to all 200 items. The number of items shown never drops below the prerendered batch when the circuit attaches. Without the fix, the test fails on PostgreSQL. - **Browser:** a set of 100 long pages, whose diff is too large to keep, still attaches its circuit and shows all 100 items. With the earlier limit of 768 KB, this test fails. - **Host, on SQLite and PostgreSQL:** - The set view shows its rationale, sources, history and first items. - A look-alike source shows its punycode host, and only that one. - A rejected revert shows its reason. - A set an agent opened over MCP shows the agent and renders with `dir="rtl"`. - **bUnit:** - The circuit takes the prerendered diff without reading it again or showing the busy state. - `AsciiHost` names a look-alike host and leaves an ASCII host or an IPv6 address alone. - A diff too large to keep is read again by the circuit. - **Unit:** a restored item diff holds what it was restored from. `dotnet build -warnaserror`, the unit and bUnit suite, and the set view, review, keyboard and accessibility tests on SQLite and PostgreSQL pass locally. No new package and no new project reference. ## Checklist - [x] Linked to an issue a maintainer has confirmed - [x] Targets `v2` - [x] Tests or docs updated where behaviour changed - [x] No tool-generated co-author trailers or footers
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 #2574
What
The second slice of F-DSK (#2422): the set view (DSK-03), with the per-item diff rendered progressively (PERF-04). It is read only; approve, reject and revert are the next slice.
/sets/{id}(ChangeSetView.razor, static server rendering):httporhttpsaddress is a link withtarget="_blank"andrel="noopener noreferrer". Anything else, such as a file name, a person or ajavascript:address, is text.IAuditReader. Refused moves are listed too. The first 200 are shown, with a link to the full history.NavigationManager.NotFound(), so the page answers 404 with the not-found page.ChangeSetItems(Components/Review): the interactive island. It readsIChangeSetDirectory.DiffAsyncand renders the mergedDiffView. The first 25 items arrive with the prerendered page and the circuit adds the rest in batches. A refused read is reported in place of the items.Why
IChangeSetListsuses.httpandhttpskeepsjavascript:and local paths from becoming clickable.Tests
ChangeSetViewTests:rel.Openableacceptshttpandhttpsand refusesjavascript:,file:,mailto:and a bare host.DeskTests: a set row links tosets/{id}.javascript:link and the text source. The history lists opened, submitted and awaiting review. The prerendered island holds the first 25 items, isaria-busyand carries the Blazor marker for the circuit.dotnet build -warnaserrorand the full suite pass locally against apostgres:17container as well as SQLite. One loaded run had eight PostgreSQL and job-lease timing failures in classes this PR does not touch; all 102 tests of those classes passed on a rerun. The batches over the circuit were not checked in a browser here: the prerendered first batch is tested, and #2479 checked the batching on/ui. No new package and no new project reference.Checklist
v2