Skip to content

fix(core): lazily allocate text buffer syntax styles - #1303

Open
kadary wants to merge 1 commit into
anomalyco:mainfrom
demkada:fix/lazy-textbuffer-syntax-style
Open

fix(core): lazily allocate text buffer syntax styles#1303
kadary wants to merge 1 commit into
anomalyco:mainfrom
demkada:fix/lazy-textbuffer-syntax-style

Conversation

@kadary

@kadary kadary commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • Lazily allocate native SyntaxStyle handles only when styled text requires them, with explicit ownership and destruction guards.
  • Encapsulate buffer mutations behind protected seams and expose typed TextRenderable file-loading APIs for the text-wrap example.
  • Add regression coverage for lazy allocation, styled chunks, lifecycle cleanup, post-destroy protection, TextNode styling, and file-load layout updates.

Validation

  • bun test src/renderables/TextBufferRenderable.test.ts from packages/core — 6 passing.
  • Targeted core renderable tests — 186 passing, 1 skipped.
  • React tests — 52 passing.
  • Solid tests — 265 passing.
  • bun run lint — 0 warnings/errors.
  • bun run fmt:check — passing.
  • tsc --noEmit confirmed no errors in changed files; unrelated pre-existing project errors remain outside this diff.

Notes

  • The complete core JavaScript suite showed intermittent failures in unrelated runtime-plugin/audio-stream tests across repeated runs. The new regression test was not implicated.

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