Skip to content

feat: explain reordered levels and catch tied page order - #10

Merged
andresvillenas merged 1 commit into
mainfrom
feat/reorder-guidance
Oct 1, 2026
Merged

andresvillenas merged 1 commit into
mainfrom
feat/reorder-guidance

Conversation

@andresvillenas

Copy link
Copy Markdown
Collaborator

Makes a reordered level easy to understand, and fixes a case where a level was reported as in sync while the target showed it in a different order.

Why

Syncing only some pages of a level is the usual way to end up with a different page order on the target: Content Sync sends each synced page's order value, and the pages left out keep theirs. The status page then marked the whole level "Out of date on target", with the only explanation in a tooltip and no hint of which page was out of place.

Changes

  • Label. Rows out of date only because their level's order differs show Order differs on target. The status is still Out of date, so sorting, the Status filter and Needs action are unchanged. The Status column's header tooltip explains the new label.
  • Which pages, and the fix. The comparer finds the fewest pages out of place (the pages outside a longest strictly increasing run of target order values, O(n log n), deterministic) and carries them with the level's parent on each reordered row (ContentSyncStatusItem.Reorder). The tooltip reads, for example: "Page order on this level differs on the target: Coffee Beverages Explained is in a different position there. This usually happens when only some pages of a level are synced. To fix it, use Sync with all subpages on Articles." Up to 3 names, then "and N more"; the channel's top level says to sync all pages on the level. No wire change.
  • Tied order values (bug). Pages that share an order value on the target now count as out of order. A partial sync leaves such ties, and Kentico then shows tied pages in whatever order the database returns. The previous GUID tie-break could report the level as In sync while the target's page tree showed it differently.
  • Docs. Usage Guide: "Why does a whole level show Order differs on target?" (cause, fix, and when it can be ignored). Foundation spec: the out-of-place rule, the tie rule and the end-to-end check. Admin page spec: label and tooltip.

Testing

  • 232 unit tests pass (new: the rig's case naming only the page out of place, two swapped pages named deterministically, several pages out of place, an unchanged level, tied order values on the target, the label, and the tooltip wording for one, two, many pages and the top level).
  • Verified end to end on 31.7.2, driven with the Playwright CLI, with real drags and syncs:
    1. Dragged Which brewing fits you? from last to first in the source's page tree: every article showed Order differs on target, and the tooltip named only that page.
    2. Used Sync this page on it. Kentico also synced the articles it links to, leaving two pairs sharing an order value on the target, and the target's page tree showed one pair in the opposite order. Before the tie fix the status page said In sync here; with it, the level shows Order differs and the tooltip names one page of each tied pair.
    3. Used Sync with all subpages on Articles: every article returned to In sync, and the target's page tree matched the source.

Make a level whose pages are in a different order on the target easy
to understand, and stop reporting such a level as in sync when the
target's order is undefined.

- Rows marked out of date only because their level's order differs are
  labeled "Order differs on target". The status is still Out of date,
  so sorting and filters are unchanged.
- The comparer finds the fewest pages out of place (the pages outside a
  longest increasing run of target order values) and carries them, with
  the level's parent, on each reordered row. The tooltip names them,
  gives the usual cause (a partial sync) and the fix (Sync with all
  subpages on the parent).
- Pages that share an order value on the target count as out of order.
  A partial sync leaves such ties, and Kentico then shows them in
  whatever order the database returns; the previous GUID tie-break
  could report the level as in sync while the target showed it
  differently.
- Add a Usage Guide entry on why a whole level shows "Order differs on
  target", and update the foundation and admin page specs, including
  the end-to-end check on the rig.
@andresvillenas
andresvillenas merged commit 9653a8e into main Oct 1, 2026
3 checks passed
@andresvillenas
andresvillenas deleted the feat/reorder-guidance branch October 1, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant