Skip to content

Instantly share code, notes, and snippets.

@voltcrash
Created November 11, 2026 12:31
Show Gist options
  • Select an option

  • Save voltcrash/2df5403c31e639d490f67df4dde61206 to your computer and use it in GitHub Desktop.

Select an option

Save voltcrash/2df5403c31e639d490f67df4dde61206 to your computer and use it in GitHub Desktop.
T3 Code HTML bootstrap quoted-attribute runtime proof

HTML bootstrap quoted-attribute proof

Reproduction: <!doctype html><html><head data-condition='x > 0'><title>Report</title></head><body><p>Report</p></body></html>.

The old opening-tag regex ends at the > within the attribute and inserts bootstrap markup inside its value. The fix consumes complete single- or double-quoted values when locating the head or fallback html opening tag.

Focused regression

vp test run packages/shared/src/htmlRender.test.ts

  • Before changing implementation: 4 new cases failed; 11 existing cases passed.
  • After: all 15 passed.
  • Cases: head and fallback html, each with single- and double-quoted >; mixed quote characters also covered.

Actual client runtime

Linux Chromium headless, isolated worktree T3 home (copied dev fixture state). A temporary free Replay (dev) fixture called the real thread-scoped html_render MCP tool, then emitted the actual tool result through the ACP adapter, orchestration and web chat. No mocked HTML response or direct projection writes. The fixture was restored after use.

The Browser panel's snapshot timed out twice, and its hidden tab did not paint the chat list. Verification therefore used the repository's installed Playwright/Chromium against the same authenticated dev web client.

Observation Before After
Head attribute 'x > 0' Attribute swallowed bootstrap; style absent, scripts=0, meta=0 Original value preserved; theme style present, scripts=1, meta=2
Head page Times New Roman; visible bootstrap JavaScript; frame stays 300px Clean report in system font; size reports received; frame fits to 100px
Fallback html attribute "x > 0" Attribute becomes x ><head><meta charset=; visible 0"> Original value preserved; clean report; scripts=1, meta=2; frame fits to 100px

Before/after PNG captures were inspected locally. No screenshot assets are committed.

Scope

The shared helper is called by server HtmlRender.prepare, used by both preview and publish. Published documents use this same server path for web, desktop, mobile, and remote connections. Web client observed; native mobile, Electron shell and a separate remote/tunnel connection were not independently exercised. No provider, RPC contract, client UI, or inert-content handling changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment