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

  1. yarn jest spec/frontend/pinia/plugins_spec.js
  2. With the console check of !256639 (merged) and its computed value is readonly entry removed, bin/rspec spec/features/incidents/incident_details_spec.rb:207 passes 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

🤖 Generated with Claude Code

Merge request reports

Loading
Loading