codeant-ai-for-open-source[bot] commented on code in PR #45522:
URL: https://github.com/apache/superset/pull/45522#discussion_r4401293549
##########
superset/initialization/__init__.py:
##########
@@ -667,6 +671,12 @@ def init_extensions(self) -> None:
return
for extension in extensions.values():
+ # Before the backend entrypoint runs: a page is declared in the
+ # manifest, so it does not depend on extension code importing
+ # cleanly, and a frontend-only extension contributes pages too.
+ register_extension_pages(self.superset_app, extension.manifest)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Register extension pages from the manifest before eagerly importing
backend entrypoints so page registration does not depend on backend import
success and frontend-only extensions can contribute pages; do not flag this
ordering as a routing conflict.
**Applied to:**
- `superset/initialization/__init__.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
##########
superset-frontend/src/extensions/ExtensionsLoader.ts:
##########
@@ -211,12 +226,25 @@ class ExtensionsLoader {
// receives the same pre-bound instance. Parallel loading is safe because
each
// container gets its own scope with its own resolved module instance.
const context = createExtensionContext(extension);
+ const declaredPages = extension.contributions?.pages ?? [];
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag extension page permissions captured at initialization as stale
after role changes; they follow Superset’s page-load bootstrap behavior, while
server endpoints enforce authorization per request.
**Applied to:**
- `superset-frontend/src/extensions/ExtensionsLoader.ts`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]