Skip to content

fix(inbox): one document rendering for all text-only items, GFM tables, 18px - #329

Merged
ryw merged 2 commits into
mainfrom
fix/markdown-table-detection
Jul 22, 2026
Merged

fix(inbox): one document rendering for all text-only items, GFM tables, 18px#329
ryw merged 2 commits into
mainfrom
fix/markdown-table-detection

Conversation

@ryw

@ryw ryw commented Jul 22, 2026

Copy link
Copy Markdown
Member

Follow-ups to #327 from dogfooding:

  • One output type for text-only items. Any { text } context now renders as the unboxed full-width document — the markdown sniff only picks the renderer (Markdown vs pre-wrap for plain text whose line breaks matter), so a text item can never fall back to the boxed CONTEXT/TEXT labeled-fields view. The Attio duplicate register was doing exactly that, because its table-only markdown matched none of the looksLikeMarkdown markers.
  • GFM tables detected + scrollable. looksLikeMarkdown gains a table-delimiter-row marker (| --- | --- |, not just any pipe-bearing line), and the Markdown component wraps tables in overflow-x-auto so a 10-column register scrolls instead of blowing out the reading column.
  • Reading size 19px → 18px (prose-lg native) — 19px read slightly oversized inside the app shell.

Testing

  • npx vitest run — 28 files / 200 tests pass (table-marker + documentText cases updated), tsc --noEmit clean.
  • Verified in the local Docker stack: a seeded table-only register renders as a real table (scrolls horizontally), a plain-text note renders unboxed with line breaks preserved, both with no CONTEXT/TEXT chrome.

🤖 Generated with Claude Code

ryw and others added 2 commits July 22, 2026 09:01
Any { text } context now renders as the unboxed full-width document --
the markdown sniff only picks the renderer (Markdown vs pre-wrap), so a
text item can no longer fall back to the boxed CONTEXT/TEXT fields view
(the Attio duplicate register did, because its table-only markdown
matched no marker). looksLikeMarkdown gains a GFM table-delimiter
marker, and wide tables scroll horizontally instead of blowing out the
reading column.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19px read slightly oversized inside the app shell; prose-lg's native
18px on the same 1.6 line-height sits better.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 13:02
@ryw
ryw merged commit 40937ab into main Jul 22, 2026
11 checks passed
@ryw
ryw deleted the fix/markdown-table-detection branch July 22, 2026 13:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines inbox item rendering so any { text } context is treated as a full-width “document” view (never falling back to the boxed labeled-fields layout), improves Markdown detection for GFM tables (including horizontal scrolling for wide tables), and adjusts long-form reading typography from 19px to Tailwind Typography’s native prose-lg sizing (18px).

Changes:

  • Treat any non-empty { text: string } context as document content; choose Markdown vs pre-wrapped plain text rendering at display time.
  • Improve Markdown sniffing to recognize GFM table delimiter rows and make rendered tables horizontally scrollable.
  • Adjust Markdown “lg” styling to remove the explicit 19px override (18px default via prose-lg).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
web/src/components/markdown.tsx Updates long-form typography and adds a custom table renderer to wrap tables in overflow-x-auto.
web/src/app/[workspace]/inbox/[id]/page.tsx Renders {text} documents as either Markdown (if detected) or pre-wrapped plain text, both unboxed.
web/src/app/[workspace]/inbox/[id]/context-view.tsx Expands Markdown detection to include GFM table delimiter rows; makes {text} contexts qualify as documents even when plain text.
web/src/app/[workspace]/inbox/[id]/context-view.test.ts Updates tests to cover table delimiter detection and documentText behavior for plain text and empty text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +55 to +59
table: (props) => (
<div className="overflow-x-auto">
<table {...props} />
</div>
),
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.

2 participants