Repository navigation
[Extensions] Integrate runtime contributions - #125
suraj-ranganath merged 2 commits into
Conversation
|
Claude finished @suraj-ranganath's task in 5m 13s —— View job Code review — PR #125: Integrate extension runtime contributions
Code review
I verified the declarative menu path reproduces the previous hardcoded insertions: BlockingNone. ImportantDual source of truth for bundled plugin metadata — Nits
Test gapsNone blocking. Coverage is strong: enable-state matrix, Optional addition: a test asserting bundled plugin menu items land at the expected positions with EEGLAB parity notesThe refactor preserves EEGLAB-style menu placement and ordering relative to the prior hardcoded inserters (verified against
|
|
🤖 Specification Problem Approach Key code @dataclass(frozen=True)
class ExtensionRuntime:
records: tuple[ExtensionRecord, ...] = ()
actions: Mapping[str, ExtensionAction] | None = None
pop_functions: Mapping[str, ExtensionPopFunction] | None = None
help_resources: Mapping[str, ExtensionResource] | None = None
menu_contributions: tuple[ExtensionMenuContribution, ...] = ()
def action(self, name: str) -> ExtensionAction | ExtensionPopFunction | None:
key = _key(name)
actions = self.actions or {}
pop_functions = self.pop_functions or {}
return actions.get(key) or pop_functions.get(key)Tests |
Wire active extension specs into EEGPrep menu construction, GUI dispatch, packaged help lookup, and eegprep-console pop_* wrappers. Bundled plugin menus now use the same declarative runtime path while --no-plugins still hides plugin contributions without hiding core menus. Closes #114