Skip to content

fix(desktop): strip preamble tags with attributes (<user-profile note=...>)#61

Merged
mlcyclops merged 1 commit into
masterfrom
fix/strip-user-profile-attrs
Jun 23, 2026
Merged

fix(desktop): strip preamble tags with attributes (<user-profile note=...>)#61
mlcyclops merged 1 commit into
masterfrom
fix/strip-user-profile-attrs

Conversation

@mlcyclops

Copy link
Copy Markdown
Owner

Follow-up to #55. The injected <user-profile> block actually carries a note attribute (<user-profile note="What we have learned about the user…">), but the stripper matched a bare <user-profile>, so it leaked into the session title and the first transcript bubble (reported).

Fix: match the opening tag plus any attributes (<tag\b[^>]*>) for user-profile and recalled-memory, mirroring the active-skill pattern.

Verified live against the real session: title is now I really like andy's custard… (was <user-profile note="What we have learn…) and the first transcript bubble is clean. 11 sessions tests pass (added an attribute-form regression test); tsc clean.

🤖 Generated with Claude Code

…=...>) (#52 follow-up)

The preamble stripper matched bare <user-profile>/<recalled-memory> tags, but the
real personalization block is <user-profile note="..."> (harness/personal/recall.ts)
with an attribute, so it leaked into the session title and the first transcript
bubble (reported). Match the opening tag + any attributes (<tag\b[^>]*>) for
user-profile and recalled-memory, mirroring the active-skill pattern.

Verified live against the real polluted session: title 'I really like andy's
custard...' (was '<user-profile note="What we have learn...') and the first
transcript bubble are both clean. 11 sessions tests pass (1 new attribute-form
regression test); tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mlcyclops mlcyclops merged commit 25ec727 into master Jun 23, 2026
@mlcyclops mlcyclops deleted the fix/strip-user-profile-attrs branch June 23, 2026 23:45
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