Repository navigation
fix(feishu): preserve commands in select fallback cards - #130515
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 8:14 PM ET / August 27, 2026, 00:14 UTC. ClawSweeper reviewWhat this changesThe PR routes Feishu select-card fallback text through the shared presentation formatter so typed commands remain copyable while callback and legacy values stay hidden. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this maintainer-controlled PR correctly repairs the current-main Feishu card fallback and has no actionable review finding; exact-head checks are still running. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway message actions enter the Feishu plugin as portable presentation blocks, which the plugin turns into interactive cards for send and thread-reply. Select blocks cannot become native controls here, so their safe text fallback is delivered inside the card. flowchart LR
A[Gateway message action] --> B[Feishu plugin action]
B --> C[Presentation card renderer]
C --> D[Select fallback]
D --> E[Shared safe formatter]
E --> F[Escaped Feishu card]
F --> G[Recipient]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +9, Docs 0. Total +8 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the net-negative Feishu renderer repair after exact-head checks complete, keeping the shared formatter as the sole policy for command visibility and opaque-value redaction. Do we have a high-confidence way to reproduce the issue? Yes—current source exposes the label-only branch, and the focused test reaches it through both native send and thread-reply actions; this read-only review did not execute the test. Is this the best way to solve the issue? Yes—the shared formatter already owns the typed-command versus opaque-value policy, so reusing it at the Feishu card owner removes the divergent local implementation without widening any API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f2e99832b42. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for head The native select renderer now reuses the canonical command-visible/opaque-hidden fallback formatter and keeps Feishu escaping. Production delta is −1 line; tests are +9; the documentation contradiction is corrected. Current main still contains the old label-only select branch; recent sticker and text-continuation changes do not alter this repair. Exact-head CI run 33025767842 completed successfully. The latest ClawSweeper review reports no actionable finding; its sole before-merge step was waiting for these checks, now complete. Fresh independent Codex review is clean. Native review artifacts and Observed proof: two native send/thread-reply regressions failed before source edits, then 389 owner/sibling tests and the full changed-file gate passed. The actual authenticated built Gateway and real Lark SDK emitted correct cards to loopback HTTP; independent source-blind verification passed five clauses with seven fresh cards and seven unique receipts. No live Feishu SaaS/UI or command/callback execution is claimed. Local commands: OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs extensions/feishu/src/channel.test.ts -t 'preserves select commands'
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs extensions/feishu/src/channel.test.ts extensions/feishu/src/presentation-card.test.ts extensions/feishu/src/outbound.test.ts src/interactive/payload.test.ts
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/check-changed.mjs -- extensions/feishu/src/presentation-card.ts extensions/feishu/src/channel.test.ts docs/plugins/message-presentation.md
git diff --checkDisabled native buttons and mixed callback-only button rows remain separate source-only follow-up hypotheses, not fixes claimed by this PR. |
|
Merged via squash.
|
Closes #130514
What Problem This Solves
Fixes an issue where users receiving Feishu select fallback cards would see option labels without the copyable command when a presentation was sent through native send or thread-reply actions.
Why This Change Was Made
Feishu kept its own label-only select fallback after the shared presentation formatter learned to preserve explicitly typed commands. Reuse that existing block formatter at the native card owner, retaining Feishu's Markdown escaping. This deletes duplicate rendering logic and corrects the stale select-fallback documentation.
Production LOC: +3/−4 (net −1). Tests: +40/−31 (net +9). Docs: +2/−2. No new configuration, protocol, SDK surface, dependency, persistence, or native select capability.
User Impact
Select fallback cards now retain the command beside its label so recipients can copy it. Callback data and legacy values remain hidden, including opaque values beginning with
/. Heading and label escaping remains intact. This is a current-main behavior repair, not a claim of a stable-release regression.Evidence
AI-assisted; fresh Codex P0–P2 review completed with no actionable findings. Independent source review confirmed the Gateway dispatch reaches the native Feishu action without generic fallback adaptation.
/statuswas missing from the card.message.action, real Feishu plugin and Lark SDK 1.73.0, with provider HTTP redirected to a local loopback service. Initial send and thread-reply both emitted the expected interactive card.{"verdict":"pass","transport":"authenticated built Gateway + real Feishu SDK + mock provider HTTP","sourceBlind":true,"passedClauses":5,"failedClauses":0,"freshCards":7,"uniqueReceipts":7,"sends":4,"threadReplies":3}Commands:
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs extensions/feishu/src/channel.test.ts -t 'preserves select commands' OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs extensions/feishu/src/channel.test.ts extensions/feishu/src/presentation-card.test.ts extensions/feishu/src/outbound.test.ts src/interactive/payload.test.ts OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/check-changed.mjs -- extensions/feishu/src/presentation-card.ts extensions/feishu/src/channel.test.ts docs/plugins/message-presentation.md git diff --checkProof limits: no live Feishu UI/SaaS delivery, command execution, or callback execution is claimed. An initial harness activation failure was corrected only in the fixture: channel-skipping flags intentionally remove channel configuration, so the proof instead started the real Feishu webhook listener on an isolated port with synthetic credentials. No product workaround was added.
Separate source-only follow-up hypotheses were recorded for disabled native buttons and mixed callback-only button rows; neither is established or fixed by this select repair. Existing table, card envelope, outbound, and document-comment behavior remains covered by the passing sibling suites.