Add a bell: a point in the text that asks the client for attention - #14
Merged
Merged
Conversation
MarkupText.Bell() marks a position rather than a span of text. It renders as U+0007 for a terminal, Pueblo or MXP client and as an empty ms-bell element for HTML, where the page decides what a bell means; Plain and BBCode leave nothing behind. It rides on the single U+0007 it marks. That character is a real position in the text and measures zero display cells, so it survives slicing, concatenation and padding as a point in the string without moving anything laid out around it — and, because the encodings drop control characters from ordinary text, a bell is the only way one reaches rendered output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review paused — included plan limit reachedKeep your review moving with free on-demand reviews.
On-demand reviews are free for the next 20 days.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Promotion and pricing detailsOn-demand reviews are free for the next 20 days. After that, they cost $0.25 per reviewed file. Review limit detailsOr wait 35 minutes for your next included review. Limit details: You’ve used the included review currently available. Your 63 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (10)
Comment |
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.
MarkupText.Bell()marks a point in the text where the client is asked to get someone's attention.How it is carried
A bell is an event at a position, not a property of a span, and the model has no zero-length run —
WrapreturnsEmptyfor empty text, and every operation assumes a run covers real characters. So a bell rides on the single U+0007 it marks:DisplayWidthalready gives every control zero), so a column holding one is not a cell narrower than its neighbours;What the HTML element means — a sound, a flash, a title change, nothing — is the page's to decide, as with the
ms-cmd-linkanchor.Layout
BellMarkupandMarkupText.Bell()are in the core package, so the type and its serialization are format-neutral; the serializer handles it besideNeutralMarkup, with no codec needed.MarkupString.Ansi, which already owns thems-*classes and the HTML emitter forAnsiMarkup.Tests
BellTests(6): written for every client that reads one; a control character in ordinary text still dropped; nothing left behind in Plain and BBCode; measures zero; survivesSubstringandPad; round-trips through the serializer. 611/611 pass in Release.Suggested release: 2.3.0.
🤖 Generated with Claude Code