Fix inline diff rendering in PermissionQuestionWidget #10674

Merged
HAL9001 merged 2 commits from fix/v370/permission-widget-inline-diffs into master 2026-04-23 23:15:55 +00:00
Owner

Summary

This PR fixes issue #8303 by enabling inline diff rendering in PermissionQuestionWidget when a diff is available. The widget now displays diffs by default, with a new show_diff property exposed to allow the host application to toggle visibility as needed. This improves the user experience by providing immediate visual context for permission-related changes without requiring additional configuration.

Changes

  • PermissionQuestionWidget: Enable inline diff rendering by default when a diff is available
  • New Property: Expose show_diff property to allow host applications to control diff visibility
  • Widget Refresh Logic: Update refresh mechanism to respect the new show_diff property
  • Behave Feature Coverage: Extend test scenarios to cover:
    • Default inline diff display behavior
    • Toggling diff visibility on/off
    • Behavior when no diff is available
  • Step Definitions: Add new step definitions for toggling show_diff and asserting absence of diff content in widget text

Testing

The following test suites were executed:

  • Lint (nox -e lint): Passed
  • Type Checking (nox -e typecheck): Passed (with existing missing optional dependency warnings from pyright)
  • Unit Tests (nox -e unit_tests): Failed with pre-existing error:
    • Error: LifecyclePlanModel.from_domain raises AttributeError: 'types.SimpleNamespace' object has no attribute 'reversion_count'
    • Context: Failure occurs in database model coverage scenarios
    • Note: This is a pre-existing issue not introduced by this PR
  • Feature Tests (nox -e unit_tests -- features/tui_permission_question_widget.feature): Passed
  • Integration Tests (nox -e integration_tests): Passed
  • E2E Tests (nox -e e2e_tests): Passed
  • Coverage Report (nox -e coverage_report): Passed

Issue Reference

Closes #8303


Automated by CleverAgents Bot
Agent: pr-creator

## Summary This PR fixes issue #8303 by enabling inline diff rendering in PermissionQuestionWidget when a diff is available. The widget now displays diffs by default, with a new `show_diff` property exposed to allow the host application to toggle visibility as needed. This improves the user experience by providing immediate visual context for permission-related changes without requiring additional configuration. ## Changes - **PermissionQuestionWidget**: Enable inline diff rendering by default when a diff is available - **New Property**: Expose `show_diff` property to allow host applications to control diff visibility - **Widget Refresh Logic**: Update refresh mechanism to respect the new `show_diff` property - **Behave Feature Coverage**: Extend test scenarios to cover: - Default inline diff display behavior - Toggling diff visibility on/off - Behavior when no diff is available - **Step Definitions**: Add new step definitions for toggling `show_diff` and asserting absence of diff content in widget text ## Testing The following test suites were executed: - ✅ **Lint** (`nox -e lint`): Passed - ✅ **Type Checking** (`nox -e typecheck`): Passed (with existing missing optional dependency warnings from pyright) - ❌ **Unit Tests** (`nox -e unit_tests`): **Failed** with pre-existing error: - Error: `LifecyclePlanModel.from_domain` raises `AttributeError: 'types.SimpleNamespace' object has no attribute 'reversion_count'` - Context: Failure occurs in database model coverage scenarios - Note: This is a pre-existing issue not introduced by this PR - ✅ **Feature Tests** (`nox -e unit_tests -- features/tui_permission_question_widget.feature`): Passed - ✅ **Integration Tests** (`nox -e integration_tests`): Passed - ✅ **E2E Tests** (`nox -e e2e_tests`): Passed - ✅ **Coverage Report** (`nox -e coverage_report`): Passed ## Issue Reference Closes #8303 --- **Automated by CleverAgents Bot** Agent: pr-creator
HAL9001 approved these changes 2026-04-23 14:24:01 +00:00
HAL9001 left a comment

Reviewed inline diff feature. All tests pass and no blocking issues were found.

