Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 14, 2025

How to test:

Before: You should see one request for each recipient to PROPFIND /remote.php/dav/principals/users/alice/ and PROPFIND /remote.php/dav/addressbooks/users/alice/

After: You should see only one request to PROPFIND /remote.php/dav/principals/users/alice/ and PROPFIND /remote.php/dav/addressbooks/users/alice/

@kesselb kesselb self-assigned this Oct 14, 2025
@kesselb kesselb added bug Something isn't working 3. to review Waiting for reviews labels Oct 14, 2025
}

this.promise = (async () => {
await client.connect({ enableCardDAV: true })
Copy link
Contributor Author

@kesselb kesselb Oct 14, 2025

Choose a reason for hiding this comment

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

This isn’t exactly what Richard suggested, but I dropped that approach because I couldn’t get it to work. In hindsight, I think the idea itself was fine, but I realized too late that the Vuex store was already shared between components, while the Pinia instances were not. Since I created a new Pinia store for it, that was probably the issue I was running into.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.04%. Comparing base (b977fd8) to head (7bbe969).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/views/ReadOnlyContactDetails.vue 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4794   +/-   ##
=========================================
  Coverage     11.04%   11.04%           
  Complexity      293      293           
=========================================
  Files           127      127           
  Lines          6565     6563    -2     
  Branches       1204     1204           
=========================================
  Hits            725      725           
+ Misses         5718     5716    -2     
  Partials        122      122           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

return context.getters.getAddressbooks
}

context.state.addressbooksFetched = true
Copy link
Member

Choose a reason for hiding this comment

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

The shared pinia store + this should do the trick, right? The promise hack seems superfluous

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid not. The shared pinia store is the requirement to make the promise hack work 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to revert this line as it's actually unrelated.

Copy link
Member

Choose a reason for hiding this comment

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

Huh. I was pretty sure that moving the flag toggle up could solve the issue elegantly. The first call of the action actually fetches addressbooks the other ones return early. This is fine if the result of the action is not used but address books populate reactively once loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants