Skip to content

fix: ring terminal bell properly inside TUI by writing to /dev/tty#102

Merged
bborn merged 1 commit intomainfrom
task/192-improve-notifications
Jan 11, 2026
Merged

fix: ring terminal bell properly inside TUI by writing to /dev/tty#102
bborn merged 1 commit intomainfrom
task/192-improve-notifications

Conversation

@bborn
Copy link
Copy Markdown
Owner

@bborn bborn commented Jan 10, 2026

Summary

  • Creates a RingBell() utility function that writes the BEL character (\a) directly to /dev/tty
  • Updates task status change notifications to use the new function instead of fmt.Print("\a")
  • This bypasses Bubble Tea's alternate screen buffer, ensuring the bell reaches the actual terminal

Problem

When a task moved to "blocked" state (needing user input), the terminal bell was working in iTerm but not inside the tasks TUI app. This was because fmt.Print("\a") writes to stdout, which gets captured by Bubble Tea's output handling.

Solution

By writing directly to /dev/tty, we bypass any stdout buffering or capture that the TUI framework might be doing. Falls back to stderr if /dev/tty is unavailable.

Test plan

  • Build compiles without errors
  • All existing tests pass
  • Manual test: Run task app, queue a task that asks for input, verify bell rings

🤖 Generated with Claude Code

The terminal bell was not ringing inside the tasks TUI app when a task
moved to blocked state. This was because fmt.Print("\a") writes to
stdout which gets captured by Bubble Tea's alternate screen buffer.

Fixed by creating a RingBell() function that writes directly to /dev/tty
to bypass the TUI's output handling. This ensures the bell reaches the
actual terminal regardless of what the TUI framework is doing with stdout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn merged commit 2d748ff into main Jan 11, 2026
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.

1 participant