Skip to content

Links in the text open in a new tab; table text at 80%; table cells serialise from the editor - #108

Merged
alcor merged 3 commits into
mainfrom
feat/links-new-tab-table-scale
Sep 13, 2026
Merged

alcor merged 3 commits into
mainfrom
feat/links-new-tab-table-scale

Conversation

@alcor

@alcor alcor commented Sep 13, 2026

Copy link
Copy Markdown
Member

Links open in a new tab

A browser never follows a link inside editable content, so clicking a link in a document did nothing. The AppLinks plugin now handles every link in the text: vapor: links act as before (Agents panel, New document, Sign in), anything else opens in a new tab with noopener,noreferrer, and the document stays where it is. Taps on touch do the same.

Links imported from markdown also rendered without target: the richSchema link mark stores target: null, and that null won over TipTap's _blank default at render time. The Link mark in app/lib/app-links.ts keeps target and rel on the mark for schema parity with the server but never renders them from it, so every link element carries target="_blank" rel="noopener noreferrer nofollow". @tiptap/extension-link becomes a direct dependency at the version StarterKit already installs.

Table text at 80%

.tiptap table { font-size: 0.8em }. Tables carry more per line than prose; the smaller type keeps columns readable. Cells measure 12.88px against 16.1px prose in the dev server.

Table cells serialise from the editor (found while verifying)

serializeCellInline wrapped a cell's content in a richSchema paragraph. The editor serialises TipTap documents through the same path, and a paragraph from one schema refuses content from another, so on any document with a table every Yjs update threw inside the client's update handler (Caught error while handling a Yjs update: Invalid content for node paragraph). The client's markdown state then stayed empty: the tab title fell back to "vapor", the URL lost its slug, and anything else derived from that markdown went stale. The wrapper nodes now come from the cell's own schema. Dates from #27; separate commit.

Verified

Typecheck clean; 880 tests pass. Lint reports only the unused READ import on main that #107 removes. New tests: a click or tap on an ordinary link calls window.open with _blank and is prevented; plain text is left alone; a link stored with target: null renders _blank and its rel; a table from a second schema instance serialises unchanged. In the browser: the seeded document's link carries target="_blank", a click attempts to open example.com in a new tab while the document tab stays put, cells render at 80%, and the tab title and slug now survive load on a document with a table.

🤖 Generated with Claude Code

alcor and others added 3 commits September 12, 2026 22:15
A browser does not follow a link inside editable content, so clicking one
did nothing. The AppLinks plugin now handles every link: vapor: links act
as before, anything else opens in a new tab with noopener,noreferrer, and
the document stays where it is. Links imported from markdown carried
target: null on the mark, which beat TipTap's _blank default at render
time; the Link mark in app-links.ts keeps those attributes for schema
parity but renders target and rel from its options, so every link element
carries them. @tiptap/extension-link becomes a direct dependency.

Tables set font-size 0.8em: they carry more per line than prose, and the
smaller type keeps columns readable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
serializeCellInline wrapped a cell's content in a richSchema paragraph.
The editor serialises TipTap documents through the same path, and a
richSchema paragraph refuses content from another schema, so every Yjs
update on a document with a table threw inside the update handler. The
client's markdown state then stayed empty: the tab title fell back to
"vapor", the URL lost its slug, and anything else derived from that
markdown went stale. The wrapper nodes now come from the cell's schema.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit b2acc13)
@alcor
alcor merged commit aeeaa3f into main Sep 13, 2026
3 checks passed
@alcor
alcor deleted the feat/links-new-tab-table-scale branch September 13, 2026 05:28
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.

1 participant