Skip to content

[MS-1145] Visual sync button responsiveness optimization#1356

Merged
alex-vt merged 1 commit into
release/2025.3.0from
sync-button-responsiveness-fix
Sep 10, 2025
Merged

[MS-1145] Visual sync button responsiveness optimization#1356
alex-vt merged 1 commit into
release/2025.3.0from
sync-button-responsiveness-fix

Conversation

@alex-vt
Copy link
Copy Markdown
Contributor

@alex-vt alex-vt commented Sep 9, 2025

JIRA ticket
Will be released in: 2025.3.0

Root cause analysis (for bugfixes only)

First known affected version: 2025.3.0 dev only

  • The forceEventSync and toggleImageSync invoke sync purely on the data layer, so the UI was remaining unaware of the forced sync command until data-driven evidence of sync was starting to appear. This could take seconds on slow devices.

Notable changes

  • Each forced sync, invoked by forceEventSync and toggleImageSync, immediately reshapes the flow of events: At first we immediately emit a sync state that is forcefully marked as in progress, for events or images separately. And we start ignoring sync states that happen before the true progress in data layer appears. Once the true progress in data layer starts, we keep showing that true progress. Additionally, an initial progress is emitted on start, before any forced sync invocations - to prevent getting stuck on start.

Testing guidance

  • Record and image sync buttons react immediately when used to start the sync.

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

@cla-bot cla-bot Bot added the ... label Sep 9, 2025
@alex-vt alex-vt changed the base branch from main to release/2025.3.0 September 9, 2025 16:01
}
}

private fun SyncInfo.forceEventSync() = copy(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would forceEventSyncProgress() be more precise here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As this is resolved too, and nothing else to resolve - I'll merge.

@alex-vt alex-vt force-pushed the sync-button-responsiveness-fix branch from 3f82e9e to 5eebb52 Compare September 9, 2025 16:51
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 9, 2025

* This may take seconds on slow devices.
*
* How it works with the optimization:
* Each forced sync, invoked by forceEventSync and toggleImageSync, immediately reshapes the flow of events:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMO, only this paragraph is relevant; the rest can be pruned.

Also, this is not a KDoc comment, so it should not have the double star at the beginning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the double star, but let's stay a bit more descriptive than usual about this non-trivial feature. There's been a history of more comments requested in similar situations rather than less.

@alex-vt alex-vt merged commit 32f8615 into release/2025.3.0 Sep 10, 2025
13 checks passed
@alex-vt alex-vt deleted the sync-button-responsiveness-fix branch September 10, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants