Skip to content

Data: Declare the persist option on ReduxStoreConfig - #84676

Closed
manzoorwanijk wants to merge 3 commits into
trunkfrom
types/data-redux-store-persist
Closed

manzoorwanijk wants to merge 3 commits into
trunkfrom
types/data-redux-store-persist

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Member

What?

See #67691. Declares the persistence plugin's persist option on ReduxStoreConfig.

Why?

@wordpress/block-editor passes persist: [ 'preferences' ] to createReduxStore and registerStore. Once its store/index is TypeScript, that is an excess property error, and the conversion rules forbid suppressing it.

How?

  • Adds persist?: boolean | string[] to ReduxStoreConfig:
    /**
    * State keys to persist, or `true` for all. Only the persistence plugin's
    * `registerStore` reads it; stores registered with `register` ignore it.
    */
    persist?: boolean | string[];
  • Drops the identical intersection the persistence plugin declared for its registerStore options.

No runtime changes. Only the persistence plugin reads the option.

Testing Instructions

  1. npm run clean:package-types && npm run typecheck

Use of AI Tools

Written with Claude Code, reviewed by Codex and by me.

@manzoorwanijk manzoorwanijk added [Type] Code Quality Issues or PRs that relate to code quality [Package] Data /packages/data labels Oct 14, 2026
@manzoorwanijk manzoorwanijk self-assigned this Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: 0 B

Total Size: 8.64 MB

3491296 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 08b1b7f trunk % Change
timeToFirstByte 34.2 ms +13.6% -4.24% 33.7 ms +18.1% -4.75% 1.48%
largestContentfulPaint 64 ms +9.38% -6.25% 64 ms +0% -12.5% 0%
lcpMinusTtfb 27.85 ms +15.62% -9.69% 24.6 ms +20.53% -2.85% 13.21%
wpBeforeTemplate 18 ms +23.22% -3.78% 17.7 ms +21.13% -2.54% 1.69%
wpTemplate 12.88 ms +3.26% -4.97% 12.97 ms +4.39% -8.02% -0.69%
wpTotal 31.28 ms +12.5% -4.54% 30.83 ms +18% -5.42% 1.46%
wpMemoryUsage 7.59 MB +0% -0% 7.55 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 08b1b7f trunk % Change
timeToFirstByte 29.05 ms +15.15% -2.07% 29 ms +8.62% -5.69% 0.17%
largestContentfulPaint 68 ms +8.82% -0% 68 ms +0% -5.88% 0%
lcpMinusTtfb 39.4 ms +3.43% -1.27% 37.05 ms +4.86% -1.08% 6.34%
wpBeforeTemplate 16.45 ms +11.31% -3.65% 16.1 ms +9.75% -3.35% 2.17%
wpTemplate 10.11 ms +6.33% -4.25% 9.97 ms +5.72% -5.42% 1.4%
wpTotal 26.41 ms +14.84% -2.27% 26.39 ms +8.94% -5.61% 0.08%
wpMemoryUsage 6.25 MB +0% -0% 6.21 MB +0% -0% 0.71%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric 08b1b7f trunk % Change
mediaProcessingJpeg 234.23 ms +2.23% -3.52% 227.76 ms +1.03% -1.32% 2.84%
mediaProcessingAvif 3720.11 ms +0.45% -1.23% 3631.36 ms +0.83% -0.55% 2.44%
mediaProcessingJpegToAvif 2565.64 ms +0.07% -0.71% 2526.19 ms +1.55% -0.53% 1.56%

media-upload

Metric 08b1b7f trunk % Change
jpegUploadProcessing 911.66 ms +54.66% -2.26% 918.04 ms +51.32% -0.76% -0.69%
pngUploadProcessing 162.23 ms +4.25% -2.19% 166.71 ms +4.23% -2.62% -2.69%
largeJpegUploadProcessing 909.3 ms +50.94% -1.83% 894.15 ms +1.48% -0.37% 1.69%
multipleImageUploadProcessing 1089.65 ms +36.27% -5.46% 1094.81 ms +32.75% -4.45% -0.47%

post-editor

Metric 08b1b7f trunk % Change
serverResponse 333.08 ms +4.59% -6.27% 324.56 ms +2.91% -1.99% 2.63%
firstPaint 388.87 ms +3.3% -55.86% 387.51 ms +3.24% -38.38% 0.35%
domContentLoaded 912.86 ms +1.98% -2.77% 893.83 ms +3.64% -1.46% 2.13%
loaded 914.06 ms +1.97% -2.77% 894.97 ms +3.66% -1.46% 2.13%
firstContentfulPaint 412.4 ms +3.24% -4.88% 399.81 ms +3.16% -3.29% 3.15%
firstBlock 2632.66 ms +2.33% -0.3% 2624.62 ms +1.59% -1.11% 0.31%
type 15.21 ms +3.81% -5.33% 15.22 ms +2.5% -1.71% -0.07%
typeWithoutInspector 15.72 ms +7.32% -8.52% 15.94 ms +5.96% -0.88% -1.38%
typeWithTopToolbar 19.42 ms +3.76% -3.4% 19.75 ms +1.47% -4.91% -1.67%
typeContainer 6.85 ms +6.72% -2.34% 7.08 ms +9.04% -4.8% -3.25%
focus 90.97 ms +23.5% -6.96% 98.99 ms +4.26% -2.84% -8.1%
firstFocus 172.97 ms +0% -0% 189.62 ms +0% -0% -8.78%
selectAll 450.69 ms +1.59% -0.76% 465.41 ms +11.08% -3.32% -3.16%
listViewOpen 62.88 ms +6.04% -2.07% 61.3 ms +5.35% -4.05% 2.58%
inserterOpen 33.4 ms +6.92% -2.04% 33.05 ms +7.14% -2.78% 1.06%
inserterHover 10.57 ms +10.79% -7.85% 9.98 ms +11.12% -3.91% 5.91%
inserterSearch 7.13 ms +10.24% -6.73% 7.94 ms +9.07% -8.56% -10.2%
loadPatterns 509.79 ms +3.68% -4.44% 526.19 ms +9.18% -7.11% -3.12%
wpTotal 322.61 ms +5.07% -6.25% 314.88 ms +3.07% -2.08% 2.45%
wpMemoryUsage 13.34 MB +0% -0% 13.30 MB +0% -0% 0.28%
wpDbQueries 54 +0% -1.85% 54 +0% -0% 0%

site-editor

Metric 08b1b7f trunk % Change
serverResponse 480.01 ms +3.43% -7.49% 489.1 ms +4.27% -4.49% -1.86%
firstPaint 274.91 ms +28.31% -9.01% 234.24 ms +10.02% -16.71% 17.36%
domContentLoaded 1230.27 ms +1.4% -1.06% 1218.37 ms +0.8% -0.91% 0.98%
loaded 1231.48 ms +1.41% -1.07% 1219.62 ms +0.79% -0.92% 0.97%
firstContentfulPaint 519.96 ms +0.8% -2.62% 511.09 ms +0.73% -7.95% 1.74%
firstBlock 4627.61 ms +1.08% -0.69% 4573.01 ms +0.64% -1.03% 1.19%
type 17.76 ms +7.15% -2.76% 18.93 ms +8.19% -5.71% -6.18%
navigate 115.5 ms +12.12% -1.36% 116.07 ms +9.3% -3.15% -0.49%
loadPatterns 1203.05 ms +7.55% -2.9% 1218.98 ms +4.81% -2.72% -1.31%
loadPages 996.91 ms +4.43% -1.21% 998.24 ms +1.01% -0.99% -0.13%
wpTotal 469.3 ms +3.48% -7.7% 478.13 ms +4.34% -4.59% -1.85%
wpMemoryUsage 12.37 MB +0% -0% 12.35 MB +0% -0% 0.13%
wpDbQueries 43 +2.33% -0% 43 +2.33% -0% 0%

3491296 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

three users concurrently edit a large post with diverse blocks in /test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts, passed after 1 failed attempt.
TimeoutError: locator.waitFor: Timeout 17500ms exceeded.
Call log:
  - waiting for getByRole('button', { name: /Collaborators list/ }) to be visible

    at map (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/fixtures/collaboration-utils.ts:193:7)
    at CollaborationUtils.waitForMutualDiscovery (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/fixtures/collaboration-utils.ts:188:10)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts:416:28

3491296 Run

@Mamaduka

Copy link
Copy Markdown
Member

FYI, we want to deprecate this. I think the block-editor is the only remaining store using it (#39632).

@manzoorwanijk

Copy link
Copy Markdown
Member Author

FYI, we want to deprecate this. I think the block-editor is the only remaining store using it (#39632).

Oh, I didn't know that. Thanks

@manzoorwanijk
manzoorwanijk deleted the types/data-redux-store-persist branch October 14, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Data /packages/data [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants