Repository navigation
feat(csv): support Markdown, ChatGPT, and psql/MySQL box table paste (AC-14) - #231
Merged
Merged
Conversation
obvious-autobuild-staging
Bot
force-pushed
the
feat/markdown-table-paste
branch
from
October 20, 2026 02:55
7945bfe to
b8b5c16
Compare
…(AC-14) - Add detectMarkdownOrCliTable in app/src/lib/markdownTable.ts to detect and normalize GitHub/ChatGPT Markdown pipe tables and psql/MySQL ASCII box tables into RFC 4180 CSV. - Auto-normalize detected Markdown/CLI tables inside parseCsvTable and convertText/csvToJson (when separator is auto) so pasted tables immediately render clean columns and rows in CsvTable and JSON output without divider rows or empty outer pipe columns. - Surface a contextual Clean Markdown table / Clean CLI table pill (data-testid="csv-clean-markdown-pill") in InputPane to rewrite raw input into canonical CSV in place while recording an undo snapshot. - Add bundled changelog entry #21 and unit/component test coverage. Co-authored-by: David Boskovic <david@obvious.ai>
obvious-autobuild-staging
Bot
force-pushed
the
feat/markdown-table-paste
branch
from
October 20, 2026 03:02
b8b5c16 to
f2cd512
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Developers and analysts frequently copy Markdown pipe tables out of GitHub PRs, docs, or ChatGPT responses (
| name | score |\n| --- | ---: |\n| Ada | 42 |) or copy ASCII box tables straight frompsqland MySQL terminals (id | city\n----+------\n 1 | Rome\n(1 row)). Pasting either format into CSV -> JSON previously treated the| --- | --- |or----+----separator rule as a data row, produced empty leading and trailing columns from outer border pipes, and included(N rows)CLI footers as malformed rows.What
app/src/lib/markdownTable.ts):detectMarkdownOrCliTable(input: string): DetectedTablePaste | nullsupporting both GitHub/ChatGPT Markdown pipe tables (header row +| --- | :---: |alignment separator + data rows, unescaping\|->|, trimming cell padding, and RFC 4180-quoting cells) andpsql/MySQL ASCII box tables (+---+---+framed box tables andcol1 | col2+----+----border tables with optional(N rows)footers).nullfor standard CSV, TSV, JSON, or plain pipe-separated CSV that has no Markdown or CLI separator rule line.app/src/lib/csvTable.ts,app/src/lib/convert.ts,app/src/components/CsvTable.tsx):separatoris"auto"(or default),parseCsvTableandconvertText(csv2json) automatically normalize detected Markdown or CLI box tables so the input grid and JSON output render clean columns and rows immediately on paste.app/src/components/InputPane.tsx):data-testid="csv-markdown-table-bar"anddata-testid="csv-clean-markdown-pill"(Clean Markdown table (N rows)orClean CLI table (N rows)) above the CSV table when a Markdown or CLI box table is pasted. Clicking rewrites rawinputinto canonical comma-separated CSV and pushes the original Markdown/CLI table onto the undo stack (Mod+Z).#19inapp/src/changelog/entries.ts.app/src/lib/markdownTable.test.ts,app/src/lib/__tests__/convert.test.ts, andapp/src/App.test.tsx.How to Review
app/src/lib/markdownTable.tsandapp/src/lib/markdownTable.test.ts— pure detection and normalization logic for Markdown pipe tables andpsql/MySQL ASCII box tables.app/src/lib/csvTable.tsandapp/src/lib/convert.ts— auto-normalization hook when separator is"auto".app/src/components/InputPane.tsxandapp/src/App.test.tsx— contextualClean Markdown table/Clean CLI tablepill and undo integration.Verification
cd app && npm run lint && npx tsc -b --noEmit && npm test && npm run build(35 test suites, 579 tests passing)bash .github/scripts/verify-seo.sh(passed, 45,103 bytes prerendered HTML)Human author: David Boskovic (david@obvious.ai)
🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact
Test Evidence
AC-14: Paste GitHub/ChatGPT Markdown and psql/MySQL CLI box tables with auto-normalization and one-click Clean table pill

