Skip to content

fix(line): keep the words and options a quick-reply prompt leaves behind - #134976

Merged
steipete merged 2 commits into
openclaw:mainfrom
edenfunf:fix/line-select-prompt-words
Sep 1, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
edenfunf:fix/line-select-prompt-words

Conversation

@edenfunf

@edenfunf edenfunf commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #134975

What Problem This Solves

Fixes an issue where LINE users receive choice buttons without the question, title, or some of the offered choices. Select-only presentations discarded their surrounding text, and multiple selects could exceed LINE's shared 13-button row. The API accepted the shortened message, so delivery looked successful even when content was missing.

Why This Change Was Made

The LINE renderer now puts content that has no native home through the existing shared fallback renderer. Each select keeps its prompt beside its overflow choices; content already carried by a Flex card is not repeated. One loop owns the native button budget and the remaining text.

The maintainer improvement also preserves full prompts and overflow labels until native encoding, where LINE's 20-character quick-reply label limit belongs. Missing, empty, or whitespace-only authored fallback text no longer erases the generated question. Redundant flattened-option arrays, parallel button-action arrays, and drawn-option bookkeeping were removed. No configuration, schema, dependency, or authorization policy changes.

User Impact

Users can read the question and every choice on both replies and explicit sends. Native controls keep their original action values; choices beyond the native row remain visible as text. The LINE documentation describes this behavior. Thanks @edenfunf; original contributor credit is preserved as xuyuanhao.

Evidence

Independently verified from code and isolated execution. The affected pre-PR owner is byte-identical on captured main 0ac185506ca7f4d2049e58d340279de808526850 and stable v2026.8.2 (0965053fe6b9341776df147a6934b7485c60b5ca). Four added regressions first failed on the contributor implementation: absent/empty/blank fallback text and early truncation of prompts/overflow labels.

  • 72 focused LINE tests pass, including real HTTP reply/push × card/no-card cases with three sets of eight choices, long labels, and more than five output messages.
  • Full pnpm check:changed passes, including plugin and test typechecks, lint, format, boundary/dead-export checks, database/media guards, and runtime-cycle checks.
  • The private QA runtime build passes. The real Gateway loads the LINE plugin and a registered fixture command, accepts signed webhooks, and executes message.action RPC sends through the native transport code. Both builds use the same synthetic HTTPS LINE endpoint; only the renderer changes for the controlled before/after comparison.
Gateway flow Pre-PR owner Improved owner
single / signed-webhook Lost prompts, title Pass (1 request)
single / message-action-rpc Lost prompts, title Pass (1 request)
multiple / signed-webhook Lost prompts, overflow, title Pass (1 request)
multiple / message-action-rpc Lost prompts, overflow, title Pass (1 request)
mixed / signed-webhook Lost prompts, overflow Pass (2 requests)
mixed / message-action-rpc Lost prompts, overflow Pass (8 requests)
emptyFallback / signed-webhook Lost prompts, title Pass (1 request)

Every pre-PR request was accepted despite the missing content. The improved mixed-card case spans two requests on the reply path and eight on the push path; all action values survive and quick replies appear only on the final message. Invalid webhook signatures return 401.

The tested improved renderer SHA-256 is f217e47ce472cc75daee77273bfe786d56a1e698bcf1b06ce808730f3b1b8a7c, identical to maintainer commit 4dd01333e0bf9e226ab343f3b2d4875252f2e881. The controlled worker checkout remains at contributor head d7c76e4d38c57fb970b2a100af871526b0ec65e6; source hashes bind each rebuilt variant, rather than claiming an uncommitted variant was that Git commit.

Proof run: before/after Gateway replay. Verdict SHA-256: before bed8c58c103996be4db77459b6400209b767d5158744d59bc486088e6797f15e; improved 7965614f06ac25de26199960b1317fa2861175818386edb818cf52af734bed89.

This is real Gateway and transport execution against a synthetic LINE API, not authenticated LINE service or native iOS/Android UI proof. No native-client screenshots were available. The registered command supplies the exact payload; model generation quality is outside this test.

Direct contract checks: installed @line/bot-sdk 11.2.0 and LINE's quick-reply reference and label specifications.

Independent Codex review of the complete contributor-plus-maintainer diff is clean at P0–P2. Production delta is +70/-41 (net +29), reduced by 13 lines from the contributor implementation; the remaining growth preserves formerly discarded semantic content at its owning renderer. Test delta is +393/-5 (includes formatting), docs +9/-0.

The fresh ClawSweeper review completed on maintainer head 4dd01333e0bf9e226ab343f3b2d4875252f2e881 at 22:25 UTC with no actionable correctness finding or Rank-up moves. Its remaining production-growth concern is addressed by the single renderer owner and rationale above. Exact-head CI passed; landing uses the native prepare/merge gates.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: line Channel integration: line size: S labels Sep 1, 2026
@edenfunf
edenfunf marked this pull request as ready for review September 1, 2026 07:40
@edenfunf
edenfunf force-pushed the fix/line-select-prompt-words branch from 2b33b42 to 062122e Compare September 1, 2026 08:09
@edenfunf edenfunf changed the title fix(line): keep the question a quick-reply prompt is asking fix(line): keep the words and options a quick-reply prompt leaves behind Sep 1, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 6:25 PM ET / 22:25 UTC.

ClawSweeper review

What this changes

The PR preserves select-only LINE prompts, fallback content, and choices beyond LINE’s shared 13-item quick-reply budget, with delivery-path regression coverage and documentation.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open: it is the active candidate fix for the linked, still-open LINE content-loss issue, and the exact head has not merged. The renderer now uses the shared fallback path to preserve text and global quick-reply overflow across both LINE delivery paths; no blocking correctness finding was found.

Priority: P1
Reviewed head: 4dd01333e0bf9e226ab343f3b2d4875252f2e881

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with substantial delivery-path coverage and supplied real-flow evidence, pending ordinary exact-head CI completion.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The captured PR body links an exact-head before/after Gateway replay through the LINE renderer and native request transport, with observed recovery of prompts and overflow; the added loopback test independently exercises the same reply and push owners through encoded HTTP requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured PR body links an exact-head before/after Gateway replay through the LINE renderer and native request transport, with observed recovery of prompts and overflow; the added loopback test independently exercises the same reply and push owners through encoded HTTP requests.
Evidence reviewed 7 items Renderer owner and invariant: The changed renderer gives native quick replies a shared 13-item budget and sends each select’s non-native prompt or overflow through the shared fallback text renderer; Flex-card text remains card-owned.
Shared fallback contract: The shared fallback renderer preserves supplied text, presentation titles, text/context blocks, tables, and remaining select options, so it is the appropriate canonical carrier for content LINE cannot render natively.
Both delivery callers: The outbound adapter invokes the renderer before direct sends, while the auto-reply path emits prepared text and attaches quick replies to the final visible message; the fix stays at their shared renderer boundary.
Findings None None.
Security None None.

How this fits together

The LINE plugin converts shared agent message presentations into LINE text, Flex cards, and quick replies. The renderer feeds both inbound auto-replies and the core outbound adapter before requests reach LINE’s reply or push APIs.

flowchart LR
  A[Agent presentation] --> B[Channel adaptation]
  B --> C[LINE presentation renderer]
  C --> D[Text, Flex card, quick replies]
  D --> E[Auto-reply delivery]
  D --> F[Outbound adapter]
  E --> G[LINE reply or push API]
  F --> G
Loading

Before merge

  • Resolve merge risk (P2) - Production code is net +29 lines in the renderer. The added per-select accounting is justified by preserving content at the single shared owner boundary; avoid introducing another delivery-specific fallback path when evolving it.
  • Complete next step (P2) - No repair dispatch is needed; retain this active fix while exact-head checks complete and the linked issue remains open until merge.
Agent review details

Security

None.

PR surface

Source +29, Tests +388, Docs +9. Total +426 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 70 41 +29
Tests 2 393 5 +388
Docs 1 9 0 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 472 46 +426

Review metrics

Metric Value Why it matters
Production versus test delta production +29 net; tests +388 net; docs +9 net The production growth is confined to the shared LINE renderer and replaces flattened parallel accounting with one budgeted pass; tests cover both reply and direct-send boundaries.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #134975
Summary: This PR is the active candidate fix for the linked LINE select-only presentation content-loss report.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the renderer-local, one-pass fallback accounting once exact-head checks are green, leaving the linked issue to close through its normal merged-fix relationship.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the renderer-local, one-pass fallback accounting once exact-head checks are green, leaving the linked issue to close through its normal merged-fix relationship.

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

Yes. The linked report supplies a concrete select-only payload, and current source traces it through the renderer and both delivery callers; this read-only review did not rerun the scenario.

Is this the best way to solve the issue?

Yes. Reusing the existing shared presentation fallback renderer at the LINE renderer boundary preserves content for both delivery callers without adding a parallel delivery flow.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a9469a2119a6.

Labels

Label justifications:

  • P1: This fixes silent loss of visible prompts and options on established LINE reply and outbound delivery paths.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The captured PR body links an exact-head before/after Gateway replay through the LINE renderer and native request transport, with observed recovery of prompts and overflow; the added loopback test independently exercises the same reply and push owners through encoded HTTP requests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured PR body links an exact-head before/after Gateway replay through the LINE renderer and native request transport, with observed recovery of prompts and overflow; the added loopback test independently exercises the same reply and push owners through encoded HTTP requests.

Evidence

What I checked:

  • Renderer owner and invariant: The changed renderer gives native quick replies a shared 13-item budget and sends each select’s non-native prompt or overflow through the shared fallback text renderer; Flex-card text remains card-owned. (extensions/line/src/rich-messages.ts:160, 4dd01333e0bf)
  • Shared fallback contract: The shared fallback renderer preserves supplied text, presentation titles, text/context blocks, tables, and remaining select options, so it is the appropriate canonical carrier for content LINE cannot render natively. (src/interactive/payload.ts:1156, 4dd01333e0bf)
  • Both delivery callers: The outbound adapter invokes the renderer before direct sends, while the auto-reply path emits prepared text and attaches quick replies to the final visible message; the fix stays at their shared renderer boundary. (extensions/line/src/outbound.ts:37, 4dd01333e0bf)
  • Boundary-level regression coverage: The added loopback cases exercise reply and push delivery with and without a Flex card, assert all select prompts and overflow choices reach actual encoded HTTP request bodies, and retain quick replies only on the final message. (extensions/line/src/row-overflow-delivery.loopback.test.ts:251, 4dd01333e0bf)
  • Prior review blockers resolved: The diff from the earlier reviewed head adds explicit coverage for title-only and blank-fallback select prompts, matching the two prior P1 finding themes; the current head contains those fixes. (extensions/line/src/channel.rich-messages.test.ts:140, 4dd01333e0bf)
  • Feature history: History traces the current LINE presentation path through the earlier controls-delivery change and later LINE/channel refactors; the current follow-up commit is parented by the contributor head. (extensions/line/src/rich-messages.ts:156, 4dd01333e0bf)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • edenfunf: 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 (3 earlier review cycles)
  • reviewed 2026-09-01T08:41:06.694Z sha 062122e79cc07039db5be6ed8cdce84dd931456c :: needs changes before merge. :: [P1] Preserve a title in a title-only select prompt
  • reviewed 2026-09-01T09:35:35.242Z sha fc94db188f4b030c62f1e20168e6a4bd6ca0d87a :: needs changes before merge. :: [P1] Carry select placeholders into the fallback
  • reviewed 2026-09-01T10:27:54.114Z sha d7c76e4 :: needs maintainer review before merge. :: none

@edenfunf
edenfunf force-pushed the fix/line-select-prompt-words branch from 062122e to fc94db1 Compare September 1, 2026 09:03
@edenfunf
edenfunf force-pushed the fix/line-select-prompt-words branch from fc94db1 to d7c76e4 Compare September 1, 2026 09:55
@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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 1, 2026
@steipete steipete self-assigned this Sep 1, 2026
Keep authored prompts and globally overflowed choices in the shared fallback rendering. Bound labels at native encoding and retain generated text when caller fallback text is blank. Collapse the renderer to one budgeted pass.

Co-authored-by: xuyuanhao <[email protected]>
@steipete steipete closed this Sep 1, 2026
@steipete steipete reopened this Sep 1, 2026
@steipete
steipete merged commit d225e67 into openclaw:main Sep 1, 2026
215 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…ind (openclaw#134976)

* fix(line): keep the words and options a quick-reply prompt leaves behind

* fix(line): preserve select questions and overflow options

Keep authored prompts and globally overflowed choices in the shared fallback rendering. Bound labels at native encoding and retain generated text when caller fallback text is blank. Collapse the renderer to one budgeted pass.

Co-authored-by: xuyuanhao <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: xuyuanhao <[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 docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

LINE drops the question and the overflow options when a reply's only control is a select

2 participants