# Serializable Persistent State Component loadState marked as internal in 261 EAP

**URL:** <https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731>\
**Category:** IntelliJ Platform\
**Created:** [February 20, 2026, 10:15pm UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731 "2026-02-20T22:15:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abrooksv](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/abrooksv/32/924_2.png) [@abrooksv](https://platform.jetbrains.com/u/abrooksv)\
**Post date:** [February 20, 2026, 10:15pm UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731/1 "2026-02-20T22:15:50Z")

</div>

`com.intellij.openapi.components.SerializablePersistentStateComponent#loadState` got marked [here](https://github.com/JetBrains/intellij-community/commit/4328e42a8e24fd655746854b970051a3a4f0067b) as `@Internal` which cuts off the ability to copy the settings into a State flow for broadcast, same use case as these examples from the community repo:

- [intellij-community/plugins/agent-workbench/sessions/src/AgentSessionsTreeUiStateService.kt at 15ca8a4acff91fff44ff3d372e135323a06e7d9d · JetBrains/intellij-community · GitHub](https://github.com/JetBrains/intellij-community/blob/15ca8a4acff91fff44ff3d372e135323a06e7d9d/plugins/agent-workbench/sessions/src/AgentSessionsTreeUiStateService.kt#L269-L274)
- [intellij-community/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/authentication/accounts/GitLabPersistentAccounts.kt at 188b7ef96f72c032b7ee232ba6f5ec3dac9448f8 · JetBrains/intellij-community · GitHub](https://github.com/JetBrains/intellij-community/blob/188b7ef96f72c032b7ee232ba6f5ec3dac9448f8/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/authentication/accounts/GitLabPersistentAccounts.kt#L37-L43)

Can this be undone for `loadState` since it is the only way to be notified that new state was loaded from disk?

It looks to me that it should have been marked as `OverrideOnly` instead? (Maybe an enhancement to OverrideOnly could be `@OverrideOnly(superRequired=true)` or something along those lines if that was the intention of marking it `@Internal`)

---

<div class="post-metadata">

**Author:** ![robert.novotny](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/robert.novotny/32/2046_2.png) [@robert.novotny](https://platform.jetbrains.com/u/robert.novotny)\
**Post date:** [February 21, 2026, 12:04pm UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731/3 "2026-02-21T12:04:21Z")

</div>

`SerializablePersistentStateComponent` as a concept has quite some issues in the current implementation. Currently, it is under refactoring, hence the `@Internal`.  
Please track [https://youtrack.jetbrains.com/issue/IJPL-188400](https://youtrack.jetbrains.com/issue/IJPL-188400), where the majority of issues is discussed.

Why do you need to track the disk loading specifically?

---

<div class="post-metadata">

**Author:** ![abrooksv](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/abrooksv/32/924_2.png) [@abrooksv](https://platform.jetbrains.com/u/abrooksv)\
**Post date:** [February 21, 2026, 6:07pm UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731/4 "2026-02-21T18:07:42Z")

</div>

Ya, I am aware of those short comings, I mentioned some of them here but never got a response: [Serializable PersistentStateComponent﻿ docs look to be wrong](https://platform.jetbrains.com/t/serializable-persistentstatecomponent-docs-look-to-be-wrong/1897)

We have been using the class for about a year now which is why I have my data classes defined in the form of:

```auto
    data class State(
        @field:Property val a: Boolean = true,
        @field:Property val b: String? = null,
        @field:Property val c: String? = null
    )

```

> Why do you need to track the disk loading specifically?

I don’t per se, but `loadState` is the only way to load the saved settings into a StateFlow, our code looks nearly verbatim to `GitLabPersistentAccounts.kt`, but with more fields

```auto
    var a: String?
        get() = state.a
        set(value) {
            updateStateAndEmit {
                it.copy(a = value)
            }
        }

    private fun updateStateAndEmit(updateFunction: (currentState: State) -> State) {
        updateState(updateFunction)
        stateFlow.value = state
    }

    override fun loadState(state: State) {
        super.loadState(state)
        stateFlow.value = state
    }

```

---

<div class="post-metadata">

**Author:** ![abrooksv](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/abrooksv/32/924_2.png) [@abrooksv](https://platform.jetbrains.com/u/abrooksv)\
**Post date:** [February 23, 2026, 3:41pm UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731/6 "2026-02-23T15:41:09Z")

</div>

~~@robert.novotny What is our path forward, we currently have a release in flight that looks to be blocked by this. Do we need to ask for an exception?~~

We will refactor off of this class and onto the parent class where `update` is still safe to override and use a StateFlow to hold the `state` and use `StateFlow<T>.update` to achieve the same atomic updates as `updateStateAndEmit`

---

<div class="post-metadata">

**Author:** ![develar](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/develar/32/2036_2.png) [@develar](https://platform.jetbrains.com/u/develar)\
**Post date:** [February 27, 2026, 7:47am UTC](https://platform.jetbrains.com/t/serializable-persistent-state-component-loadstate-marked-as-internal-in-261-eap/3731/7 "2026-02-27T07:47:02Z")

</div>

I’m sorry this aspect wasn’t taken into account. `internal` has been removed for `loadState`. (will be cherry-picked to 261).
