Repository navigation
Conversation
Warp already renders GFM pipe-tables but drops raw-HTML `<table>` markup. The issue wants HTML tables specifically for what GFM can't express: `<br>` line breaks in cells and colspan/rowspan. This adds the product + tech spec for tier-zero tag warpdotdev#3 of warpdotdev#13652: recognize a block-level HTML `<table>`/`<thead>`/`<tbody>`/`<tr>`/`<th>`/`<td>` and map it onto Warp's existing FormattedTable + render path. Scopes the slices honestly: simple table (small, reuses the whole render chain), `<br>`-in-cell (medium, needs a cell-type + serialization change — the capability that makes HTML tables worth having), and colspan/rowspan (large, an explicit non-goal degraded to single-cell, deferred to its own effort since it needs a non-rectangular grid). Nested under specs/GH13652/ (per the specs/APP-4319/<slug>/ chain precedent).
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @fbartho on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
…13726 Issue warpdotdev#13652 (bulk raw-HTML-subset request) was closed in favor of per-feature issues; warpdotdev#13726 is the dedicated raw HTML <table> follow-up. Moves specs/GH13652/tables/ to specs/GH13726/ (flat product.md/tech.md, matching the prevailing per-issue GH<number>/ layout) and updates issue references throughout, while keeping the historical "split out of warpdotdev#13652" framing and the existing preceding-spec pointers. No scope change: simple tables + <br>-in-cell remain in scope, colspan/ rowspan remains an explicit non-goal. Cross-references the new dedicated <br> issue (warpdotdev#13732) and the repo's own test_unsupported_html_types (crates/markdown_parser/src/html_parser_tests.rs), and notes that GFM pipe-tables already work behind FeatureFlag::MarkdownTables and are unaffected by this spec.
|
Every PR must be linked to a same-repo issue before Oz can review it. Next step: open or find a same-repo issue describing this change, then link it to this PR by adding See the contribution guidelines for the full readiness model. Powered by Oz |
There was a problem hiding this comment.
Every PR must be linked to a same-repo issue before Oz can review it.
Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-spec when it is ready. Once it is marked, comment /oz-review to re-trigger review.
See the contribution guidelines for the full readiness model.
Powered by Oz
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
Reviewed the spec PR for raw-HTML <table> support in the Markdown viewer, including the product/tech scope, behavior invariants, testing plan, and high-level security posture.
Concerns
- The spec explicitly defers
colspan/rowspaneven though it describes spans as one of the linked issue's motivating requirements and the PR is positioned to close that issue. - Alignment is underspecified for a per-column table model when individual cells in the same column disagree.
- Header extraction is underspecified for valid HTML tables with multiple header rows or additional
<th>rows.
Verdict
Found: 0 critical, 3 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Fix three underspecified areas Oz flagged on PR warpdotdev#13661: (1) the spec deferred colspan/rowspan while the PR claims to close warpdotdev#13726, which cites spans as a motivating requirement — reframe as delivering the un-spanned subset and flag the "Closes" wording as a maintainer call; (2) alignment was ambiguous when per-cell align attributes disagree within a column of the per-column TableAlignment model — header cell wins, then first specifying body cell, else left; (3) header-row extraction was undefined for multiple thead rows or stray th rows — first thead row (or first th-majority row) wins, other header-like rows demote to plain data rows rather than being dropped or merged.
|
Scope note: |
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This spec adds product and technical coverage for rendering raw HTML tables in the Markdown viewer by mapping supported table markup into the existing table model and extending cell representation for authored <br> line breaks.
Concerns
- The scope says #13726 asks for both
<br>cells and row/column spans, but the spec would close the issue while making spans a non-goal. - The block detection contract is narrower than the attribute-ignoring behavior, so table-level ignored attributes could accidentally prevent table recognition.
- The proposed
<br>serialization needs an explicit collision/escaping rule to avoid corrupting literal<br>text during round-trip.
Verdict
Found: 0 critical, 3 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
… gaps (GH13726) Round-2 Oz findings on PR warpdotdev#13661: 1. Non-goals section now names warpdotdev#13953 as the colspan/rowspan owner with explicit acceptance criteria for closing warpdotdev#13726 — the split was previously bound only in a PR comment and the Summary's "Issue linkage" prose, neither of which a reviewer scanning Non-goals would see. tech.md's Risks section is updated to match (was still framing the linkage as an open maintainer decision after product.md resolved it). 2. The block detector's opening-tag grammar now explicitly tolerates attributes/whitespace (`<table class="data">`), aligned with specs/GH13721/tech.md's parse_html_image attribute-scanner style — previously the detector text and the attribute-ignoring invariant (10) made incompatible implicit assumptions about what the detector matches. 3. Specifies the `<br>` vs `<br>` escape rule for table cells, including why the ambiguity GH13732 has to resolve via parser ordering doesn't apply here (DOM-based parse_phrasing_content decodes entities and recognizes elements at separate tokenization stages, so they can't collide). Also corrects a wrong code citation: the existing `"br" => LineBreak` arm is a top-level block match, not part of parse_phrasing_content, so cell-level <br> requires new code, not reuse. No cargo — docs only.
product.md invariant 9 deferred to "the tech spec's chosen convention" for how <table></table> renders, but tech.md never stated one — a dangling forward-reference caught during the round-2 sweep. Resolves it by reusing the existing FormattedTable::normalize_shape function (already this spec's mechanism for ragged-row normalization, invariant 6) rather than inventing a new empty-table rule: normalize_shape's `column_count == 0 → 1` guard means an empty table always yields one column with an empty header cell and zero rows, never zero columns or "nothing" (there's no code path in normalize_shape that produces either). Also resolves invariant 9's "dropped or padded" ambiguity for an empty <tr> to "padded," consistent with invariant 2's rule against silently discarding authored rows. No cargo — docs only.
|
/oz-review |
|
I'm re-reviewing this spec-only pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This spec defines raw-HTML <table> support for the Markdown viewer by mapping HTML table structure into the existing FormattedTable render path and extending table cells to preserve authored <br> line breaks.
Concerns
- The round-trip/export requirement serializes authored cell breaks as
<br>in GFM/internal table forms, but the proposed changes do not specify the corresponding GFMparse_table_cellread path or an explicit dependency on the standalone<br>work, so the implementation could satisfy HTML parsing while still failing its own round-trip acceptance criteria.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
…ed item (GH13726) Oz flagged that the item-1 serialization rule makes round-trip correctness depend on a parser path recognizing <br> in the internal/ GFM cell formats, while the proposed reader changes (item 2) only cover the HTML/DOM cell reader — leaving the dependency on warpdotdev#13732's standalone <br> work unstated. Verified against PR warpdotdev#13870's actual (Oz-approved, merge-pending) diff: it adds <br> recognition only at the GFM/paragraph inline tokenizer level (parse_inline_token_br in markdown_parser.rs) and patches only the two plain-text-flattening serializers (to_plain_text's inline_to_text, and inline_to_markdown). It does not touch html_parser.rs, from_internal_format/to_internal_format, or parse_table_cell at all. So the dependency is real but narrower than "defer <br>-in-cell to warpdotdev#13732": only the to_plain_text GFM-export encode side is inherited from PR warpdotdev#13870 (its inline_to_text patch already replaces any embedded \n with <br>, not GFM-specific). The tab-separated internal round-trip (to_internal_format/from_internal_format) and parse_table_cell remain this spec's own work, never touched by warpdotdev#13870. Documented the split explicitly in item 1, added a merge-order risk note, and adjusted the round-trip test-plan rows to cite which direction is inherited vs. own-scope.
|
Closing in favor of #14242. |
What
Spec (product.md + tech.md, per CONTRIBUTING's spec-first workflow for feature requests) for teaching the Markdown viewer to render raw-HTML
<table>markup (<thead>/<tbody>/<tr>/<th>/<td>) by mapping it onto Warp's existing table model and render path, and to honor<br>inside cells.Closes #13726 — the focused raw-HTML
<table>issue split out of #13652 per maintainer guidance there. Sibling spec draft:<img>sizing (#13656, now targeting #13721);<br>handling has its own issue (#13732).Why
Warp already renders GFM pipe-tables (behind
MarkdownTables). The issue asks for HTML tables specifically for the two things GFM syntax cannot express: cells with a hard line break (<br>) and cells that span columns/rows (colspan/rowspan). Raw<table>markup is currently dropped.Highlights
<table>and render it through the existing table layout/render/scroll/selection path — same appearance as an equivalent GFM table.<th>/<thead>→ header row,<td>rows → data; inline formatting and inline images (per docs(specs): markdown viewer raw-HTML <img> support (rendering + sizing) (GH13721) #13656) render inside cells.<br>inside a cell as an authored hard line break — the primary capability GFM pipe tables lack. The renderer already does multi-line cells (wrapping); this makes the break first-class.align/text-align; ragged rows normalized; only structural tags + alignment attributes read; no script/navigation.MarkdownTablesfeature flag; no GFM-table behavior change.Honest scope note (three slices, sized)
FormattedTablewith zero editor changes — but barely beats GFM pipe tables.<br>in cells → medium: the value-add. The renderer supports multi-line cells, but the cell type and the internal round-trip format (which uses\nas the row delimiter) can't represent an authored break, so it needs a cell-model + serialization change. This spec commits to it.colspan/rowspan→ large, explicit non-goal here: the flat rectangular grid (one width/column, one height/row,[row][col]indexing) is baked into the data model, layout, painter, and offset maps. Spanning needs a non-rectangular grid across all of them. Degraded to a single ordinary cell (span ignored — no crash, no corrupt grid) and deferred to its own effort.Flagging the cell-model change (touches the shared
FormattedTabletype) and the simple-vs-<br>split as the key decisions for review — happy to split simple-table and<br>into two PRs if you'd prefer.Process note
#13652 was closed in favor of per-feature issues; this spec now targets #13726 and the files moved to
specs/GH13726/. Keeping this draft open and updated while #13726 awaits triage /ready-to-spec— happy to adjust if you'd rather sequence it differently.