Skip to content

Notify after interactive work when unfocused#348

Merged
Byron merged 1 commit into
mainfrom
notify-when-done-and-unfocussed
Jul 14, 2026
Merged

Notify after interactive work when unfocused#348
Byron merged 1 commit into
mainfrom
notify-when-done-and-unfocussed

Conversation

@Byron

@Byron Byron commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew
  • notification functional?
  • configuration
    • can turn it off?
    • is enabled automatically?

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Fixes #347

Summary

  • enable terminal focus reporting for the live interactive UI and restore it on exit
  • emit sanitized OSC 777 notifications after scans, refreshes, deletion, and trash operations only while unfocused
  • include concise entry, byte, duration, and error statistics, including partial deletion results
  • add [notifications] with scan_finished and delete_finished, both enabled by default; accept the authoritative comment spelling can_finished as an alias
  • keep focus tracking current during synchronous work through a coalesced atomic state and a bounded input queue

Validation

  • cargo test --workspace --all-features -- --skip it_can_handle_ending_traversal_reaching_top_but_skipping_levels --skip it_can_handle_ending_traversal_without_reaching_the_top
  • cargo test --workspace --no-default-features
  • cargo check --workspace --all-features
  • cargo clippy --lib --all-features -- -D warnings

The unfiltered all-feature suite has two pre-existing filesystem-dependent fixture-size assertion failures; all other tests pass.

Review

Codex commit review identified and drove fixes for focus changes during blocking deletion/trash work, bounded input handling, and partial-deletion statistics. The final review concern about dropping input beyond the bounded queue is an intentional safety behavior during periods when the TUI cannot consume events, avoiding stale destructive command replay while focus changes remain independently coalesced.

@Byron
Byron force-pushed the notify-when-done-and-unfocussed branch 2 times, most recently from cccac5e to 40b3ba2 Compare July 14, 2026 13:31
@Byron
Byron marked this pull request as ready for review July 14, 2026 13:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40b3ba272e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config.rs Outdated
Interactive scans, refreshes, deletion, and trash operations can take long
enough that users leave the terminal, but dua previously had no way to signal
completion without exiting the TUI.

Track terminal focus events and emit sanitized OSC 777 notifications only when
the terminal is unfocused. Include concise entry, byte, duration, and error
statistics, and add a notifications config section whose scan_finished and
delete_finished switches default to true.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
@Byron
Byron force-pushed the notify-when-done-and-unfocussed branch from 40b3ba2 to d800f22 Compare July 14, 2026 13:36
@Byron
Byron merged commit 92f4502 into main Jul 14, 2026
2 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.

FR: Notify when interactive scan or deletion finishes

2 participants