Skip to content

fix(permissions): keep Undo stack above window bottom - #552

Merged
ewen-poch merged 1 commit into
mainfrom
fix/undo-window-position
Jul 31, 2026
Merged

fix(permissions): keep Undo stack above window bottom#552
ewen-poch merged 1 commit into
mainfrom
fix/undo-window-position

Conversation

@ewen-poch

Copy link
Copy Markdown
Member

Problem

On Windows, closing the permission surface could leave the Undo snackbar below the visible window. The fixed stack used the shared Radix ScrollArea with a full-height viewport, but its root only had a maximum height. Without a definite parent height, the bottom-anchored content could be laid out past the viewport.

Proposed change

  • Replace the full-height Radix viewport with a content-sized native overflow container.
  • Preserve the existing bottom safe-area offset, maximum stack height, overscroll behavior, and per-receipt interactions.
  • Add a regression test that locks down the intrinsic-height scroll structure after Settings closes.

Scope and non-goals

This change only affects the permission Undo stack layout. It does not change grant revocation, restoration, expiry, queueing, or other shared ScrollArea consumers.

Acceptance criteria and validation

The checks below ran against the final material implementation:

  • Undo remains bottom-anchored and scrolls within the visible viewport -> npm test -- src/renderer/src/components/PermissionUndoSnackbar.test.tsx -> passed, 6/6 tests.
  • Changed files satisfy ESLint/Prettier rules -> npx --no-install eslint src/renderer/src/components/PermissionUndoSnackbar.tsx src/renderer/src/components/PermissionUndoSnackbar.test.tsx -> passed.
  • Patch has no whitespace errors -> git diff --check -> passed.
  • Repository lint -> npm run lint -> passed with 0 errors; unrelated baseline warnings remain.
  • Repository typecheck -> npm run typecheck -> blocked because this worktree does not have the lockfile dependencies fflate and tiff installed.
  • Full test suite -> npm test -> not completed in the restricted sandbox; localhost-listening tests failed with EPERM and the runner was terminated after five minutes.

Uncovered risk: the structural regression is deterministic, but the final layout has not been visually exercised on a Windows Electron runtime.

Review focus

Please verify that the content-sized overflow container keeps single and queued Undo receipts above the bottom edge without changing restore, dismiss, expiry, or modal interaction behavior.

Use a content-sized overflow container instead of the full-height Radix viewport. The viewport required a definite parent height and could lay out bottom-anchored Undo receipts below the visible window on Windows.
@github-actions github-actions Bot added the bug Something isn't working label Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Codex Review

Verdict: mergeable

No actionable findings.

Summary: Static inspection found no concrete merge-blocking defect in the pull request changes.

@github-actions github-actions Bot added the ready-to-merge All completed AI reviewers found this pull request mergeable. label Jul 31, 2026
@ewen-poch
ewen-poch marked this pull request as ready for review July 31, 2026 13:57
@ewen-poch
ewen-poch merged commit 667261c into main Jul 31, 2026
18 checks passed
@ewen-poch
ewen-poch deleted the fix/undo-window-position branch July 31, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-to-merge All completed AI reviewers found this pull request mergeable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant