Skip to content

fix: preserve chronological order of audit groups in version history#931

Merged
kptdobe merged 1 commit into
mainfrom
vgrpfix
May 13, 2026
Merged

fix: preserve chronological order of audit groups in version history#931
kptdobe merged 1 commit into
mainfrom
vgrpfix

Conversation

@kptdobe
Copy link
Copy Markdown
Contributor

@kptdobe kptdobe commented May 13, 2026

Summary

When two audit entries fell on the same calendar day but were separated by a labelled version, they were incorrectly merged into a single group — breaking the chronological block structure of the history panel.

  • Audit entries are now only grouped with the immediately preceding audit block; a labelled version always starts a new block below it
  • Updated the existing test to reflect the corrected behaviour and added a dedicated regression test for the cross-version grouping scenario

Test plan

Before:

Open the version history and check the May 5th ordering:

  • before: Previewed, all edit sessions, rest of the Previewed

  • now: edit session then Previewed, edit session then Previewed....

  • Open the version history panel for a document that has audit entries both before and after a labelled version on the same day — verify they appear in two separate groups with the labelled version between them

  • Verify that consecutive audit entries on the same day (with no version in between) are still grouped together as before

  • npm test passes

🤖 Generated with Claude Code

…ersion

Audit entries on the same day were incorrectly merged into one group even
when a labelled version sat between them. Now grouping only applies to
consecutive audits with no version boundary in between.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented May 13, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@kptdobe kptdobe merged commit b0e781b into main May 13, 2026
3 of 4 checks passed
@kptdobe kptdobe deleted the vgrpfix branch May 13, 2026 13:32
chrischrischris added a commit that referenced this pull request May 15, 2026
…939)

PR #931 changed formatVersions to keep audit entries in separate groups
when split by a labeled version boundary. The test now finds two
.is-audit elements (one before and one after 'ver 1'), causing a strict
mode violation. Use .first() to target the most recent audit group.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants