Skip to content

Expose rx.Plugin hook contexts#6537

Merged
masenf merged 1 commit into
mainfrom
masenf/expose-plugin-contexts
May 20, 2026
Merged

Expose rx.Plugin hook contexts#6537
masenf merged 1 commit into
mainfrom
masenf/expose-plugin-contexts

Conversation

@masenf
Copy link
Copy Markdown
Collaborator

@masenf masenf commented May 20, 2026

PostBuildContext and PostCompileContext were not exposed through reflex_base.plugins, unlike PreCompileContext.

Added these newer contexts for completeness.

PostBuildContext and PostCompileContext were not exposed through
reflex_base.plugins, unlike PreCompileContext.

Added these newer contexts for completeness.
@masenf masenf requested a review from a team as a code owner May 20, 2026 02:59
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Greptile Summary

This PR exposes two previously-private plugin hook context types β€” PostBuildContext and PostCompileContext β€” through the reflex_base.plugins public API to match the already-exported PreCompileContext.

  • Both types were already defined in base.py but were missing from the __init__.py import and __all__ list; this PR adds them in alphabetical order consistent with the existing entries.
  • No logic is changed; this is a pure public-API surface expansion for plugin authors who implement post_compile or post_build hooks.

Confidence Score: 5/5

Safe to merge β€” adds two already-implemented types to the public API with no logic changes.

Both PostBuildContext and PostCompileContext already existed and were used internally; this change only makes them importable by plugin authors. The additions are placed in the correct alphabetical positions in both the import block and all, and no existing behaviour is altered.

No files require special attention.

Important Files Changed

Filename Overview
packages/reflex-base/src/reflex_base/plugins/init.py Adds PostBuildContext and PostCompileContext to the public API imports and all, making them accessible alongside the already-exported PreCompileContext.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Plugin Author implements hooks] --> B{Which hook?}
    B --> C[pre_compile]
    B --> D[post_compile]
    B --> E[post_build]

    C --> F[PreCompileContext
βœ… was already exported]
    D --> G[PostCompileContext
βœ… now exported via this PR]
    E --> H[PostBuildContext
βœ… now exported via this PR]

    F & G & H --> I[reflex_base.plugins public API]
Loading

Reviews (1): Last reviewed commit: "Expose rx.Plugin hook contexts" | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 20, 2026

Merging this PR will not alter performance

βœ… 24 untouched benchmarks


Comparing masenf/expose-plugin-contexts (ad9c149) with main (5d65aa9)

Open in CodSpeed

@masenf masenf merged commit faec12b into main May 20, 2026
70 checks passed
@masenf masenf deleted the masenf/expose-plugin-contexts branch May 20, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants