Skip to content

feat(notify): surface background-tab notifications even when termherd is focused#134

Merged
bastien-gallay merged 4 commits into
mainfrom
feat/86-background-tab-notifications
Jul 5, 2026
Merged

feat(notify): surface background-tab notifications even when termherd is focused#134
bastien-gallay merged 4 commits into
mainfrom
feat/86-background-tab-notifications

Conversation

@guillaumejay

Copy link
Copy Markdown
Collaborator

Summary

  • core now tracks OS window focus (Event::WindowFocusChanged, wired from iced's window::Event::Focused/Unfocused), which it previously ignored.
  • notify_session skips the OS banner only when the notifying session is both the active tab's focused pane and the window has focus. Any other live session — including a background tab while termherd itself is focused — still gets the effect, since the OS's own per-window suppression only covers the tab the user is actually viewing.

Closes #86

Test plan

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (3 new unit tests: viewed-session dropped while focused, background-tab still posts while focused, viewed-session still posts while unfocused)

guillaumejay and others added 4 commits July 5, 2026 17:15
vte/alacritty_terminal already discards unrecognised OSC/DCS/APC
sequences cleanly, so #85's stated symptom doesn't reproduce. No slice
is cheap: even a placeholder render needs the chunked-payload
reassembly the OSC status codec explicitly doesn't do, across three
incompatible protocols. Zero demand signal beyond the filed issue.
… is focused (#86)

core now tracks OS window focus (Event::WindowFocusChanged, wired from
iced's window::Event::Focused/Unfocused) and notify_session skips the
OS banner only when the notifying session is both the active tab's
focused pane and the window has focus. Any other live session -
including a background tab while termherd is focused - still gets the
effect, since the OS's own per-window suppression only covers the
tab the user is actually viewing.
@bastien-gallay bastien-gallay force-pushed the feat/86-background-tab-notifications branch from 231e979 to 35f65c2 Compare July 5, 2026 15:17
@bastien-gallay bastien-gallay merged commit 0222a6e into main Jul 5, 2026
16 checks passed
@bastien-gallay bastien-gallay deleted the feat/86-background-tab-notifications branch July 5, 2026 15:18
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.

Forward background-tab notifications to the OS even when termherd is focused

2 participants