Repository navigation
Carry the set view's prerendered diff into the circuit and close its test gaps #2627
Copy link
Copy link
Closed
Labels
area:deskReview desk (DSK)Review desk (DSK)type:bugDefectDefectv2FluentCMS v2 (v2 branch)FluentCMS v2 (v2 branch)
Milestone
Description
Part of #2422 (F-DSK). Follow-up to #2576: findings from an independent review of the merged set view.
Findings
- Medium: the diff island loads the diff twice and the items flash on PostgreSQL. Nothing carries the prerendered diff into the circuit, so
ChangeSetItemscomputes it again when the circuit attaches. While the second read awaits, the page shows "Loading the items…" in place of the prerendered items. On PostgreSQL that read is truly asynchronous, so the list collapses: the scroll position jumps, folded items open again and focus on a summary is lost. - Medium: Acceptance not fully tested.
- 200 items arriving progressively over the circuit: only the prerendered first batch of a 30-item set is tested.
- Rendering with
dir="rtl": only a class scan checks it. - SQLite and PostgreSQL: the host tests run on SQLite only.
- A set opened by an agent end to end: only covered with fakes.
- Low: look-alike domains in sources. A source such as
https://аpple.com/, with a Cyrillic "а", shows as "apple.com". The link should show the punycode host for a non-ASCII host. - Low: some history labels skip the localizer. An event the view has no label for shows its raw operation code, and "UTC" is a literal.
- Already fixed on v2: the checks card text, by Show the check run on the set view and submit an open set #2607, and the third copy of the move names plus the 200-event cut-off, by Add read-only desk tools for agents #2594.
Scope
- The island carries the diff it prerendered into the circuit through
PersistentComponentState, so the circuit renders the same items without reading again or flashing.- The diff model gets
Restorefactories, asChangeSetandChangeOperationalready have:ItemDiff.Restore(operation, properties, fields)andValueDiff.Restore(name, change, before, after). The island can then rebuild what it persisted.
- The diff model gets
- A source with a non-ASCII host shows its punycode host next to the link text, for example
xn--pple-43d.com. The address the link opens is unchanged. - An event without a label shows "Other event" with its code beside it, and the time suffix goes through the localizer.
- Tests:
- A browser test opens a 200-item set and sees all 200 items arrive, with the list never emptying when the circuit attaches.
- A host test renders the view with
?dir=rtl. - The set view host tests run on SQLite and PostgreSQL, with an agent-opened set among them.
Acceptance
- Opening a set reads its diff once per page load, and the prerendered items stay in place when the circuit attaches. A browser test checks that the item count never drops.
- The look-alike source shows its punycode host.
- The tests above pass on both providers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:deskReview desk (DSK)Review desk (DSK)type:bugDefectDefectv2FluentCMS v2 (v2 branch)FluentCMS v2 (v2 branch)
Activity
Carry the set view's prerendered diff into the circuit and close its …