Skip to content

Add mixin resolution to state lookup and token handling - #6873

Open
benedikt-bartscher wants to merge 14 commits into
reflex-dev:mainfrom
benedikt-bartscher:mixin-registration-context
Open

benedikt-bartscher wants to merge 14 commits into
reflex-dev:mainfrom
benedikt-bartscher:mixin-registration-context

Conversation

@benedikt-bartscher

@benedikt-bartscher benedikt-bartscher commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in cubic

@greptile-apps

greptile-apps Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Summary

Adds mixin lookup through RegistrationContext, get_state(), and state-manager tokens.

  • State mixins now resolve to the concrete state that uses them.

Reviews (13) · Last reviewed commit: "Flush the oplock lease in the mixin toke..." · Reviewed by Greptile

…in/mixin-registration-context

# Conflicts:
#	packages/reflex-base/src/reflex_base/registry.py
#	tests/units/reflex_base/test_registry.py
#	tests/units/test_state.py
@codspeed

codspeed Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 16 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 148 untouched benchmarks


Comparing benedikt-bartscher:mixin-registration-context (9618a3f) with main (656e8c7)

Open in CodSpeed

Comment thread packages/reflex-base/src/reflex_base/registry.py
@benedikt-bartscher benedikt-bartscher changed the title wip improved mixin apis Add mixin resolution to state lookup and token handling Oct 8, 2026
@benedikt-bartscher
benedikt-bartscher marked this pull request as ready for review October 8, 2026 20:15
@benedikt-bartscher
benedikt-bartscher requested a review from a team as a code owner October 8, 2026 20:15

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread tests/units/test_state.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

View guided diff | Re-trigger cubic

Comment thread reflex/state.py Outdated
… import

With oplock enabled, modify_state keeps the write in the lease cache while get_state reads Redis, so the test read the state back before the write was flushed.

This branch has not been deployed

No deployments
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.

1 participant