Repository navigation
Conversation
In the reading view, a fence tagged markdown or md shows its body rendered, with a Rendered / Source toggle in the block header. Each page load starts on Rendered. A choice made on the page survives live updates. The hidden source <pre> stays the anchor text model in both views, so occurrence counting and the server's anchor resolution are unchanged. Rendered elements carry body-relative UTF-16 offsets from nested sourcepos. The browser maps a rendered selection to its source range, and draws source highlights over the rendered text when Rendered shows. Only fences at a unique AST code-block position qualify, like math. Adds a demo library example with a seeded thread, the served Markdown guide paragraph, and docs in SOURCE_COMMENTS.md. Co-authored-by: Morty <c46e15f3155e21a9867573fedb70ce905ff1ec43f80f234e6ad56dafae0fb88c@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 @codex review |
Codex Review Summary: 🔄 RunningThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 914f6d6335
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review on block#330: - Text after a formatted child now searches past it. Each mapped run advances its ancestors' cursors, so " bar" in "**foo bar** bar" maps to the second copy, not inside the bold phrase. - A block's view survives an edit to its own text. Its choice falls back to the block's position while the number of blocks is unchanged. - Tables in a draft render plain. The table expander has no way to comment on a draft's cells, so selection in the pane stays the path. Co-authored-by: Morty <c46e15f3155e21a9867573fedb70ce905ff1ec43f80f234e6ad56dafae0fb88c@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 I am preparing this PR in an isolated checkout. I saw and fetched 67bd344 and will preserve that commit and its regression coverage before publishing anything. My additional checks found entity-span mapping gaps (© / © and &), a deck-position forgery case, and authored ID collisions. I also have signed draft-table targets wired through the existing table comment/OT path so expanded tables retain Comment/C, plus a live-update position mapping check for identical drafts. I will reconcile the overlapping fixes, run focused checks, and post the exercised preview/evidence. No approval or merge. |
Signed-off-by: Hampton Lintorn-Catlin <hampton@squareup.com>
|
🤖 @codex review |
|
🤖 Review preparation for
TRY THIS: running local demo. Sign in as |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d5c5d4884
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Hampton Lintorn-Catlin <hampton@squareup.com>
Signed-off-by: Hampton Lintorn-Catlin <hampton@squareup.com>
|
🤖 @codex review |




What changed and why
A plan often holds a draft written in Markdown, such as a project update or a release note, inside a
```markdownfence. The reading view shows that draft as raw code, so readers cannot see how it will look when it is posted.In the reading view, a fence tagged
markdownormdnow shows its body rendered, with a Rendered / Source toggle in the block header, where themarkdownlabel used to be.<pre>must sit at the unique position of amarkdown/mdcode block in the AST, so authored HTML cannot imitate one.Comments work in both views
The hidden source
<pre>stays in the DOM in both views, and it stays the text that anchors count and match. The rendered pane and toolbar are kept out of the anchor text model. So occurrence numbering for the whole document is the same in either view, and the server's anchor resolution is unchanged.data-markdown-from/data-markdown-to). The browser aligns each rendered text node with parser-backed visible text and complete source spans inside that range. It reusesMarkdownTextExtractor, including entity and escape handling.release notes](https://example.com/r/42) for details.table_celltargets translated into full-plan offsets; Source shows the same cell discussion.Known limits
markdown_helper.rb,text_selection_controller.js, andmarkdown.css. The changes do not overlap in purpose, but one of the two will need a rebase.docs/SOURCE_COMMENTS.mdand the served Markdown guide describe the behavior. The demo library has a new example, Markdown blocks: rendered drafts, with a seeded comment thread.Evidence
Rendered, light
Rendered, dark
Source, light
Source, dark
How to try it
Use the shared demo setup and sign in as
hampton@example.com. Open/hampton/demo-libraryand choose Markdown blocks: rendered drafts.c, and comment. Expect the highlight in both views.Testing
spec/system/markdown_blocks_spec.rb: the toggle and outline exclusion, a rendered selection stored as source and highlighted in both views, a source comment shown over rendered text, repeated text anchored to the selected copy, text after formatting mapped to the following copy, emoji offsets and footnote numbers, and the view kept through live updates that add a block or edit this one.spec/helpers/slideshows_helper_spec.rb: block structure and offsets, read-only body, scoped footnotes,mdfences, untouchedtextfences and decks, the forgery guard, and no output for non-interactive renders.spec/lib/development_seed_spec.rb: the demo example and its comment thread.bin/ci --jobs 6 --browser-jobs 3on 914f6d6. Codex fixes in 67bd344 pass the markdown block and helper specs. All spec, browser, and seed jobs pass.gem-audit(action_text-trix advisories in the existing lockfile) andbrakeman(version check) fail locally for reasons outside this change. This PR does not touch the lockfile.🤖 Generated with Claude Code
Review fixes generated with Codex.