Repository navigation
Conversation
White space processing no longer needs to see a span's text all at once, so push_text processes text immediately. This makes text_so_far a read-only getter.
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
staging-devin-ai-integration
Bot
force-pushed
the
devin/1790425683-tree-builder-text-so-far
branch
2 times, most recently
from
September 28, 2026 20:21
fe83c41 to
6e57520
Compare
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.
LLM Contributions: Code and this description were written by Devin (an LLM agent). The description needs rewriting by a human before this goes upstream.
Stacked on #62 (base is its branch).
In
CollapseandPreserveBreaksmodes,push_textstopped a text run at every collapsible character, so ordinary prose was committed one word at a time (each word going throughflush_pending_whitespace,resolve_style_id, andcommit_styled_text). A single space followed by content that needs no processing is already collapsed, so it can be committed as part of the run.New
collapsed_len(text, mode)replaces thefind(is_collapsible || is_segment_break)that measured the text run:So collapsing only runs at double spaces, tabs, newlines, LS/PS, and at the ends of the text. A trailing space still becomes pending whitespace, so behaviour across
push_textcalls and style spans is unchanged. The pending-whitespace, style and wrappability logic is untouched.#[inline(always)]is needed: without it, 1-char-per-push benchmarks were 12–30% slower.Testing:
resolve::treetests pass unchanged.push_text,push_style_span, andpop_style_span. It mixed all four collapse modes, both wrap modes, and CR/LF/tab/FF/U+2028/2029/3000/loneE2input. Text, style runs and style indices were identical. Deliberately breakingcollapsed_lenmade the test fail.Tango
TreeBuilder push, compared paired against #62:Standalone 11.6 KB single-push benchmark, Collapse mode:
Changelog: None
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/c0f395eb38ed46d787feb525a9001029
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/c0f395eb38ed46d787feb525a9001029?variant=devin-insiders
Requested by: @nicoburns