Skip to content

feat(voice): quiet while the screen is locked; no mid-sentence splits (0.26.0) - #37

Merged
DowLucas merged 1 commit into
mainfrom
feat/voice-screen-lock
Oct 7, 2026
Merged

DowLucas merged 1 commit into
mainfrom
feat/voice-screen-lock

Conversation

@DowLucas

@DowLucas DowLucas commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Quiet while the screen is locked

DevScope only talks to someone at the computer. While the screen is locked:

What happens
Announcements held, said a few seconds after unlock if the session still waits; no reminder used up
Auto voice skipped; nothing is sent to the server
An explanation stops after the piece that is playing
  • Detection is local, nothing to install.
    • macOS: ioreg -n Root -d1 → "CGSSessionScreenIsLocked"=Yes, or ScreenSaverEngine running.
    • Linux: logind LockedHint of the user's graphical session (loginctl show-user $USER -p Display), so it is right even when Claude Code runs over SSH on the same machine.
  • Where it cannot tell, speech plays as before: SSH-only boxes, servers, and lockers that don't set LockedHint (bare i3lock). These limits were agreed.
  • Setting: /devscope:voice when-locked quiet|play (default quiet), and status shows Screen: locked|unlocked.
  • Agreed limit: an announcement held over 30 minutes is dropped, as any marker that old already is.

No more pauses mid-sentence in summaries (bug)

Every summary over 200 characters was voiced as two or three separate recordings, with a pause and restarted intonation between them. A phrase was also cut wherever no sentence ended within the limit. Now:

  • text that fits one voice-audio request (440 chars, which covers every normal summary) is one piece;
  • longer text is split only between sentences, and a single overlong sentence at a comma, semicolon or colon (at a word only as a last resort).

(Mid-word cuts from the length cap were a separate bug, fixed server-side in DowLucas/devscope#84.)

Documented

README ("Locked screen", piece splitting), the /devscope:voice help, CLAUDE.md (detection, hook points, test hooks, limits), CHANGELOG.

Test plan

  • bash tests/voice/run.sh: 112 pass. New: Linux and macOS detection via fake loginctl/ioreg; unlocked without logind; held announcement said after unlock with its count untouched; auto voice skipped; explanation stops mid-way; play override; status; one-piece summaries; comma splits.
  • shellcheck clean; claude plugin validate . passes.
  • On the Mac: lock the screen during a permission prompt, then unlock → announced once; ioreg -n Root -d1 | grep CGSSessionScreenIsLocked while locked shows Yes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a setting to control voice playback while the screen is locked. By default, announcements wait until unlock, automatic voice replies are skipped, and ongoing explanations stop; playback while locked can be enabled.
    • Added screen-lock status to voice settings and status output on supported macOS and Linux systems.
  • Improvements
    • Short summaries now play as a single recording. Longer speech is split at sentence boundaries where possible.

… (0.26.0)

Screen lock (when_locked: quiet by default, `when-locked play` to ignore):
- detected locally: macOS ioreg CGSSessionScreenIsLocked or the
  screensaver; Linux logind LockedHint of the user's graphical session;
  anything unreadable (SSH, servers, lockers without LockedHint) counts as
  unlocked, so speech plays as before there;
- announcements are held and said soon after unlock (reminder count
  untouched), auto voice is skipped, an explanation stops before its next
  piece; status shows the screen state.

Pieces: every summary over 200 characters was voiced as two or three
recordings, with a pause and restarted intonation between them, and cut
mid-phrase where no sentence ended in time. Text that fits one voice-audio
request (440) is now one piece; longer text splits only between sentences,
and a single overlong sentence at a comma/semicolon/colon.

Tests: 112 pass (lock detection on fake loginctl/ioreg for Linux and
macOS, each kind of speech while locked, the override, splitting).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6e364ec-6bd7-43d9-982e-ecc7d911a548
📥 Commits

Reviewing files that changed from the base of the PR and between 984cb79 and 18d3ddb.

📒 Files selected for processing (11)
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • commands/voice.md
  • scripts/voice/cli.sh
  • scripts/voice/lib.sh
  • scripts/voice/speak.sh
  • scripts/voice/timer.sh
  • tests/voice/run.sh
 _____________________________________________
< Because, no one wants to be a human linter. >
 ---------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DowLucas
DowLucas merged commit ec6a975 into main Oct 7, 2026
11 of 12 checks passed
@DowLucas
DowLucas deleted the feat/voice-screen-lock branch October 7, 2026 11:25
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