Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
d2e202e to
cc4e32c
Compare
cc4e32c to
4392601
Compare
Summary: Add a dependency-free semantic-fence plugin for ANSI terminal output. Interpret bounded SGR color and emphasis, remove terminal controls, preserve plain text for DOM and clipboard use, and expose themeable palette and CodeBlock options. Test Plan: - pnpm exec vitest run packages/core/src/Markdown packages/core/src/CodeBlock --root . - pnpm --filter @astryxdesign/core typecheck - pnpm --filter @astryxdesign/core typecheck:docs - pnpm --filter @astryxdesign/core build - pnpm check:repo - pnpm visual:probe-theme:check - node packages/cli/clients/cli/bin/astryx.mjs component Markdown --dense
4392601 to
63d1b69
Compare
|
@cixzhang — I’d appreciate your feedback on this draft. Focus: Exact This is PR 16/20 in the linked Markdown stack. It is intentionally one commit and one primary intent; the description includes matched before/after screenshots and previous/next links, so you can review just this PR’s delta. |
humbertovirtudes
left a comment
There was a problem hiding this comment.
The ANSI control-string boundary is incomplete. parseAnsi consumes the ESC-prefixed DCS, SOS, PM, and APC forms, but not their single-byte C1 equivalents (U+0090, U+0098, U+009E, U+009F). The generic filter then removes only the introducer and terminator while leaving the payload visible and copyable. Please route both representations through consumeControlString and add regression cases for each C1 form.
PR Analysis Report
Modified ComponentsOutline (@astryxdesign/core)
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression2 of 422 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | View full report |
User need
Exact
ansifences render familiar terminal emphasis and colors while exposing clean plain text to selection and the clipboard.Problem and solution fit
Displaying ANSI logs as raw text leaks control sequences; rendering them unsafely risks terminal/control payloads. A dependency-free bounded parser supports the useful SGR subset and strips non-text controls.
Current specification
AST-039, the semantic-fence contract, and CodeBlock source-fidelity rules. Pinned source.
Public delta and caller burden
Add an exact-fence ANSI plugin supporting standard, bright, 256, and true colors plus bounded emphasis/reset semantics; strip OSC, non-SGR CSI, DCS-like strings, residual escapes, and non-text controls.
Design and alternatives
The capability is explicit and opt-in where it changes syntax, rendering, or package weight. Existing defaults and replacement seams remain compatible; broader alternatives stay outside this PR.
Evidence
Real-browser evidence
Focused behavior and compatibility coverage ships with the implementation.
Scope
Testing
pnpm exec vitest run packages/core/src/Markdown packages/core/src/CodeBlock— 37 files, 760 tests.pnpm --filter @astryxdesign/core typecheck.pnpm check:repo.Stack
Previous: #6670 · Next: #6672 · Each PR is intentionally one commit and one primary intent.