Skip to content

V17/last synced date#898

Merged
KevinJump merged 4 commits intov17/mainfrom
v17/last-synced-date
Feb 25, 2026
Merged

V17/last synced date#898
KevinJump merged 4 commits intov17/mainfrom
v17/last-synced-date

Conversation

@KevinJump
Copy link
Owner

Adds a notification that will listen for the bulk completion notification that fires when an import is completed, and save the date/time into the key value service for that group.

This will then allow us to present this to the user at some future date

Note

This PR does not include the UI to show the last synced date.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a tracking mechanism to record the last sync (import/export/report) date/time for each handler group (e.g., Settings, Content, Media) in uSync. When a bulk operation completes, a notification handler captures the group name and stores the timestamp in Umbraco's key-value service. This data is then exposed through the Management API so it can be displayed in the UI in a future PR.

Changes:

  • Added ISyncTrackerService with implementation to save and retrieve last sync timestamps per group using Umbraco's IKeyValueService
  • Extended notification classes (uSyncBulkNotification, uSyncImportCompletedNotification, etc.) to include an optional Group parameter for tracking which handler group was processed
  • Added JSON converters to multiple enums for consistent string-based JSON serialization across the API
  • Updated frontend workspace context to refresh actions after import completion and track current set name
  • Modified CSS grid layout for action buttons and added placeholder code (commented out) for future UI display of last sync dates

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uSync.BackOffice/Tracker/*.cs New tracker service, notification handler, and builder extensions for persisting and retrieving last sync timestamps
uSync.BackOffice/Notifications/uSyncNotifications/*.cs Added Group parameter to bulk notification classes with obsolete constructors for backward compatibility
uSync.BackOffice/Services/*.cs Updated service interfaces and implementations to pass group information through the sync pipeline
uSync.BackOffice/Models/SyncActionOptions.cs Added Group property to track which group is being processed
uSync.BackOffice/uSyncBackOffice.cs Added EverythingGroupName constant for the "all" group
uSync.Backoffice.Management.Api/Services/*.cs Made GetActions async to retrieve last sync dates from tracker service
uSync.Backoffice.Management.Api/Models/SyncActionGroup.cs Added LastSync property to expose timestamp to API consumers
uSync.Backoffice.Management.Client/usync-assets/src/workspace/workspace.context.ts Added tracking of current set name and refresh actions after completion
uSync.Backoffice.Management.Client/usync-assets/src/components/usync-action-box.ts Changed base class and added commented-out UI code for displaying last sync
uSync.Backoffice.Management.Client/usync-assets/src/workspace/views/default/default.element.ts Changed CSS from flexbox to grid layout for action buttons
uSync.Backoffice.Management.Client/usync-assets/src/constants.ts Added date/time formatting options for future use
uSync.Core/*.cs Added JsonConverter attributes to multiple enums for string-based JSON serialization
uSync.Backoffice.Management.Client/usync-assets/src/api/*.gen.ts Auto-generated API client files with updated types and localhost port
uSync.Backoffice.Management.Client/usync-assets/openapi-ts.config.ts Updated localhost port in OpenAPI configuration
Comments suppressed due to low confidence (4)

uSync.BackOffice/Notifications/uSyncNotifications/uSyncImportCompletedNotification.cs:17

  • Inconsistent punctuation in Obsolete attribute message. Most other Obsolete attributes in the codebase include a dash before "will be removed" (e.g., "Use the constructor with the group parameter instead - will be removed in v19"), but this one is missing the dash. For consistency with the rest of the codebase, add a dash after "instead".
    [Obsolete("Use the constructor with the group parameter instead will be removed in v19")]

uSync.BackOffice/Notifications/uSyncNotifications/uSyncExportCompletedNotification.cs:16

  • Inconsistent punctuation in Obsolete attribute message. Most other Obsolete attributes in the codebase include a dash before "will be removed" (e.g., "Use the constructor with group and actions instead - will be removed in v19"), but this one is missing the dash. For consistency with the rest of the codebase, add a dash after "instead".
    [Obsolete("Use the constructor with the group parameter instead will be removed in v19")]

uSync.Backoffice.Management.Client/usync-assets/src/workspace/views/default/default.element.ts:361

  • The CSS properties display: flex, flex-wrap, and align-content are still present but are not compatible with display: grid. When using CSS Grid (display: grid with grid-template-columns), properties like flex-wrap and align-content have no effect. These flex-related properties should be removed to avoid confusion and maintain clean CSS.
				flex-wrap: wrap;
				align-content: stretch;

uSync.Backoffice.Management.Client/usync-assets/src/components/usync-action-box.ts:125

  • The commented-out code for displaying the last sync date (renderLastSync method and its CSS) should be removed if it's not being used in this PR. According to the PR description, the UI to show the last synced date is not included in this PR. Keeping commented-out code can cause confusion about what is actually active. If this code is intended for future use, consider creating a separate branch or issue for it.
	// renderLastSync() {
	// 	if (!this.group?.lastSync) return nothing;
	// 	const lastSync = this.localize.date(
	// 		this.group.lastSync ?? '',
	// 		uSyncTimeFormatOptions,
	// 	);
	// 	return html`<div class="last-sync">Last Import : ${lastSync}</div>`;
	// }

	static styles = css`
		:host {
			flex-grow: 1;
		}

		.action-box {
			transition: opacity 0.2s ease-in-out;
		}

		.box-content {
			display: flex;
			flex-direction: column;
			align-items: center;
		}

		.box-heading {
			font-size: var(--uui-size-8);
			margin: 0;
		}

		umb-icon {
			margin: var(--uui-size-8) 0 var(--uui-size-10);
			font-size: var(--uui-type-h2-size);
			color: var(--uui-color-text-alt);
		}

		uui-button {
			margin: 0 var(--uui-size-space-2);
			font-size: var(--uui-size-6);
		}

		.box-buttons {
			margin: var(--uui-size-space-2) 0;
		}

		.disabled {
			opacity: 0.4;
		}

		.last-sync {
			color: var(--uui-color-text-alt);
			font-style: italic;
			font-size: var(--uui-size-5);
		}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KevinJump KevinJump merged commit c532974 into v17/main Feb 25, 2026
4 checks passed
@KevinJump KevinJump deleted the v17/last-synced-date branch February 25, 2026 11:21
alexsee pushed a commit to alexsee/umbraco-container that referenced this pull request Mar 7, 2026
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Updated [uSync](https://github.com/KevinJump/uSync) from 17.0.2 to
17.0.4.

<details>
<summary>Release notes</summary>

_Sourced from [uSync's
releases](https://github.com/KevinJump/uSync/releases)._

## 17.0.3

This is a patch release of uSync for Umbraco v17 - it contains some
fixes for reported issues.

> [!NOTE]
> This version supports all versions of Umbraco v17.*

## What's Changed
* ⭐ Add IgnoreStopIfOnceExists setting for write-only deployments by
@​Copilot in KevinJump/uSync#879
* ⭐ Add cleanup in DocumentUrl tables when the content key changes. by
@​KevinJump in KevinJump/uSync#869
* ⭐ refresh the trees in settings when uSync finishes an import by
@​KevinJump in KevinJump/uSync#892
* ⭐ V17/extension example by @​KevinJump in
KevinJump/uSync#888
* Ensure we don't build the extend examples unless we are in debug. by
@​KevinJump in KevinJump/uSync#889
* 🐛 Fix - when descriptions are blank, they get filled with 'null' by
@​KevinJump in KevinJump/uSync#890
* 🐛 Fix - don't save 'null' in property type description name by
@​KevinJump in KevinJump/uSync#891
* ⬆️ update readme by @​KevinJump in
KevinJump/uSync#893
* ⬆️ move to centralised package management by @​KevinJump in
KevinJump/uSync#894
* ⬆️ update dependencies by @​KevinJump in
KevinJump/uSync#895
* ⬆️ add explicity JsonConverters to all enums, so they are always
serialized as strings by @​KevinJump in
KevinJump/uSync#897
* 🆙 V17/last synced date by @​KevinJump in
KevinJump/uSync#898
* ⬆️ V17/object property extensions by @​KevinJump in
KevinJump/uSync#896

**Full Changelog**:
KevinJump/uSync@v17.0.2...v17.0.4

Commits viewable in [compare
view](https://github.com/KevinJump/uSync/commits).
</details>

Updated [uSync.Complete](https://jumoo.co.uk/uSync/complete) from 17.0.1
to 17.1.1.

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.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