Repository navigation
Read game output with MarkupString's decoder instead of our own parsers - #118
Draft
HarryCordewener wants to merge 1 commit into
Draft
HarryCordewener wants to merge 1 commit into
HarryCordewener wants to merge 1 commit into
Conversation
AnsiParser, MxpParser, PuebloParser and ILineParser are replaced by MarkupLineParser, one MarkupString Decoder per session (WithVt, WithMxp, WithPueblo) folded into the existing StyledLine model. The old parser test suites are kept and run against the adapter as the capability inventory; the gaps they found were fixed in MarkupString 2.27.0. Behaviour changes the tests now record: is U+00A0, erase-line erases, Pueblo <img> shows its label, VERSION values are quoted, a picture that would cover text goes inline, and a forged non-web link is text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7WA8C5XG14TAWB6b9V
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Member
Author
|
This is the dependency stated in the description, not a code failure. It clears once SharpMUSH/MarkupString#82 is merged and Generated by Claude Code |
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.
Requested by Grave · project thread
Depends on MarkupString 2.27.0 (SharpMUSH/MarkupString#82). CI cannot restore packages until that version is on NuGet. Locally the suites ran against a 2.27.0 packed from that branch.
What changed
AnsiParser,MxpParser(and.Definitions),PuebloParser,ILineParser,SgrCodes,MxpTagCategoryandMxpLineModeare deleted.Core/Text/MarkupLineParserholds oneMarkupString.Decoding.Decoderper session:WithVt(), a literal-tab plugin,WithMxp(new MxpOptions { ShowRefusedTags = true, Supports = … })andWithPueblo(). It folds eachDisplayLineinto the existingStyledLine/StyledSpan/SpanInteractionmodel, so scrollback, logging, triggers, the TUI and the window are untouched.Flush()callsEndLine(), because the telnet layer strips terminators.Switch(format)enables or disables MXP and Pueblo in place of swapping parsers.WorldSessionalready handled: replies, entities, flags, gauges, sounds, and frame redirects (spawn lines).InlineImageRequest, so the Kitty, sixel and placeholder paths are unchanged.MxpSupportbecomesMxpClientSupport(the old name clashed with TelnetNegotiationCore's). It feedsMxpOptions.Supports, so<SUPPORT>answers stay the same.MarkupString,.Ansi,.Mxpand.Pueblo2.27.0.Capability inventory and how it was checked
The inventory is the old parser test suites:
AnsiParserTests,MxpParserTests,MxpLineModeTests,MxpDefinitionTests,MxpImageTests,PuebloParserTests,ParserBoundaryTests, and the WorldSession and TUI end-to-end tests. They were kept and run against the new adapter. Each failure was either fixed in MarkupString (#82 lists them, for example the self-nesting element stack overflow, temp-secure, open-line definitions, link ends, SEND hints, and pictures over text), fixed in the adapter, or accepted as a change, with the test updated: became a spaceESC[2KdroppedESC[?25lfor "dropped")<img>dropped[image: map.png]label, like MXP<VERSION MXP=1.0 STYLE=0 CLIENT=SharpMUTerm …>STYLEonly once the server sets one with<VERSION n><A HREF="mux:send:…">was a link refused at click timeUrlPolicy.Saferejects it first; the click-time http(s) gate staysESC[1\x01ztreated as malformedMxpPlugin.MaxElementsandMaxDefinitionLengthSgrCodesTestsandMxpTagCategoryTestswere deleted with their subjects.Results (Release, compared with main)
The one Core failure on both is
AReadOnlyCacheDirectory_DegradesToMemoryOnly, which fails when the tests run as root. Core has 50 fewer tests because of the two deleted suites. The build has 0 warnings.Not done here
CellRenderer. The AvaloniaCellRendererpaints SharpConsoleUI's whole composed frame (panels, menus, output), and SharpConsoleUI owns that layout. MarkupString'sCellRendereris a layout step for a single text pane, so it does not replace ours without moving the output pane off SharpConsoleUI. That is a separate change.WithPictures(). Server-sent Kitty, iTerm2 and sixel images (APC/OSC/DCS) are still consumed and not shown, as before. Turning them on needs a picture path fromPictureStoreintoInlineImageHost. This is a follow-up.WithVt), subject toUrlPolicy.Safe.Generated by Claude Code