Repository navigation
fix: v1.7.4 — strip date stamps ("May 18") injected by chat UI into message body - #7
Merged
Merged
Conversation
…ore speaking
The chat UI injects a date string into each message element's innerText.
This landed in the body after timestamp stripping, blocked the sender-name
strip, and caused spoken output like "Alice May 18 Alice Smith hello".
Added DATE_RE (/\b(?:Jan|Feb|...)\ +\d{1,2}(?:,?\s*\d{4})?\b/gi) applied in
extractMessageFromRoot, extractMessageGeneric, and normalizeMsg so dates are
removed before the sender strip runs and before the dedup key is computed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Messages were being spoken as
<firstname> <Month> <Day> <fullname> <message>, e.g.:Root cause
The chat UI injects a date string (e.g.
May 18) directly into eachapp-st-compactmessageelement'sinnerText, between the sender name and the message body. The existing regex set only stripsHH:MM-style timestamps — month-name dates passed through untouched.With the date sitting at the front of the body,
stripSenderFromStartcouldn't reach the duplicated sender name either, so both the date and the full name leaked into the spoken output.Fix
Added
DATE_RE:Applied in three places — in the correct order (dates before sender strip):
extractMessageFromRoot— afterTS_BRACKET/TS_BARE, beforestripSenderFromStartextractMessageGeneric— samenormalizeMsg— safety net, also keeps the dedup key consistentResult
Test plan
<name>: <message>, no dateMayfollowed by a 1–2 digit number🤖 Generated with Claude Code