properly render nested things in comment blocks #22

Closed
opened 2026-10-20 17:30:49 +02:00 by daniel · 12 comments
Owner

i noticed that e.g. tables inside comment blocks are not properly rendered on the remarkable, can we improve that? are there other gaps in that area we should fill?

i noticed that e.g. tables inside comment blocks are not properly rendered on the remarkable, can we improve that? are there other gaps in that area we should fill?
Collaborator

❌ Agent run failed

session saved — new comments resume this run

❌ **Agent run failed** _session saved — new comments resume this run_
Collaborator

Agent failed ❌

agent SDK query failed: Error: Claude Code returned an error result: There's an issue with the selected model (claude-opus-4-8). It may not exist or you may not have access to it.
at om.readMessages (file:///usr/local/lib/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:88:20439)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
[runner] spawn env: cwd=/workspace (exists+executable) | executable=/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe (exists+executable) | HOME=/tmp/agent-home

**Agent failed** :x: agent SDK query failed: Error: Claude Code returned an error result: There's an issue with the selected model (claude-opus-4-8). It may not exist or you may not have access to it. at om.readMessages (file:///usr/local/lib/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:88:20439) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) [runner] spawn env: cwd=/workspace (exists+executable) | executable=/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe (exists+executable) | HOME=/tmp/agent-home
Author
Owner

@claude try again

@claude try again
Collaborator

Agent failed ❌

agent SDK query failed: Error: Claude Code returned an error result: There's an issue with the selected model (claude-opus-4-8). It may not exist or you may not have access to it.
at om.readMessages (file:///usr/local/lib/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:88:20439)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
[runner] spawn env: cwd=/workspace (exists+executable) | executable=/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe (exists+executable) | HOME=/tmp/agent-home

**Agent failed** :x: agent SDK query failed: Error: Claude Code returned an error result: There's an issue with the selected model (claude-opus-4-8). It may not exist or you may not have access to it. at om.readMessages (file:///usr/local/lib/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:88:20439) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) [runner] spawn env: cwd=/workspace (exists+executable) | executable=/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe (exists+executable) | HOME=/tmp/agent-home
Collaborator

Agent failed ❌

exceeded pending task timeout

**Agent failed** :x: exceeded pending task timeout
Author
Owner

@claude try again

@claude try again
Collaborator

✅ Agent run completed

4m32s · 40 turns · $1.70 · pushed agent/quote-nested-blocks, agent/nested-callout-titles, agent/quote-import-roundtrip

✅ **Agent run completed** _4m32s · 40 turns · $1.70 · pushed `agent/quote-nested-blocks`, `agent/nested-callout-titles`, `agent/quote-import-roundtrip`_
Collaborator

What I found

  • Root cause: parseBlocks (src/convert/mdblocks.ts:416) treats every > line as plain text and collects it into one flat quote block. drawQuote (src/convert/pdf.ts:780) then joins those lines into a single wrapped italic paragraph. Reproduced on main: in a callout, a table becomes pipes and --- as words, - [ ] stays text with no box to tick, a code fence comes out as a lone backtick, and headings, nested quotes and the callout title run together on one line.
  • Other gaps in the same area: nested callouts (> > [!tip] X) are not flattened and print as [!tip] X. On import, a tick on a quoted task (> - [ ]) is silently dropped, and a remark written into a quoted table cell inserts a line that breaks the table.
  • Design decision: quotes become containers. Their content is parsed recursively and typeset with a left inset and a continuous bar. This sits behind a new nestedQuotes flag in the send snapshot, like inline/quotePictures, so notebooks sent before the change still replay exactly. They keep their old look until the note is next re-sent.

Created

  • !23: render tables, lists, code, headings and nested quotes inside quotes and callouts (parser, typesetter inset, ink, replay flag). Closes #22.
  • !24: flatten nested callout heads to titled quotes (preprocess).
  • !25: import inside quotes: task ticks and strikes, remark text into quoted table cells and lists.

The three MRs are independent and can merge in any order.

Follow-ups

  • Mermaid fences inside callouts are still sent as code: loadDrawings doesn't see > ```mermaid. A small follow-up once !23 lands.
## What I found - **Root cause:** `parseBlocks` (`src/convert/mdblocks.ts:416`) treats every `>` line as plain text and collects it into one flat `quote` block. `drawQuote` (`src/convert/pdf.ts:780`) then joins those lines into a single wrapped italic paragraph. Reproduced on `main`: in a callout, a table becomes pipes and `---` as words, `- [ ]` stays text with no box to tick, a code fence comes out as a lone backtick, and headings, nested quotes and the callout title run together on one line. - **Other gaps in the same area:** nested callouts (`> > [!tip] X`) are not flattened and print as `[!tip] X`. On import, a tick on a quoted task (`> - [ ]`) is silently dropped, and a remark written into a quoted table cell inserts a line that breaks the table. - **Design decision:** quotes become containers. Their content is parsed recursively and typeset with a left inset and a continuous bar. This sits behind a new `nestedQuotes` flag in the send snapshot, like `inline`/`quotePictures`, so notebooks sent before the change still replay exactly. They keep their old look until the note is next re-sent. ## Created - !23: render tables, lists, code, headings and nested quotes inside quotes and callouts (parser, typesetter inset, ink, replay flag). Closes #22. - !24: flatten nested callout heads to titled quotes (preprocess). - !25: import inside quotes: task ticks and strikes, remark text into quoted table cells and lists. The three MRs are independent and can merge in any order. ## Follow-ups - Mermaid fences inside callouts are still sent as code: `loadDrawings` doesn't see `> ```mermaid`. A small follow-up once !23 lands.
Collaborator

✅ Agent run completed

13s · 5 turns · $0.56 · session saved — new comments resume this run

✅ **Agent run completed** _13s · 5 turns · $0.56 · session saved — new comments resume this run_
Collaborator

Since my last update: your retry went through. The analysis and hand-offs are in my earlier comment (What I found). Where things stand now:

  • !24 (nested callout heads become titled quotes) is merged.
  • !23 (tables, lists, code, headings and nested quotes rendered inside quotes and callouts, behind the nestedQuotes replay flag) is open. It closes #22.
  • !25 (import inside quotes: task ticks and strikes, remark text into quoted table cells and lists) is open. main is merged into it and its conflicts are resolved. It passes 694/694 tests and lint locally.

The only thing left is reviewing and merging !23 and !25, which can go in either order. One follow-up is still open: Mermaid fences inside callouts are still sent as code. I'll file that once !23 lands, because it builds on !23's quote-container parsing.

Since my last update: your retry went through. The analysis and hand-offs are in my earlier comment (*What I found*). Where things stand now: - !24 (nested callout heads become titled quotes) is **merged**. - !23 (tables, lists, code, headings and nested quotes rendered inside quotes and callouts, behind the `nestedQuotes` replay flag) is **open**. It closes #22. - !25 (import inside quotes: task ticks and strikes, remark text into quoted table cells and lists) is **open**. `main` is merged into it and its conflicts are resolved. It passes 694/694 tests and lint locally. The only thing left is reviewing and merging !23 and !25, which can go in either order. One follow-up is still open: Mermaid fences inside callouts are still sent as code. I'll file that once !23 lands, because it builds on !23's quote-container parsing.
Collaborator

That earlier run failed because of the model configuration. A later retry worked; see my reply in the newer "try again" thread for where #22 stands now.

That earlier run failed because of the model configuration. A later retry worked; see my reply in the newer "try again" thread for where #22 stands now.
Collaborator

Since my last update: !25 (task ticks and remark text inside quotes on import) is merged, so !24 and !25 are both on main. Only !23 is still open; it renders tables, lists, code, headings and nested quotes inside quotes and callouts, and closes #22. I checked !23 against the current main and it still merges with no conflicts, so it only needs review and merge. Once it lands, I'll file the follow-up for Mermaid fences inside callouts.

Since my last update: !25 (task ticks and remark text inside quotes on import) is **merged**, so !24 and !25 are both on `main`. Only !23 is still open; it renders tables, lists, code, headings and nested quotes inside quotes and callouts, and closes #22. I checked !23 against the current `main` and it still merges with no conflicts, so it only needs review and merge. Once it lands, I'll file the follow-up for Mermaid fences inside callouts.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daniel/obsidian-remarkable-round-trip#22
No description provided.