Skip to content

Fix wide response tables and Feishu cards#140

Merged
realDuang merged 1 commit intomainfrom
fix/response-table-overflow-feishu-card
Apr 29, 2026
Merged

Fix wide response tables and Feishu cards#140
realDuang merged 1 commit intomainfrom
fix/response-table-overflow-feishu-card

Conversation

@realDuang
Copy link
Copy Markdown
Owner

Summary

  • Constrain assistant response cards and markdown containers so wide tables stay inside the chat column.
  • Allow long table cell content to wrap while preserving table-level horizontal scrolling.
  • Enable wide-screen Feishu markdown cards and ignore local .claude/ artifacts.

Test plan

  • bun run test:unit tests/unit/electron/channels/feishu/feishu-transport.test.ts
  • Manually verified a wide markdown table with long URLs and long unbroken tokens stays within the response bubble.
  • bun run typecheck currently fails on existing electron/main/engines/opencode/converters.ts type errors unrelated to this change.

🤖 Generated with Claude Code

Keep markdown tables constrained within assistant response cards and enable wide-screen Feishu markdown cards while ignoring local Claude artifacts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 29, 2026 14:12
@github-actions
Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 75.17% (🎯 50%) 10743 / 14290
🔵 Statements 73.78% (🎯 50%) 11431 / 15493
🔵 Functions 71.09% (🎯 50%) 1798 / 2529
🔵 Branches 68.29% (🎯 50%) 6669 / 9765
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
electron/main/channels/feishu/feishu-transport.ts 100% 90.9% 100% 100%
Generated in workflow #441 for commit d98d518 by the Vitest Coverage Report Action

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens UI layout constraints so assistant markdown (especially wide tables) stays contained within the chat column, and updates Feishu interactive cards to render in wide-screen mode.

Changes:

  • Constrain response containers and markdown blocks to prevent wide content from expanding past the chat column.
  • Improve table rendering so long/unbroken cell content can wrap while keeping table-level horizontal scrolling.
  • Enable wide_screen_mode on Feishu interactive markdown cards and update unit tests accordingly; ignore local .claude/ artifacts via .gitignore.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/SessionTurn.module.css Adds width constraints/overflow handling for response containers to keep content within the bubble/column.
src/components/share/content-markdown.module.css Adjusts markdown/table CSS to avoid overflow and improve wrapping/scroll behavior for wide tables.
electron/main/channels/feishu/feishu-transport.ts Adds config.wide_screen_mode: true when sending markdown via Feishu interactive cards.
tests/unit/electron/channels/feishu/feishu-transport.test.ts Updates expectations to include the new Feishu card config.
.gitignore Ignores .claude/ directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +37 to 41
/** Send markdown wrapped in a Feishu Interactive Card with mobile-friendly configuration. */
async sendMarkdown(chatId: string, markdown: string): Promise<string> {
const card = JSON.stringify({
config: { wide_screen_mode: true },
elements: [{ tag: "markdown", content: markdown }],
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment says this card has “mobile-friendly configuration”, but the only config being set is wide_screen_mode: true, which is a wide-screen layout setting. Please update the comment to accurately describe what configuration is applied (or rename it if additional mobile-related config is intended).

Copilot uses AI. Check for mistakes.
@realDuang realDuang merged commit e68457e into main Apr 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants