Skip to content

fix(tlon): bare URLs and images after text lose rich formatting - #164828

Merged
obviyus merged 6 commits into
openclaw:mainfrom
jayzhou2309:fix/tlon-inline-url-image
Oct 8, 2026
Merged

obviyus merged 6 commits into
openclaw:mainfrom
jayzhou2309:fix/tlon-inline-url-image

Conversation

@jayzhou2309

@jayzhou2309 jayzhou2309 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #164784

What Problem This Solves

Fixes: Tlon messages lose rich formatting when a bare URL or a Markdown image follows other text on the same line. The URL is sent as plain text, and the image is sent as a literal ! followed by a link. An image inside a heading, quote, or bold, italic, or strikethrough text is sent as an internal imageBlock marker that is not a valid story inline.

User Impact

User impact: Tlon DMs, group posts, and media captions now show a bare URL as a link and a Markdown image as a native image block wherever it appears in the line. The text around the image keeps its heading, quote, or style.

Why This Change Was Made

markdownToStory in extensions/tlon/src/urbit/story.ts tries its inline rules at the cursor in order. The plain-text fallback consumed the scheme letters of https:// and the ! of ![alt](src), so the URL and image rules could only match at the start of a run. The fallback now stops at ! and at a http:// or https:// start. Since bare URLs now match in running prose, the URL rule also stops before trailing sentence punctuation, so see https://example.com/a. links https://example.com/a. A closing paren stays in the URL only when it balances an opening paren inside the URL, so https://en.wikipedia.org/wiki/Function_(mathematics) keeps its ) while (see https://example.com/a) leaves the prose paren outside the link. An unmatched ) foll…

Images were hoisted to blocks only from direct paragraph children. hoistImageBlocks now moves image markers out of bold, italics, strike, and blockquote content at any depth and drops a style left empty. Paragraphs, list fallback text, headings, and quotes all go through it, and each emits its image blocks after its own verse, as paragraphs already did. A heading or quote that held only an image becomes just the image block. List items with images still fall back to paragraph text, as before.

The existing list test "preserves images inside list items as plain story content" pinned the old - ! plus link output. It now expects - followed by the native image block.

Evidence

  • Red first. test(tlon) commit a08e2566a67 adds two bare URL cases (after text, and before trailing punctuation) and six image cases (after text, heading with text, image-only heading, quote, bold, nested in a list item) to extensions/tlon/src/urbit/story.test.ts. On upstream/main a6b9da2: 8 failed, 47 passed. On fix afe081343c3: 55/55 pass.
  • pnpm test extensions/tlon: 39 files, 368 passed. pnpm tsgo:extensions and pnpm tsgo:extensions:test exit 0. scripts/run-oxlint.mjs exit 0 and oxfmt --check clean on both changed files.
  • Production converter on the issue's inputs, through a throwaway tsx driver (not committed) that imports story.ts from main and from the fix:
## main a6b9da2bdee
"Docs: see https://docs.example.com/guide for details" => [{"inline":["Docs: see https://docs.example.com/guide for details"]}]
"Here is the chart ![chart](https://example.com/chart.png)" => [{"inline":["Here is the chart !",{"link":{"href":"https://example.com/chart.png","content":"chart"}}]}]
"## ![chart](https://example.com/chart.png)" => [{"block":{"header":{"tag":"h2","content":[{"imageBlock":{"src":"https://example.com/chart.png","alt":"chart"}}]}}}]
"> see ![chart](https://example.com/chart.png)" => [{"inline":[{"blockquote":["see !",{"link":{"href":"https://example.com/chart.png","content":"chart"}}]}]}]

## fix afe081343c3
"Docs: see https://docs.example.com/guide for details" => [{"inline":["Docs: see ",{"link":{"href":"https://docs.example.com/guide","content":"https://docs.example.com/guide"}}," for details"]}]
"Here is the chart ![chart](https://example.com/chart.png)" => [{"inline":["Here is the chart "]},{"block":{"image":{"src":"https://example.com/chart.png","height":0,"width":0,"alt":"chart"}}}]
"## ![chart](https://example.com/chart.png)" => [{"block":{"image":{"src":"https://example.com/chart.png","height":0,"width":0,"alt":"chart"}}}]
"> see ![chart](https://example.com/chart.png)" => [{"inline":[{"blockquote":["see "]}]},{"block":{"image":{"src":"https://example.com/chart.png","height":0,"width":0,"alt":"chart"}}}]
  • Balanced parentheses (ClawSweeper review of afe081343c3). Commit 215141ab073 adds "keeps balanced parentheses inside a bare URL", which fails on afe081343c3 (the link ends at Function_(mathematics and the ) is left as text). A second-model review of that commit found two edge cases, fixed in a6c78969374 with two more tests that fail on 215141ab073: punctuation before a stray paren stayed in the link (https://example.com/a:( sad linked https://example.com/a:), and an unmatched ) mid-URL cut the URL short (https://example.com/?q=a)b). On a6c78969374: pnpm test extensions/tlon/src/urbit/story.test.ts --maxWorkers=1 58/58 pass in 0.5s (1.1s wall), pnpm test extensions/tlon/src/urbit/send.test.ts --maxWorkers=1 5/5, pnpm test:extension tlon…
## afe081343c3
"see https://en.wikipedia.org/wiki/Function_(mathematics)" => [{"inline":["see ",{"link":{"href":"https://en.wikipedia.org/wiki/Function_(mathematics","content":"https://en.wikipedia.org/wiki/Function_(mathematics"}},")"]}]
## a6c78969374
"see https://en.wikipedia.org/wiki/Function_(mathematics)" => [{"inline":["see ",{"link":{"href":"https://en.wikipedia.org/wiki/Function_(mathematics)","content":"https://en.wikipedia.org/wiki/Function_(mathematics)"}}]}]
"(see https://en.wikipedia.org/wiki/Function_(mathematics))" => [{"inline":["(see ",{"link":{"href":"https://en.wikipedia.org/wiki/Function_(mathematics)","content":"https://en.wikipedia.org/wiki/Function_(mathematics)"}},")"]}]
"see https://x.com/a?(" => [{"inline":["see ",{"link":{"href":"https://x.com/a","content":"https://x.com/a"}},"?("]}]
"(https://x.com/a), and" => [{"inline":["(",{"link":{"href":"https://x.com/a","content":"https://x.com/a"}},"), and"]}]
"https://x.com/a)b" => [{"inline":[{"link":{"href":"https://x.com/a)b","content":"https://x.com/a)b"}}]}]

The URL pattern's alternatives start on disjoint characters, so it does not backtrack. 15,000 repeats of each of (, ), ., (a, a(, .(, )(, (., ). after the scheme each convert in under 1 ms.

  • Nested parentheses (ClawSweeper review of 43b165a). Commit 150531d lets a balanced group hold one nested group, so https://example.com/a(b(c)d) keeps its last ) as main does. The new test "keeps nested balanced parentheses inside a bare URL" fails on 43b165a (1 failed, 58 passed) and passes on 150531d (59/59). On 150531d: pnpm test:extension tlon 37 files 327 passed, send.test.ts 5/5, pnpm tsgo:extensions and pnpm tsgo:extensions:test exit 0, scripts/run-oxlint.mjs exit 0, oxfmt --check clean. 15,000 repeats of each of (, (a, ((a, ((a), (((, )(, (., ((((b), a((b))c, (() after the scheme each run through the URL pattern in under 1 ms (worst 0.21 ms). Groups nested three deep still end early. The sam…
## 43b165ad315
"https://example.com/a(b(c)d)" => [{"inline":[{"link":{"href":"https://example.com/a(b(c)d","content":"https://example.com/a(b(c)d"}},")"]}]
"see https://example.com/a(b(c)d)." => [{"inline":["see ",{"link":{"href":"https://example.com/a(b(c)d","content":"https://example.com/a(b(c)d"}},")."]}]
"https://x.com/a((b))c" => [{"inline":[{"link":{"href":"https://x.com/a","content":"https://x.com/a"}},"((b))c"]}]
"(see https://en.wikipedia.org/wiki/Function_(mathematics))" => [{"inline":["(see ",{"link":{"href":"https://en.wikipedia.org/wiki/Function_(mathematics)","content":"https://en.wikipedia.org/wiki/Function_(mathematics)"}},")"]}]
## 150531d8e7b
"https://example.com/a(b(c)d)" => [{"inline":[{"link":{"href":"https://example.com/a(b(c)d)","content":"https://example.com/a(b(c)d)"}}]}]
"see https://example.com/a(b(c)d)." => [{"inline":["see ",{"link":{"href":"https://example.com/a(b(c)d)","content":"https://example.com/a(b(c)d)"}},"."]}]
"https://x.com/a((b))c" => [{"inline":[{"link":{"href":"https://x.com/a((b))c","content":"https://x.com/a((b))c"}}]}]
"(see https://en.wikipedia.org/wiki/Function_(mathematics))" => [{"inline":["(see ",{"link":{"href":"https://en.wikipedia.org/wiki/Function_(mathematics)","content":"https://en.wikipedia.org/wiki/Function_(mathematics)"}},")"]}]

Not verified: delivery to a live Urbit ship and rendering in a Tlon client. The output uses only the link inline and block.image shapes the converter already emits for a leading URL and a standalone image.

AI disclosure: an AI agent (Claude Code) reproduced the issue, wrote the test and the fix, had a second model review the diff, and ran the gates above: pnpm test extensions/tlon/src/urbit/story.test.ts, pnpm test extensions/tlon, pnpm tsgo:extensions, pnpm tsgo:extensions:test, scripts/run-oxlint.mjs, oxfmt --check, and the converter driver above.

🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.

Maintainer verification

No overlap with Pash/Sarah changes.

Verified the real Tlon plugin outbound adapter through HTTP login and poke requests against a loopback mock Urbit ship, on current main 2f1f73ccb2224bbe7d961b4c0d3b29cfdd51e7f8 (including a second real send run) and this head 0346f78159c4837e97f1e0a78dc78d1828586864. Both DM and group pokes reproduce plain-text bare URLs and broken image links on main. The candidate emits native links and image blocks, preserving heading, quote and bold context; plain text, bold/italic/strike/code and explicit Markdown-link controls are unchanged. 16 payload comparisons passed (10 corrected cases, 6 unchanged controls).

Focused story suite: 61 tests passed, 2.57s wrapper wall time (1.68s Vitest); changed converter passed scoped real tsgo. CI cost was not separately measured. One real gpt-5-mini call (low reasoning, 4096 output-token budget) completed; its output was sent through candidate DM and group adapters with native links in both captured pokes. No real Urbit ship or client rendering is claimed.

Merge danger: two-way door; reverting restores the old converter. No state migration. Blast radius is Tlon outbound Markdown stories and media captions.

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: tlon Channel integration: tlon size: S labels Oct 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 11:33 AM ET / 15:33 UTC (Revision 6).

ClawSweeper review

What this changes

The PR repairs Tlon’s Markdown converter so URLs and images after text retain native formatting, including images inside headings, quotes, and styled text.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary: current main still has the reported formatting defects. The latest head resolves the previous parenthesis-depth finding, and no remaining actionable correctness defect was found.

Priority: P2
Reviewed head: 0346f78159c4837e97f1e0a78dc78d1828586864

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful converter traces and regression coverage; the prior blocking finding is resolved.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Real production-converter before/after output demonstrates corrected native links and image blocks, with the latest comment extending URL evidence to four nesting levels. This proves the changed serialization boundary; live Urbit delivery and client rendering are not claimed. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Real production-converter before/after output demonstrates corrected native links and image blocks, with the latest comment extending URL evidence to four nesting levels. This proves the changed serialization boundary; live Urbit delivery and client rendering are not claimed. No stored-data contract changes.
Evidence reviewed 10 items Introduced changes inspected: Read the complete production converter and test file, and the pinned merge-base-to-head diff. The patch changes token recognition and recursively normalizes image markers through the existing converter.
Previous finding resolved: GitHub's comparison against the previous reviewed head confirms that the finite-depth regex was replaced with greedy URL recognition and balance-aware trailing trimming. The added regression covers the previously failing three-level URL at the beginning, within prose, and within surrounding parentheses.
Current main still needs the repair: Current main retains the plain-text fallback that consumes URL scheme letters and image exclamation marks, direct-child-only paragraph image extraction, and unnormalized heading and quote content.
Findings None None.
Security None None.

How this fits together

Tlon’s outbound converter turns Markdown messages and media captions into native rich-text payloads. Direct-message and group-message senders forward those payloads to the configured Urbit ship.

flowchart TD
  A[Messages and captions] --> B[Markdown converter]
  B --> C[Recognize URLs and styles]
  B --> D[Extract native image blocks]
  C --> E[Tlon story payload]
  D --> E
  E --> F[Direct and group senders]
  F --> G[Urbit ship]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +55, Tests +100. Total +155 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 77 22 +55
Tests 1 104 4 +100
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 181 26 +155

Review metrics

Metric Value Why it matters
Production versus regression coverage production net +55 lines; tests net +100 lines Production growth has a concrete purpose: normalize nested images and recognize prose URLs within the existing converter owner.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #164784
Summary: This PR is the candidate repair for the canonical converter report; the earlier proposal was closed without merging.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one Tlon converter that consistently emits native links and image blocks for all outbound text and captions.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source establishes the token-consumption and nested-image defects, and the supplied production converter traces demonstrate the affected inputs. This read-only review did not execute them.

Is this the best way to solve the issue?

Yes: repairing the existing shared converter is the narrowest solution, and balance-aware trailing trimming resolves the previous finite-depth regression without another formatting owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7a8e5a19b68b.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Real production-converter before/after output demonstrates corrected native links and image blocks, with the latest comment extending URL evidence to four nesting levels. This proves the changed serialization boundary; live Urbit delivery and client rendering are not claimed. No stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs a deterministic rich-formatting defect limited to Tlon outbound messages and captions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Real production-converter before/after output demonstrates corrected native links and image blocks, with the latest comment extending URL evidence to four nesting levels. This proves the changed serialization boundary; live Urbit delivery and client rendering are not claimed. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Real production-converter before/after output demonstrates corrected native links and image blocks, with the latest comment extending URL evidence to four nesting levels. This proves the changed serialization boundary; live Urbit delivery and client rendering are not claimed. No stored-data contract changes.

Evidence

What I checked:

  • Introduced changes inspected: Read the complete production converter and test file, and the pinned merge-base-to-head diff. The patch changes token recognition and recursively normalizes image markers through the existing converter. (extensions/tlon/src/urbit/story.ts:45, 0346f78159c4)
  • Previous finding resolved: GitHub's comparison against the previous reviewed head confirms that the finite-depth regex was replaced with greedy URL recognition and balance-aware trailing trimming. The added regression covers the previously failing three-level URL at the beginning, within prose, and within surrounding parentheses. (extensions/tlon/src/urbit/story.test.ts:146, 0346f78159c4)
  • Current main still needs the repair: Current main retains the plain-text fallback that consumes URL scheme letters and image exclamation marks, direct-child-only paragraph image extraction, and unnormalized heading and quote content. (extensions/tlon/src/urbit/story.ts:98, 7a8e5a19b68b)
  • Latest release has the original parser: The v2026.9.8 source retains the original greedy leading-URL rule and plain-text fallback; the requested recognition repair is not already present in that release. (extensions/tlon/src/urbit/story.ts:98, fc23bc864e45)
  • Shared production boundary: Direct messages, group messages, and media captions use markdownToStory. The outbound adapter forwards its story through the existing senders without another formatting implementation. No public plugin API, stored-data format, configuration, authentication, or authority contract changes. (extensions/tlon/src/channel.runtime.ts:155, 0346f78159c4)
  • After-fix production converter evidence: The supplied PR body contains before/after output from the real converter for mid-line URLs and images, headings, and quotes. The latest contributor comment reports a corrected four-level URL trace and unchanged punctuation controls on the reviewed head: fix(tlon): bare URLs and images after text lose rich formatting #164828 (comment). These directly exercise the changed deterministic serialization owner; live ship delivery and client rendering are explicitly unverified. Reported 61 converter tests and 373 Tlon tests are supplemental, not reviewer-executed results. (extensions/tlon/src/urbit/story.ts:490, 0346f78159c4)

Likely related people:

  • arthyn: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-04T08:20:12.330Z sha afe081343c320e2ccacb76a6839d0527a5898f97 :: needs changes before merge. :: [P2] [P2] Preserve balanced closing parentheses in bare URLs
  • reviewed 2026-10-04T09:12:37.830Z sha 215141ab0735a67c3bfeff090f741366bf5beb35 :: needs changes before merge. :: [P2] [P2] Preserve nested balanced parentheses in bare URLs
  • reviewed 2026-10-04T09:27:40.609Z sha a6c7896937410bca9e6d752ed71e4a933a3037c0 :: needs changes before merge. :: [P2] [P2] Preserve nested balanced parentheses in bare URLs
  • reviewed 2026-10-06T01:43:34.798Z sha 43b165a :: needs changes before merge. :: [P2] [P2] Preserve nested balanced parentheses in bare URLs
  • reviewed 2026-10-06T02:22:10.353Z sha 150531d :: blocked before merge. :: [P2] [P2] Preserve balanced URL parentheses without a depth limit

@jayzhou2309
jayzhou2309 force-pushed the fix/tlon-inline-url-image branch from a6c7896 to 43b165a Compare October 6, 2026 01:36
@jayzhou2309

Copy link
Copy Markdown
Contributor Author

Fixed in 150531d.

  • URL_PAREN_GROUP in extensions/tlon/src/urbit/story.ts now allows one nested balanced group, so https://example.com/a(b(c)d) links in full, as on main.
  • New test "keeps nested balanced parentheses inside a bare URL" in story.test.ts fails on 43b165a (1 failed, 58 passed) and passes on 150531d (59/59). pnpm test:extension tlon 37 files 327 passed, send.test.ts 5/5, both tsgo targets exit 0, oxlint and oxfmt clean.
  • The PR body's evidence section has the before and after converter trace for the nested case.
  • Not handled: groups nested three deep still end the URL early.

🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Oct 6, 2026
@jayzhou2309

Copy link
Copy Markdown
Contributor Author

Fixed in 0346f78.

  • extensions/tlon/src/urbit/story.ts:45: replaced the two-level URL_PAREN_GROUP regex with matchBareUrl. It takes the greedy URL run that main uses, then trims trailing .,;:!?( and drops a trailing ) only while the URL has more ) than (. Nesting depth no longer matters. The rule table now accepts a match function as well as a regex (story.ts:58, story.ts:126).
  • New test keeps balanced parentheses nested at any depth inside a bare URL (story.test.ts:146) checks https://example.com/a(b(c(d)e)f) at the start of the text, mid-text, and inside (...)!. Before the fix it failed with href https://example.com/a(b(c(d)e)f and a leftover ). After the fix it passes.
  • New guard test trims an unbalanced closing paren after a bare URL (story.test.ts:154) checks that (see https://example.com/a) still drops the trailing ) from the link. It passed both before and after the fix.
  • A converter trace keeps the full URL in x https://example.com/a(b(c(d(e)f)g)h) y (four levels). The trace also kept the existing cases unchanged: a:( sad and ?q=a)b..
  • story.test.ts: 61/61 tests pass in 0.56s. All of extensions/tlon: 39 files, 373 tests pass in 25s across 2 shards. tsc -p extensions/tlon/tsconfig.json --noEmit, type-aware oxlint, and oxfmt --check report no issues on the touched files.
  • Not verified: the full repo test and lint runs, and sending a real message through a Tlon ship.

🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 7, 2026
@obviyus
obviyus merged commit bcc3b58 into openclaw:main Oct 8, 2026
120 checks passed
@obviyus

obviyus commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Landed in bcc3b58. Thanks @jayzhou2309! Verified through the real Tlon send path against a mock ship: all 10 URL/image cases now produce native link and image blocks, and plain-text controls are unchanged.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…claw#164828)

Convert bare URLs and images that follow text in outbound Tlon messages into native link and image blocks in the Urbit story, in DMs and groups, including after headings, quotes and bold text. Plain text and other formatting are unchanged.

Fixes openclaw#164784.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: tlon Channel integration: tlon P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tlon: bare URLs and Markdown images lose rich formatting after text

2 participants