Skip to content

fix(web): safe markdown truncation in TurnCard (#809)#814

Merged
manavgup merged 5 commits into
mainfrom
worktree-agent-a7732c50
May 25, 2026
Merged

fix(web): safe markdown truncation in TurnCard (#809)#814
manavgup merged 5 commits into
mainfrom
worktree-agent-a7732c50

Conversation

@manavgup
Copy link
Copy Markdown
Owner

Summary

  • Adds safeMarkdownCut helper that walks backward from a proposed cut position to avoid splitting inside unclosed markdown constructs (backticks, links, bold, italic)
  • Applies safe cutting to all three truncation paths (paragraph boundary, sentence boundary, hard cut)
  • Removes the TODO comment at line 255

Test plan

  • Verify TurnCard renders correctly with long markdown content containing links, bold, code spans
  • Verify truncation doesn't produce broken markdown syntax
  • Verify ellipsis still appears at truncation points

🤖 Generated with Claude Code

@github-actions github-actions Bot force-pushed the worktree-agent-a7732c50 branch 4 times, most recently from bb01e15 to e9a7d7d Compare May 25, 2026 15:23
@github-actions github-actions Bot force-pushed the worktree-agent-a7732c50 branch from e9a7d7d to 08a0510 Compare May 25, 2026 15:24
@manavgup manavgup merged commit 2c650e3 into main May 25, 2026
@github-actions github-actions Bot deleted the worktree-agent-a7732c50 branch May 25, 2026 15:24
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.

1 participant