Skip to content

feat: render markdown tables in sidepanel and skill previews - #2845

Merged
esokullu merged 1 commit into
webbrain-one:mainfrom
snowyukitty:feat/render-markdown-tables
Aug 18, 2026
Merged

esokullu merged 1 commit into
webbrain-one:mainfrom
snowyukitty:feat/render-markdown-tables

Conversation

@snowyukitty

Copy link
Copy Markdown

Description

This change adds support for rendering GitHub Flavored Markdown (GFM) tables in both the sidepanel chat UI and the skill preview pane across Chrome and Firefox builds (addressing #2838).

Key Highlights

  1. Pure ES Table Renderer (markdown-render.js):

    • Parses GFM tables into accessible semantic HTML (<div class="markdown-table-wrapper"><table>...</table></div>).
    • Supports column alignment (:---, :---:, ---:), single edge pipes, escaped pipes (\|), and GFM delimiter hyphen validation (>= 3).
    • Block boundary protection: correctly terminates tables before post-table lists (both -/*/+ and dot/parenthesized numbered lists 1. / 1)), blockquotes, and ATX headings containing pipes.
  2. Protected Inline Formatting & Collision-Safe Sentinels:

    • Centralizes renderInlineMarkdown to protect sanitized markdown anchors with unique sentinels during emphasis processing, preserving starred URLs and supporting bold/italic both around and inside link text.
    • Generates collision-proof Private Use Area (PUA) sentinels with deterministic collision resolution loop across all extraction families (CODE, INLINE, TABLE, LINK, QUOTE, LIST).
    • Cleans up trailing whitespace-only line breaks.
  3. Parity & Comprehensive Testing:

    • Maintains exact 1:1 parity between Chrome and Firefox extension builds.
    • Added unit tests covering table parsing, column alignment, block boundary isolation, deterministic sentinel collision loops, and end-to-end markdown pipelines.
    • All 1847 unit tests and 60/60 security tests pass cleanly.

Closes #2838

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

@snowyukitty is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu

Copy link
Copy Markdown
Collaborator

thanks for the contribution @snowyukitty i think it's conflicting with an earlier commit but it can stilll merge into skills block - thanks!

@esokullu
esokullu force-pushed the feat/render-markdown-tables branch from aea37bf to aa00b04 Compare August 18, 2026 07:57
@esokullu
esokullu merged commit da63ca4 into webbrain-one:main Aug 18, 2026
1 check failed
@webbrain-one

Copy link
Copy Markdown
Owner

@snowyukitty I'm sorry I may have accidentally erased your contribution while trying to force-push a fix to merge it. Would you like to take this #2846 instead? I won't override again, promise! :)

@snowyukitty

Copy link
Copy Markdown
Author

No harm done — I checked main and the contribution is all still there:

  • src/{chrome,firefox}/src/ui/skill-markdown.js imports renderMarkdownTables from markdown-render.js
  • settings.html and history.html both carry the .markdown-table-wrapper / table styling, in both browsers
  • test/run.js still has both tests

There is one real problem in there, and it's mine rather than yours: those two tests are registered twice. test/run.js:13615-13651 is a byte-identical copy of 13577-13613 — I duplicated the block while putting #2845 together and didn't catch it. Node's runner happily registers both, so nothing goes red; it just runs the same assertions twice and makes the file misleading to read. Happy to send a one-file PR deleting the second copy if that's useful.

On #2846 — it's assigned to you at the moment, so say the word and I'll pick it up. One question before I would: "shorter", "top not bottom", and "same as the background but differentiated with a border" are clear, but "take a look at desktop AI agents for inspiration" could go a few ways. Do you have a specific one in mind, or is choosing the direction part of the task?

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.

can't render tables

3 participants