Skip Pinia getters when syncing state from Vuex
Why
Every incident and issue page logs [Vue warn]: Write operation failed: computed value is readonly under Vue 2. !256639 (merged) allowlists it for seven feature spec files.
The write comes from the Pinia syncWith plugin. notes/index.js calls useNotes().syncWith({ store }), and the plugin copies every key of the Vuex notes state onto the Pinia store. The Vuex state still has discussions, but the Pinia notes store exposes discussions as a getter that proxies the discussions store. The copy writes to a readonly computed, and the value is dropped.
Found with a temporary Vue.config.warnHandler that appended a stack trace to the warning.
What
app/assets/javascripts/pinia/plugins.js: syncWith copies only the Vuex keys that exist in the Pinia store's $state. A spec covers a Vuex key that is a getter on the Pinia store.
How to verify
yarn jest spec/frontend/pinia/plugins_spec.js- With the console check of !256639 (merged) and its
computed value is readonlyentry removed,bin/rspec spec/features/incidents/incident_details_spec.rb:207passes with no console output. Verified locally on 2026-09-22.
No UI change.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
References
- Allowlist that carries the entry this removes: !256639 (merged)
- Split out of !257064 (merged) at the author's request
- Reveal runs that produced the data: !255199 (closed), pipelines https://gitlab.com/gitlab-org/gitlab/-/pipelines/2867469601 and https://gitlab.com/gitlab-org/gitlab/-/pipelines/2872215632
- Catalogue of the original console errors: #628901