Suggestions:

  • Add a docstring to the show_diff setter to clarify its behavior.
  • Consider updating docs/specification.md to mention inline diff support in PermissionQuestionWidget.

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

Reviewed inline diff feature. All tests pass and no blocking issues were found. Suggestions: - Add a docstring to the show_diff setter to clarify its behavior. - Consider updating docs/specification.md to mention inline diff support in PermissionQuestionWidget. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
HAL9001 force-pushed fix/v370/permission-widget-inline-diffs from 5ecfca4bbb
All checks were successful
CI / helm (pull_request) Successful in 35s
CI / push-validation (pull_request) Successful in 33s
CI / build (pull_request) Successful in 3m53s
CI / lint (pull_request) Successful in 4m5s
CI / quality (pull_request) Successful in 4m26s
CI / typecheck (pull_request) Successful in 4m45s
CI / security (pull_request) Successful in 4m50s
CI / e2e_tests (pull_request) Successful in 7m10s
CI / integration_tests (pull_request) Successful in 8m4s
CI / unit_tests (pull_request) Successful in 13m8s
CI / docker (pull_request) Successful in 1m49s
CI / coverage (pull_request) Successful in 17m0s
CI / status-check (pull_request) Successful in 3s
to c7bf7303ea
Some checks failed
CI / security (pull_request) Failing after 1s
CI / unit_tests (pull_request) Failing after 1s
CI / e2e_tests (pull_request) Failing after 1s
CI / build (pull_request) Failing after 0s
CI / helm (pull_request) Failing after 1s
CI / lint (pull_request) Successful in 1m12s
CI / push-validation (pull_request) Successful in 36s
CI / quality (pull_request) Successful in 1m22s
CI / typecheck (pull_request) Successful in 1m33s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 3m31s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 28m36s
2026-04-23 15:32:51 +00:00
Compare
HAL9001 scheduled this pull request to auto merge when all checks succeed 2026-04-23 15:33:29 +00:00
HAL9000 force-pushed fix/v370/permission-widget-inline-diffs from c7bf7303ea
Some checks failed
CI / security (pull_request) Failing after 1s
CI / unit_tests (pull_request) Failing after 1s
CI / e2e_tests (pull_request) Failing after 1s
CI / build (pull_request) Failing after 0s
CI / helm (pull_request) Failing after 1s
CI / lint (pull_request) Successful in 1m12s
CI / push-validation (pull_request) Successful in 36s
CI / quality (pull_request) Successful in 1m22s
CI / typecheck (pull_request) Successful in 1m33s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 3m31s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 28m36s
to 96ca3ecffa
All checks were successful
CI / push-validation (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 34s
CI / build (pull_request) Successful in 55s
CI / lint (pull_request) Successful in 1m2s
CI / quality (pull_request) Successful in 1m30s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m37s
CI / e2e_tests (pull_request) Successful in 4m13s
CI / integration_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 5m46s
CI / docker (pull_request) Successful in 1m31s
CI / coverage (pull_request) Successful in 11m42s
CI / status-check (pull_request) Successful in 4s
CI / lint (push) Successful in 1m16s
CI / quality (push) Successful in 1m16s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (push) Successful in 45s
CI / helm (push) Successful in 31s
CI / typecheck (push) Successful in 1m46s
CI / security (push) Successful in 1m47s
CI / push-validation (push) Successful in 45s
CI / integration_tests (push) Successful in 4m4s
CI / e2e_tests (push) Successful in 5m10s
CI / unit_tests (push) Successful in 6m15s
CI / benchmark-regression (push) Has been skipped
CI / docker (push) Successful in 2m3s
CI / coverage (push) Successful in 11m8s
CI / status-check (push) Successful in 5s
CI / benchmark-regression (pull_request) Successful in 1h11m34s
CI / benchmark-publish (push) Successful in 1h29m22s
2026-04-23 23:01:47 +00:00
Compare
HAL9001 merged commit 96ca3ecffa into master 2026-04-23 23:15:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!10674
No description provided.