Skip to content

fix(feishu): preserve unavailable controls in message cards - #130641

Merged
steipete merged 1 commit into
mainfrom
codex/qa-feishu-button-fallback-20260827
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-feishu-button-fallback-20260827

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #130640

What Problem This Solves

Fixes an issue where Feishu recipients lose unsupported button labels when the message also contains text or another native control, and where buttons marked disabled remain interactive.

Why This Change Was Made

The Feishu renderer now handles each control through its existing native encoding or literal label fallback. The same Feishu-owned fallback projection preserves rejected-target filtering and literal labels when card limits require text delivery, while document comments retain their plain-text encoding. The obsolete all-or-nothing fallback and an unreachable legacy card branch are removed.

The connected TTS boundary materializes presentation fallback before audio delivery and records whether the presentation itself adds visible content. This preserves controls without replaying already-delivered prose for empty structural presentations. The existing reply-anchor, audio, and delivery-callback flow stays intact. No public SDK, configuration, protocol, persistence, or typing/comment-lifecycle changes.

Current filtering/encoding lines trace to #86588, the native presentation-button repair merged on May 25, 2026 as 170e0aa. That PR and squash commit were authored/merged by clawsweeper[bot], with source contribution credited to @NianJiuZst and automerge requested by @Takhoffman. The predecessor renderer already used the filtering pattern; this is not a claim that #86588 introduced a newly observed release regression. No last-known-good release is claimed.

User Impact

Unavailable controls remain visible as labels; disabled controls stay non-interactive. Safe navigation and explicit commands remain usable, while opaque callback values and rejected targets stay out of fallback text. Oversized cards preserve their readable content, including when accompanied by speech audio.

Evidence

AI-assisted repair with independent source verification and clean authenticated Codex review. Production: +113/-114 (net -1); tests: +284/-31; docs: +1/-1.

Verified commit: bd70d3a5644e8f135c91921d143979f52ffad23a; the ordinary commit hook preserved the exact reviewed patch.

  • Authentic pre-edit native action reproduction: six failures across eight cases. Actual built Gateway → real Feishu plugin → real Lark SDK → mock external HTTP independently reproduced eight incorrect cards over successful receipts.
  • Final owner/sibling tests: 517 passed across seven files, including native send/thread-reply, card and byte limits, comments, generic presentation adaptation, and portable fallback.
  • TTS integration matrix: 12 passing cases across direct/core-rendered delivery, visible-prose states, and nonempty/empty/empty-with-prose presentations. Both newly found empty-with-prose cases failed before the final repair. Assertions cover one audio send, text counts, delivery callbacks, ordering, and first-reply ownership.
  • Rebuilt final-source runtime: passed in 42.4 seconds. Actual final Gateway/SDK wire checks: 18/18 passed, covering both send routes, mixed controls, disabled labels, rejected targets, literal Markdown labels, 200/201-element limits, and 31KiB overflow with complete content across chunks. All owned Gateway, webhook, and provider-loopback processes and ports were cleaned up.
  • Final changed-file gate passed: formatting, production/test typechecks, lint, doctor contracts, dead exports, plugin boundaries, storage/media/sidecar guards, and zero runtime import cycles. The first run found one immutable-projection lint issue; the corrected full gate passed without disabling checks.
  • Independent execution: all 517 tests passed in 22.42 seconds, with exact pre/post patch identity and a clean diff check. Final working-patch SHA256: ff58f4a23408cae24a639dce0d20bea996a83af054e35a54f6a6caa8977bed0b.
  • Source-blind wire validation: all eight contract clauses passed over 20 fresh successful action receipts and 55 new message requests. All 440 authored rows in each large-message case survived exactly once and in order across 12 send chunks and 25 reply chunks. Title-only, supported-button, select, and runtime-reuse siblings also passed. This ran on the behavior-identical pre-lint build; root and independent source verification confirmed the only subsequent change explicitly copies the closed button block's type field instead of spreading that block. Final-source native Gateway verification is recorded separately.
{
  "surface": "actual built Gateway message.action and real Feishu SDK",
  "externalService": "local mock Feishu HTTP",
  "verdict": "pass",
  "cases": 18,
  "successfulActionReceipts": 18,
  "messageRequests": 34,
  "routes": ["send", "thread-reply"]
}

This is not live Feishu SaaS/UI or clicked-action proof. TTS is native outbound integration proof, not part of the Gateway wire fixture. Earlier fixture activation and chunk-boundary assertion corrections were harness fixes, not product bugs.

Named follow-ups, not fixed or counted here: generic core adaptation may flatten controls before the Feishu owner sees them; literal-label behavior in select fallback remains a separate unverified hypothesis.

@clawsweeper

clawsweeper Bot commented Aug 27, 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: feishu Channel integration: feishu size: L maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 03:14
@steipete
steipete merged commit 7c6a798 into main Aug 27, 2026
198 checks passed
@steipete
steipete deleted the codex/qa-feishu-button-fallback-20260827 branch August 27, 2026 03:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu docs Improvements or additions to documentation maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Feishu cards drop unavailable labels and activate disabled buttons

1 participant