Skip to content

fix: Merge views instead of resetting to avoid race condition#2279

Open
Kaijudo wants to merge 2 commits intonextcloud:mainfrom
Kaijudo:fix_merge_views
Open

fix: Merge views instead of resetting to avoid race condition#2279
Kaijudo wants to merge 2 commits intonextcloud:mainfrom
Kaijudo:fix_merge_views

Conversation

@Kaijudo
Copy link

@Kaijudo Kaijudo commented Jan 23, 2026

Fixes #2180

@Kaijudo Kaijudo requested review from blizzz and enjeck as code owners January 23, 2026 21:57
@Kaijudo Kaijudo marked this pull request as draft January 23, 2026 22:53
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@blizzz
Copy link
Member

blizzz commented Feb 12, 2026

Hi @Kaijudo and thanks for the PR. Did you open it in draft state intentionally?

@Kaijudo
Copy link
Author

Kaijudo commented Feb 12, 2026

Hi @Kaijudo and thanks for the PR. Did you open it in draft state intentionally?

Hi @blizzz I kinda did intentionally change it to draft because I wasn't sure if this would be the proper approach to fix this issue and I was second doubting myself :)

@Kaijudo Kaijudo marked this pull request as ready for review February 12, 2026 18:37
@blizzz
Copy link
Member

blizzz commented Feb 13, 2026

Hi @Kaijudo and thanks for the PR. Did you open it in draft state intentionally?

Hi @blizzz I kinda did intentionally change it to draft because I wasn't sure if this would be the proper approach to fix this issue and I was second doubting myself :)

Alright!

Have you figured the backgrounds of the race condition? views should still be initialized somewhere, and I am afraid without resetting it we might have views there that maybe shot not appear again.

@Kaijudo
Copy link
Author

Kaijudo commented Feb 13, 2026

When Tables finishes loading, it calls both loadTablesFromBE() and loadViewsSharedWithMeFromBE() in a Promise.all()

tables/src/App.vue

Lines 62 to 70 in fec1580

async created() {
const store = useTablesStore()
if (!this.isPublicShare) {
await Promise.all([
store.loadTablesFromBE(),
store.getAllContexts(),
store.loadViewsSharedWithMeFromBE(),
store.loadTemplatesFromBE(),
])

If loadViewsSharedWithMeFromBE() completes before loadTablesFromBE() initializes views, the views we previously collected with loadViewsSharedWithMeFromBE() get cleared, causing us to lose all previously loaded shared views.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permission problem. User should see the view but he doesn't

2 participants