feat(platform): thread status indicators and markdown approval cards#831
Conversation
…n approval cards Show generating/awaiting-input icons in chat sidebar threads and render approval card text fields (question, context, impact, description) as markdown instead of plain text. Update human input tool to use standard markdown syntax instead of Unicode bullets.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughThis PR extends the chat feature to track and display thread generation status across multiple components. It adds an optional Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@services/platform/app/features/chat/components/human-input-request-card.tsx`:
- Around line 441-449: stripLeadingPunctuation is removing leading markdown
characters from metadata.question before rendering with ReactMarkdown, which
breaks list and rule syntax; instead preserve markdown by passing the raw
metadata.question to ReactMarkdown (remove the call to stripLeadingPunctuation)
or apply any punctuation stripping only to a non-markdown plain-text fallback;
update the JSX around ReactMarkdown (where metadata.question is used) to render
the original question so markdown lists and rules render correctly while leaving
any plain-text displays unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5c68add7-dc1f-4ac4-a974-b15abcb0145f
📒 Files selected for processing (9)
services/platform/app/features/chat/components/chat-history-sidebar.tsxservices/platform/app/features/chat/components/human-input-request-card.tsxservices/platform/app/features/chat/components/integration-approval-card.tsxservices/platform/app/features/chat/components/workflow-creation-approval-card.tsxservices/platform/app/features/chat/hooks/queries.tsservices/platform/convex/agent_tools/human_input/request_human_input_tool.tsservices/platform/convex/threads/list_threads.tsservices/platform/convex/threads/types.tsservices/platform/messages/en.json
| <div | ||
| className={cn( | ||
| markdownWrapperStyles, | ||
| 'max-w-none text-sm leading-relaxed', | ||
| )} | ||
| > | ||
| <ReactMarkdown remarkPlugins={[remarkGfm]}> | ||
| {stripLeadingPunctuation(metadata.question)} | ||
| </ReactMarkdown> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Inspect regex definition and usage:"
rg -n -C3 "LEADING_PUNCTUATION_RE|stripLeadingPunctuation" \
services/platform/lib/utils/text.ts \
services/platform/app/features/chat/components/human-input-request-card.tsxRepository: tale-project/tale
Length of output: 2116
stripLeadingPunctuation breaks Markdown list and rule syntax.
Line 448 strips leading hyphens and dashes from the question text before rendering. This removes markdown syntax for unordered lists (e.g., "- item" becomes "item") and horizontal rules (e.g., "---" becomes an empty string), breaking the newly introduced markdown formatting feature.
Proposed fix
- <ReactMarkdown remarkPlugins={[remarkGfm]}>
- {stripLeadingPunctuation(metadata.question)}
- </ReactMarkdown>
+ <ReactMarkdown remarkPlugins={[remarkGfm]}>
+ {metadata.question}
+ </ReactMarkdown>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div | |
| className={cn( | |
| markdownWrapperStyles, | |
| 'max-w-none text-sm leading-relaxed', | |
| )} | |
| > | |
| <ReactMarkdown remarkPlugins={[remarkGfm]}> | |
| {stripLeadingPunctuation(metadata.question)} | |
| </ReactMarkdown> | |
| <div | |
| className={cn( | |
| markdownWrapperStyles, | |
| 'max-w-none text-sm leading-relaxed', | |
| )} | |
| > | |
| <ReactMarkdown remarkPlugins={[remarkGfm]}> | |
| {metadata.question} | |
| </ReactMarkdown> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@services/platform/app/features/chat/components/human-input-request-card.tsx`
around lines 441 - 449, stripLeadingPunctuation is removing leading markdown
characters from metadata.question before rendering with ReactMarkdown, which
breaks list and rule syntax; instead preserve markdown by passing the raw
metadata.question to ReactMarkdown (remove the call to stripLeadingPunctuation)
or apply any punctuation stripping only to a non-markdown plain-text fallback;
update the JSX around ReactMarkdown (where metadata.question is used) to render
the original question so markdown lists and rules render correctly while leaving
any plain-text displays unchanged.
Summary
-lists,**bold**) instead of Unicode bulletsTest plan
Summary by CodeRabbit
New Features
Localization