Skip to content

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

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

benedikt-bartscher wants to merge 13 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; the previous import issue is fixed and no new blocking issues were found.

Summary

Adds mixin lookup for get_state and state-manager tokens.

  • The registry finds the registered state behind a mixin.
  • get_state() resolves a mixin to its registered state.
  • State-manager tokens resolve mixins to their registered state.

Reviews (12) · Last reviewed commit: "Drop the redundant RegistrationContext i..." · 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 degrade performance by 4.2%

⚠️ 19 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

❌ 1 regressed benchmark
✅ 147 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ ⚠️ test_get_state[memory] 1.1 ms 1.2 ms -4.2%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing benedikt-bartscher:mixin-registration-context (284a304) with main (d3f4ab1)

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

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