Skip to content

Conversation

@MrDirkelz
Copy link
Collaborator

No description provided.

@MrDirkelz MrDirkelz requested a review from Copilot July 2, 2025 10:58
@MrDirkelz MrDirkelz self-assigned this Jul 2, 2025
Copy link

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 adds real-time network change detection to EditContent.vue, suppressing alerts during local saves and displaying a warning badge when remote updates are detected.

  • Introduces liveContent, saveWasCalled, and networkChanges to detect and flag server-side updates.
  • Updates save logic to toggle saveWasCalled and prevent false positives during local operations.
  • Adds a UI badge in the template to notify users of detected network changes.
Comments suppressed due to low confidence (3)

cms/src/components/content/EditContent.vue:112

  • [nitpick] The name networkChanges reads like an event or stream. Consider renaming to hasNetworkChanges or networkChangesDetected for clearer boolean semantics.
const networkChanges = computed(() => {

cms/src/components/content/EditContent.vue:112

  • There should be unit tests covering scenarios where networkChanges toggles true/false—especially around local saves vs. remote updates—to prevent regressions.
const networkChanges = computed(() => {

cms/src/components/content/EditContent.vue:604

  • [nitpick] Remove this interpolation of saveWasCalled in the template; it appears to be debug code and isn’t intended for production UI.
    {{ saveWasCalled }}

@MrDirkelz MrDirkelz force-pushed the implement-network-changes-editcontent branch from 6121ddb to 582f095 Compare July 3, 2025 11:36
@MrDirkelz MrDirkelz force-pushed the implement-network-changes-editcontent branch from 582f095 to 3d5d85c Compare July 3, 2025 12:49
@MrDirkelz
Copy link
Collaborator Author

There is a bug that I am not sure how to fix, will look for ideas from others during review

@johan-bell
Copy link
Collaborator

@DirkDevelopmentFreelance What is the status on this ?

@MrDirkelz
Copy link
Collaborator Author

@DirkDevelopmentFreelance What is the status on this ?

On hold till the DexieLiveQueryAsEditable has been implemented for EditCOntent

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.

CMS: EditContent - Implement function to notify about changes made by other users

2 participants