Repository navigation
Conversation
Render all initial states as a single `<script type="application/json">` grouped by app and key instead of one base64 encoded hidden input per key. This removes the base64 overhead (30-60 % bigger after compression) and renders about 6x faster on the server. The new `core-initial-state` entry is loaded before every other script and installs an `InitialStateMap` as `window._nc_initial_state`. It parses the JSON on first access and indexes the values by the `#initial-state-<app>-<key>` keys that `@nextcloud/initial-state` 3.x looks up there, so apps using 3.x keep working unchanged. It also provides `hasState()` and `getState()` for future library versions. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
susnux
marked this pull request as ready for review
November 4, 2026 10:59
susnux
requested review from
CarlSchwan,
come-nc,
icewind1991,
kristian-zendato,
pringelmann,
salmart-dev and
skjnldsv
and removed request for
a team,
icewind1991 and
salmart-dev
November 4, 2026 10:59
pringelmann
reviewed
Nov 4, 2026
pringelmann
approved these changes
Nov 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Render all initial states as a single
<script type="application/json">grouped by app and key instead of one base64 encoded hidden input per key. This removes the base64 overhead (30-60 % bigger after compression) and renders about 6x faster on the server.The new
core-initial-stateentry is loaded before every other script and installs anInitialStateMapaswindow._nc_initial_state. It parses the JSON on first access and indexes the values by the#initial-state-<app>-<key>keys that@nextcloud/initial-state3.x looks up there, so apps using 3.x keep working unchanged. It also provideshasState()andgetState()for future library versions.Checklist
3. to review, feature component)stable32)AI (if applicable)