feat(renderer): inline CSV table rendering#1277
Closed
bergeouss wants to merge 5 commits intonesquena:masterfrom
Closed
feat(renderer): inline CSV table rendering#1277bergeouss wants to merge 5 commits intonesquena:masterfrom
bergeouss wants to merge 5 commits intonesquena:masterfrom
Conversation
…esquena#568) - Add select mode toggle button at bottom of session list - Render checkboxes per session item when in select mode - Batch action bar with Archive, Delete, and Move to Project actions - Select/Deselect all controls in the session select bar - Escape key exits select mode - 11 new i18n keys across all 7 locales - 11 new tests covering state, functions, DOM, CSS, and i18n
- SVG files (local + URL) render as inline <img> with label - Audio files render as inline <audio> player with controls - Video files render as inline <video> player with controls - File attachments in composer also get inline previews - 3 new i18n keys across all 7 locales - 14 new tests covering regex, handlers, CSS, i18n, and ordering
- test_renderer_js_behaviour.py: add _SVG_EXTS, _AUDIO_EXTS, _VIDEO_EXTS
to node driver to prevent ReferenceError when renderMd references them
- test_issue1095_pasted_images.py: widen renderTray window (1200->2500)
and attachment block window (1200->2000) to account for SVG/audio/video
handler code inserted before paperclip fallback and blob URL revocation
- test_issue1095_pasted_images.py: use .attach-thumb{ selector (with brace)
to avoid matching .attach-thumb--svg variant which has no object-fit
…A files (nesquena#485) - Fenced csv blocks render as styled HTML tables - MEDIA: CSV files lazy-load and render as tables with auto-separator detection - Auto-detects comma, semicolon, and tab separators - Strips surrounding quotes from CSV fields - Normalizes line endings (CRLF, CR, LF) - Size cap (256 KB) and error handling with i18n messages - 4 new i18n keys across all 7 locales - 15 new tests
cad2332 to
b69ef0b
Compare
Collaborator
|
Thanks for this PR! Closes #485. What this does: Extends the inline rendering pipeline to handle CSV data in two ways: fenced Scope of changes:
Things to verify before merge:
Good implementation that follows the established inline render pattern. 15 tests passing. |
Merged
Collaborator
|
✅ Merged into release branch — included in PR #1285 (v0.50.240). Thanks for the contribution! |
- Add code comment documenting auto-separator detection heuristic and its quoted-field edge case - Add 'csv_header_note' i18n key across all 7 locales - Display 'First row shown as table header' label in CSV table header - Widen test search window to accommodate added lines - Addresses review feedback on PR nesquena#1277
Contributor
Author
Review Feedback Addressed
🤖 AI-assisted via Hermes Agent |
nesquena-hermes
pushed a commit
that referenced
this pull request
Apr 30, 2026
- Add code comment documenting auto-separator detection heuristic and its quoted-field edge case - Add 'csv_header_note' i18n key across all 7 locales - Display 'First row shown as table header' label in CSV table header - Widen test search window to accommodate added lines - Addresses review feedback on PR #1277
nesquena-hermes
added a commit
that referenced
this pull request
Apr 30, 2026
## Release v0.50.240 Batch release of 13 PRs that passed full triage + code review + test suite (3199 tests, 0 failures). --- ### Added - **Compact tool activity mode** (`simplified_tool_calling`, default on) — groups tool calls and thinking traces into a single collapsed "Activity" disclosure card per assistant turn. Also adds a new **Calm Console** theme with earth/slate palette and serif prose. @Michaelyklam — #1282 - **PDF first-page preview** — `MEDIA:` `.pdf` files render a canvas thumbnail via PDF.js CDN (4 MB cap). **HTML sandbox iframe** — `.html`/`.htm` files render inline in a sandboxed `<iframe srcdoc>` (256 KB cap). 10 i18n keys × 7 locales. @bergeouss — #1280, closes #480 #482 - **Inline Excalidraw diagram preview** — `.excalidraw` files render as pure SVG (no external deps; rectangles, ellipses, diamonds, text, lines, arrows, freehand; 512 KB cap). @bergeouss — #1279, closes #479 - **Inline CSV table rendering** — fenced `csv` blocks and `MEDIA:` CSV files render as scrollable HTML tables with auto-separator detection. @bergeouss — #1277, closes #485 - **Inline SVG, audio, and video rendering** — SVG as `<img>`, audio as `<audio controls>`, video as `<video controls>`. @bergeouss — #1276, closes #481 - **Batch session select mode** — multi-select sessions for bulk Archive/Delete/Move. 11 i18n keys × 7 locales. @bergeouss — #1275, closes #568 - **Collapsible skill category headers** — click to collapse/expand without re-render; state persists across filter cycles. @bergeouss — #1281 - **`providers.only_configured` setting** — opt-in flag to restrict the model picker to explicitly configured providers. @KingBoyAndGirl — #1268 - **OpenCode Go model catalog** — adds Kimi K2.6, DeepSeek V4 Pro/Flash, MiMo V2.5/Pro, Qwen3.6/3.5 Plus. @nesquena-hermes — #1284, closes #1269 ### Fixed - **Profile `TERMINAL_CWD` TypeError** — `_build_agent_thread_env()` helper merges env before `_set_thread_env()` call. @hi-friday — #1266 - **Service worker subpath cache bypass** — regex now matches `/api/*` under any mount prefix. @Michaelyklam — #1278 - **SSE client disconnect leaks** — `TimeoutError`/`OSError` treated as clean disconnects; server backlog 64, threads daemonized; session list renders before saved-session restore. @KayZz69 — #1267 - **i18n locale corrections** — Korean MCP strings (23), Chinese MCP strings (23), zh-Hant missing keys (41), de missing keys (229). @bergeouss — #1274, closes #1273 --- ### Test results ``` 3199 passed, 2 skipped, 3 xpassed in 72.79s ``` ### PRs on hold (not included) #1265 (draft), #1271 (superseded by #1266), #1272 (skipped XSS tests), #1232 (partial test run), #1222 (review questions open), #1134 (live-server tests), #1132 (superseded by #1134), #1108 (negative UX review), #1084 (empty description)
Collaborator
|
Shipped in release v0.50.240 (PR #1285). Thanks! |
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.
Summary
Closes #485
Extends the inline rendering pipeline to support CSV data — both fenced code blocks and MEDIA: file references render as styled, scrollable HTML tables instead of raw text.
Changes
static/ui.js(+51 lines)csvblocks: New handler in the fence stash (line ~916) that parses CSV content into<table>HTML with<thead>/<tbody>. Falls back to<pre><code>if fewer than 2 rows._CSV_EXTSregex: New extension matcher for.csvfilesloadCsvInline()(same pattern asloadDiffInline()). Fetches viaapi/media, parses CSV, renders as table."or'from CSV fields\r\n), CR (\r), and LF (\n)static/style.css(+9 lines).csv-table-wrap— Scrollable container with border and background.csv-table— Full-width table with collapse.csv-table th— Sticky header with hover background.csv-table td— Padded cells with bottom border.csv-table tbody tr:hover— Row hover highlightstatic/i18n.js(+28 lines)csv_loading,csv_too_large,csv_no_data,csv_errortests/test_csv_table_rendering.py(+139 lines)Testing
AI Disclosure
Developed with AI assistance (Claude, Hermes Agent).