Skip to content

chore: enable clearing screen for confirm and dialog#4990

Merged
jdx merged 1 commit intojdx:mainfrom
roele:issues/demand-confirm-cls
May 3, 2025
Merged

chore: enable clearing screen for confirm and dialog#4990
jdx merged 1 commit intojdx:mainfrom
roele:issues/demand-confirm-cls

Conversation

@roele
Copy link
Copy Markdown
Contributor

@roele roele commented May 2, 2025

Set new clear_screen flag on confirm and dialog.

Confirmation dialogs displayed in tasks might be overwritten by other tasks output running in parallel which leads to broken dialog renditions. Clearing the screen helps mitigate this.

@jdx
Copy link
Copy Markdown
Owner

jdx commented May 2, 2025

I think we should solve this differently. I think we should pause the output while any dialog or confirm is displayed. Do you think that would be difficult?

@roele
Copy link
Copy Markdown
Contributor Author

roele commented May 3, 2025

Agree that this is not a proper solution for the issue. Something in the direction of pausing the logger and buffering log statements from other threads while paused would be required. Not sure if all output by tasks is written the same way currently.

@jdx jdx merged commit 3309cb5 into jdx:main May 3, 2025
18 checks passed
@roele roele deleted the issues/demand-confirm-cls branch May 3, 2025 10:42
jdx pushed a commit that referenced this pull request May 3, 2025
### 🚀 Features

- **(registry)** add luau by [@rhanneken](https://github.com/rhanneken)
in [#4993](#4993)
- **(registry)** add numbat by [@risu729](https://github.com/risu729) in
[#4980](#4980)
- add check flag for the fmt command by
[@roele](https://github.com/roele) in
[#4972](#4972)
- use aqua for btop by [@jdx](https://github.com/jdx) in
[#4979](#4979)

### 🐛 Bug Fixes

- **(java)** filter out JetBrains releases with features by
[@roele](https://github.com/roele) in
[#4970](#4970)
- fix deadlocks caused by uv_venv_auto by
[@risu729](https://github.com/risu729) in
[#4900](#4900)

### 📚 Documentation

- Put dot in dotfile example by
[@ryanbrainard](https://github.com/ryanbrainard) in
[#4965](#4965)

### Chore

- only use mold when available by [@jdx](https://github.com/jdx) in
[#4978](#4978)
- enable clearing screen for confirm and dialog by
[@roele](https://github.com/roele) in
[#4990](#4990)

### New Contributors

- @rhanneken made their first contribution in
[#4993](#4993)
- @ryanbrainard made their first contribution in
[#4965](#4965)
jdx added a commit that referenced this pull request May 5, 2026
## Summary
- Remove the explicit `clear_screen(true)` opt-in from shared
confirmation prompts.
- Restore demand's default behavior so `mise prune` and other
confirmation prompts do not wipe the terminal before rendering.

## Context
This reverts the prompt behavior introduced in #4990. That change was
intended to avoid concurrent task output corrupting interactive prompts,
but clearing the whole terminal is too broad and affects commands like
`mise prune`.

## Validation
- `cargo fmt --check`
- pre-commit hook: `hk` lint set, including `cargo check --all-features`

*This PR was generated by an AI coding assistant.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk UI behavior change limited to interactive prompting; main
impact is that prompts will no longer wipe prior terminal output.
> 
> **Overview**
> **Interactive confirmation prompts no longer clear the screen.**
> 
> Removes the explicit `clear_screen(true)` setting from the shared
`Confirm`/`Dialog` prompt helpers in `src/ui/prompt.rs`, restoring
default prompt rendering for callers like `mise prune` and trust/plugin
install confirmations.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
35f0832. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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