The diff-mode cycle in PermissionsScreen referenced DiffDisplayMode.SIDE_BY_SIDE
and DiffDisplayMode.CONTEXT, but the enum only defines UNIFIED / SPLIT / AUTO.
Pyright flagged both as reportAttributeAccessIssue and behave failed to import
the screen module, masking the entire scenario suite under a single
traceback-outside-scenario error.
Also addresses the prior re-review feedback on the same PR:
- compose() return type was Any; tighten to collections.abc.Iterator[Any] so the
generator shape is exposed to type checkers without taking a hard textual
dependency at typecheck time (Iterator[Any] is the structural type of a
Textual ComposeResult; we stay importable when textual is absent).
- The Bug #10488 TDD scenario asserting action methods now also covers
action_dismiss_screen so a future refactor cannot silently drop the escape
binding without test failure.
Verified locally on this worktree:
- typecheck gate: 0 errors, 4 unrelated warnings.
- unit_tests gate on features/tui_permissions_screen.feature: 65/65 scenarios
pass.
- lint gate: clean.
ISSUES CLOSED: #10488
- Changed PermissionsScreen to inherit from textual.app.Screen instead of textual.widgets.Static
- Added BINDINGS class variable with keyboard bindings for a, A, r, R, j, k, d, escape
- Implemented action methods: action_allow_once, action_allow_always, action_reject_once, action_reject_always, action_nav_next, action_nav_prev, action_cycle_diff, action_dismiss_screen
- Added compose() method for Textual screen layout
- Added update() method for backward compatibility with tests
- Added TDD Behave scenarios tagged @tdd_issue @tdd_issue_10488 to verify the fix
- All 65 unit test scenarios pass
ISSUES CLOSED: #10488
Changed DiffDisplayMode enum values from side_by_side/context to split/auto
as required by specification §29570, §30139, §30391.
- Renamed SIDE_BY_SIDE="side_by_side" → SPLIT="split" in models.py
- Renamed CONTEXT="context" → AUTO="auto" in models.py
- Renamed side_by_side_diff() → split_diff() in models.py
- Renamed context_diff() → auto_diff() in models.py
- Updated _DIFF_MODE_CYCLE in screen.py to use SPLIT and AUTO
- Updated all BDD feature scenarios and step definitions
- Fixed broken Behave step parameter renames (restored standard 'context' param)
Closes#1449
---
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor