-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Bug Summary
hexis init crashes in the Character path with:
TypeError: CharacterPreview.__init__() got an unexpected keyword argument 'id'
This occurs when navigating to the character gallery screen.
Reproduction
- Run
hexis init - Configure provider/model and continue
- Choose
Characterpath - Crash occurs when
CharacterGalleryScreenis composed
Full Error (key line)
From apps/tui/init_screens.py:
yield CharacterPreview(id="char-preview")From traceback:
TypeError: CharacterGalleryScreen() compose() method returned an invalid result; CharacterPreview.__init__() got an unexpected keyword argument 'id'
Root Cause
CharacterPreview in apps/tui/init_widgets.py defines:
def __init__(self) -> None:
super().__init__()so it does not accept standard Textual widget kwargs (id, classes, name, ...).
Proposed Fix
Update CharacterPreview.__init__ to forward kwargs:
def __init__(self, **kwargs: Any) -> None:
super().__init__(**kwargs)I also prepared a regression test:
tests/core/test_tui_init_widgets.py- Asserts
CharacterPreview(id="char-preview")works.
Patch Reference
Local commit prepared: 3d9f5b3 (fix(tui/init): allow CharacterPreview widget kwargs)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels