Skip to content

fix(ui): keep permission dialog responsive between sequential prompts#422

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
DmitriyKost:fix/permission-stale-ui
Jun 23, 2026
Merged

fix(ui): keep permission dialog responsive between sequential prompts#422
sudo-tee merged 1 commit into
sudo-tee:mainfrom
DmitriyKost:fix/permission-stale-ui

Conversation

@DmitriyKost

Copy link
Copy Markdown
Contributor

Summary

Sequential permission prompts could leave the UI stale: after selecting a permission, the permission display could be refreshed while _processing was still true, causing the next queued permission to skip rendering until another keypress forced a refresh.

  • Reorder on_select: clear _processing before remove_permission so the next render is not skipped.
  • Swap the 50ms vim.defer_fn for vim.schedule, and add a reentrancy guard at the top of on_select.
  • Move the post-removal render into remove_permission itself, and drop the now-redundant render branch in on_permission_replied.

Test plan

  • ./run_tests.sh -t tests/unit/permission_window_spec.lua - 25/25 pass
  • ./run_tests.sh -t tests/unit/permission_integration_spec.lua - 15/15 pass
  • Manually reproduced the stale UI on 6ab7d2f; gone on this branch

@sudo-tee

Copy link
Copy Markdown
Owner

Thanks for the fix.

Works pretty well

@sudo-tee sudo-tee merged commit 0707f40 into sudo-tee:main Jun 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants