Skip to content

fix(line): table cells show email links twice as "addr (mailto:addr)" - #196636

Merged
obviyus merged 3 commits into
openclaw:mainfrom
Mahdi-Hasan:fix/line-table-mailto-link
Nov 10, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
Mahdi-Hasan:fix/line-table-mailto-link

Conversation

@Mahdi-Hasan

@Mahdi-Hasan Mahdi-Hasan commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: a LINE table cell with an email link like [[email protected]](mailto:[email protected]) shows the address twice, as [email protected] (mailto:[email protected]).

User Impact

User impact: email links in LINE table cards now read [email protected], the same as the same link outside a table. Two-column tables that contain only such links keep the receipt-card layout instead of falling back to the generic styled table.

Why This Change Was Made

The plain-text path already skips the (href) suffix when the label equals the href without mailto:. The table-cell path only compared the label to the raw href, so it appended the suffix and marked the cell as styled markup. Both paths now call one shared check, so they cannot drift apart again.

Evidence

Built Gateway proof (main vs this branch, two runs each, CLI and Gateway delivery, with controls): #196636 (comment)

Test in extensions/line/src/markdown-to-line.test.ts (folded into the existing empty-cells table test): a table with the mailto link must render the same card as the same table with plain text.

  • Without the fix: the test fails. A probe of processLineMessage shows the cell text [email protected] (mailto:[email protected]).
  • With the fix: the cell text is [email protected]. pnpm test extensions/line/src --maxWorkers=1 passes 59 files (523 tests, 1 skipped).
  • pnpm format:check and oxlint on the touched files: clean.

Real behavior proof

Delivery proof through the shipped openclaw message send --channel line path.

Setup:

  • Before: published [email protected] with @openclaw/line from npm.
  • After: this branch, built with pnpm build, run with node openclaw.mjs.
  • Both runs used isolated state and a fake token. HTTPS_PROXY pointed at a local mitmproxy. A script there answered api.line.me locally with 200 and logged the request body. Nothing reached the real LINE API.

Command (same for both):

openclaw message send --channel line --target U0123456789abcdef0123456789abcdef --message "| Name | Contact |
|---|---|
| Bob | [[email protected]](mailto:[email protected]) |"

Both printed ✅ Sent via LINE. Message ID: 1. Text nodes in the captured POST /v2/bot/message/push Flex body:

Build Flex text nodes
2026.11.2 "Name", "Contact", "Bob", "[email protected] (mailto:[email protected])"
this branch "Name / Contact", "Bob", "[email protected]"

The branch sends the address once. It also picks the receipt-card layout, the same one a plain [email protected] cell gets.

Plain-text projection already treated a mailto link labelled with its own
address as redundant, but table cells only compared the label to the raw
href, so they rendered "[email protected] (mailto:[email protected])" and lost
the receipt-card layout. Both paths now share one redundancy check.
@clawsweeper

clawsweeper Bot commented Nov 10, 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: line Channel integration: line size: XS labels Nov 10, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes LINE table cells omit redundant mailto destinations, matching existing plain-text rendering.

Example: A two-column Markdown table contains [email protected].

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A small, complete repair with shipped-entry-point payload evidence, a reported red/green regression, and no actionable findings; broad CI remains pending.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): At head 8619513, obviyus's built-Gateway proof exercises CLI and Gateway message-tool sends through the real LINE client to a local HTTPS recorder, showing the address once in receipt-card payloads while differing-label, HTTPS, plain-text, and ordinary-table controls remain unchanged; this proves payload rendering without claiming live LINE delivery.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: LINE table cards repeat an email address and unnecessarily switch to the generic styled layout.
Reason: The change restores the existing plain-text redundancy rule within table cells while preserving link destinations that add information.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a current LINE rendering bug with a focused shared comparison; no actionable defects were found, and exact-head CI is still running.

Priority: P2
Reviewed head: 861951387fd4cddafccedccb43f9781c76b1eb55

Before merge

None.

Findings

None.

Agent review details

How this fits together

The LINE plugin converts shared Markdown IR into text and Flex cards, which its outbound and automatic-reply delivery paths send through LINE's messaging client.

flowchart TD
  A[CLI or Gateway message] --> B[LINE outbound adapter]
  C[Automatic reply] --> D[LINE reply delivery]
  B --> E[Markdown IR and LINE renderer]
  D --> E
  E --> F[Text or Flex payload]
  F --> G[LINE messaging client]
Loading

Technical review

Best possible solution:

Use the shared comparison in the existing LINE renderer and retain the focused table regression.

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

Current-main source establishes the mismatch, and the supplied built-Gateway traces reproduce it on the unchanged base renderer; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch repairs the producer's comparison through one private helper, preserves differently labelled destinations, and adds no competing renderer or public contract.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Plain-text and table link projection keeps the original intent (282ddaf: Preserve authored link destinations and inline formatting using canonical Markdown IR.)
  • Empty-cell table regression keeps the original intent (eff3ce9: Exercise literal Markdown through processLineMessage without retaining a private raw-table test seam.)
  • Empty-fence regression assertions keeps the original intent (9e96e95: Prevent blank code-card fields from costing the entire reply.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 282ddaf adds extensions/line/src/markdown-to-line.ts:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 282ddaf96b22; files: extensions/line/src/markdown-to-line.ts)

PR surface

Source +3, Tests -1. Total +2 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 8 5 +3
Tests 1 6 7 -1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 14 12 +2

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: The bug duplicates email addresses and selects the wrong table layout, with limited impact on message readability.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-10T11:33:48.304Z sha c8dfd07 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-10T13:25:32.100Z sha c8dfd07 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-10T13:42:22.553Z sha c8dfd07 :: needs maintainer review before merge. :: none

Reviewed November 10, 2026, 10:23 AM ET / 15:23 UTC (Revision 4).

@Mahdi-Hasan

Copy link
Copy Markdown
Contributor Author

Real behavior proof. I ran the real LINE renderer (processLineMessage from extensions/line/src/markdown-to-line.ts) via node --import tsx on both refs.

Input:

| Name | Contact |
|---|---|
| Bob | [[email protected]](mailto:[email protected]) |

Text of the table row in the Flex card:

Ref Row text
origin/main Bob, [email protected] (mailto:[email protected])
this branch Bob, [email protected]

On main the card repeats the address with a mailto: suffix. On the branch the cell matches a plain [email protected] cell.

Caveat: this runs the renderer, not a send to the LINE API.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 10, 2026
@Mahdi-Hasan

Copy link
Copy Markdown
Contributor Author

Delivery proof through the shipped openclaw message send --channel line path.

Setup:

  • Before: published [email protected] with @openclaw/line from npm.
  • After: this branch, built with pnpm build, run with node openclaw.mjs.
  • Both runs used isolated state and a fake token. HTTPS_PROXY pointed at a local mitmproxy. A script there answered api.line.me locally with 200 and logged the request body. Nothing reached the real LINE API.

Command (same for both):

openclaw message send --channel line --target U0123456789abcdef0123456789abcdef --message "| Name | Contact |
|---|---|
| Bob | [[email protected]](mailto:[email protected]) |"

Both printed ✅ Sent via LINE. Message ID: 1. Text nodes in the captured POST /v2/bot/message/push Flex body:

Build Flex text nodes
2026.11.2 "Name", "Contact", "Bob", "[email protected] (mailto:[email protected])"
this branch "Name / Contact", "Bob", "[email protected]"

The branch sends the address once. It also picks the receipt-card layout, the same one a plain [email protected] cell gets.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Proof on a built Gateway (node 24.22.1, secretless Docker). The LINE channel talks to a local HTTPS stand-in for api.line.me that records every POST /v2/bot/message/push. Each case went out twice per run: once with openclaw message send --channel line, once through the Gateway's message tool (/tools/invoke). Two runs per tree.

  • main aa508b0624
  • candidate 861951387f (this branch, main merged in; it differs from main only in markdown-to-line.ts and its test)

Bug case: | Support | [[email protected]](mailto:[email protected]) | plus | Docs | [https://example.com/docs](https://example.com/docs) |

main  run 1+2, cli+gateway  flex:generic-table  ["Item","Contact","Support","[email protected] (mailto:[email protected])","Docs","https://example.com/docs"]
cand  run 1+2, cli+gateway  flex:receipt-card   ["Item / Contact","Support","[email protected]","Docs","https://example.com/docs"]

Controls (same output on main and the candidate, both runs, both paths):

table, labels differ from href   flex:generic-table  ["Item","Contact","Support","Bob (mailto:[email protected])","Docs","docs (https://example.com/docs)"]
email link outside a table       text                "Write to [email protected] today."
table, https link = its label    flex:receipt-card   ["Item / Link","Docs","https://example.com/docs"]
table without links              flex:receipt-card   ["Item / Price","Coffee","$3.50","Bagel","$2.00"]

Focused checks on the candidate: markdown-to-line.test.ts passes 9/9, and oxfmt and oxlint are clean. With main's markdown-to-line.ts swapped back in, the mailto test fails because the card turns into the generic table.

On top of the contributor's commit: merged main, cut the mailto check down to `mailto:${label}` !== href, and folded the new test into the existing empty-cells table test. Production is +8/-5 and tests are +6/-7 against main.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

/refresh-security-review 8619513

@obviyus
obviyus merged commit b21829a into openclaw:main Nov 10, 2026
106 of 108 checks passed
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Landed in b21829a. Thanks @Mahdi-Hasan. LINE tables no longer repeat email addresses.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…openclaw#196636)

fix(line): table cells show email links twice as "addr (mailto:addr)"

In a LINE table cell, [[email protected]](mailto:[email protected]) showed as "[email protected] (mailto:[email protected])", and two-column receipt tables lost their card layout. The table-cell check compared the label only to the raw link, while the plain-text path already ignored the mailto: prefix. Both now use one shared check, so an email link whose label matches its address shows the address once and the receipt card layout is kept.

Evidence: a built Gateway on node:24.22.1 in secretless Docker with a local HTTPS stand-in for api.line.me recording every push, each case sent through openclaw message send --channel line and through the Gateway's message tool, two runs each. On main the cell read "[email protected] (mailto:[email protected])" in the generic table layout; with this change it reads "[email protected]" in the receipt card. A table with different labels, the same email link outside a table, an https link equal to its label and a table without links are the same on both. Details: openclaw#196636 (comment).

Thanks @Mahdi-Hasan.

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: line Channel integration: line P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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.

2 participants