Repository navigation
reregister memo in app harness - #6799
benedikt-bartscher wants to merge 8 commits into
Conversation
[Medium impact] The changes affect app loading in the test harness and memo compilation. The PR still needs the existing-app registration-context issue fixed before merging. Findings
SummaryThe PR preserves existing apps in
The unnumbered identifier thread was manually resolved without explanation. Reviews (8) · Last reviewed commit: "Restore nested memos from cached bodies ..." · Reviewed by Greptile |
Merging this PR will not alter performance
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40fed7de7d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Resolve conflicts in tests/units/test_testing.py (keep the reload=False / MEMOS-preserved assertions alongside main's new frontend-env test), tests/units/components/test_memo.py (merge both sides' imports and appended tests), and pyi_hashes.json (regenerated). Adapt test_memo_reregisters_on_use_after_registry_clear to main's new memo module output, which wraps the memo in a PURE IIFE that sets displayName.
# Conflicts: # pyi_hashes.json
| self.app_instance, self.app_module = ( | ||
| reflex.utils.prerequisites.get_and_validate_app(reload=False) | ||
| ) | ||
| self.app_asgi = self.app_instance() | ||
| return |
There was a problem hiding this comment.
Real Apps Share Registration Context
If a test process starts a real-app harness after another app, this early return skips the registration-context fork. Importing the next app then tries to use a context already associated with the previous app, raising ReflexRuntimeError and preventing the test from starting. The real app’s registrations need to be preserved without reusing that context.
Re-run a memo's cached body when re-registering it after a registry clear so nested memos come back, make the pre-pass test fail without the fix, reload a real app's config before initializing its frontend, and reword the fragments for users.
No description provided.