Skip to content

feat(platform): thread status indicators and markdown approval cards#831

Merged
larryro merged 2 commits into
mainfrom
feat/thread-status-indicators-and-markdown-approvals
Mar 21, 2026
Merged

feat(platform): thread status indicators and markdown approval cards#831
larryro merged 2 commits into
mainfrom
feat/thread-status-indicators-and-markdown-approvals

Conversation

@larryro
Copy link
Copy Markdown
Collaborator

@larryro larryro commented Mar 21, 2026

Summary

  • Show real-time status icons in the chat history sidebar: spinning loader for generating/executing threads, warning dot for threads awaiting user input
  • Render markdown (via ReactMarkdown + remark-gfm) in approval card text fields — human input question/context, integration estimated impact, and workflow description
  • Update human input tool prompt to use standard markdown syntax (- lists, **bold**) instead of Unicode bullets

Test plan

  • Verify sidebar shows spinning icon when a thread is generating or has an executing approval
  • Verify sidebar shows warning dot icon when a thread has a pending approval awaiting input
  • Verify human input request card renders markdown formatting (lists, bold, headings) in question and context fields
  • Verify integration approval card renders markdown in estimated impact field
  • Verify workflow creation approval card renders markdown in description field
  • Verify threads with no active status show no icon (existing behavior preserved)

Summary by CodeRabbit

  • New Features

    • Added status indicators in chat history to show generating and pending approval states with visual icons.
    • Enabled Markdown formatting support for questions, context, and descriptions in approval cards and human input requests.
  • Localization

    • Added chat status messages for generating and awaiting input states.

…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.
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

This PR extends the chat feature to track and display thread generation status across multiple components. It adds an optional generationStatus field (generating or idle) to the Thread interface in both frontend and backend layers. The chat history sidebar now uses active approval data to render status indicators—a spinning loader icon for threads that are generating or executing approvals, and a dot icon for pending approvals. Additionally, three approval/request card components are updated to render metadata fields (question, context, estimated impact, workflow description) as Markdown rather than plain text. The backend human input request tool documentation is updated to emphasize Markdown formatting standards, and chat status translation keys are added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding thread status indicators to the chat sidebar and converting approval card text fields to use Markdown rendering.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/thread-status-indicators-and-markdown-approvals

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9e14c48 and 2c3a992.

📒 Files selected for processing (9)
  • services/platform/app/features/chat/components/chat-history-sidebar.tsx
  • services/platform/app/features/chat/components/human-input-request-card.tsx
  • services/platform/app/features/chat/components/integration-approval-card.tsx
  • services/platform/app/features/chat/components/workflow-creation-approval-card.tsx
  • services/platform/app/features/chat/hooks/queries.ts
  • services/platform/convex/agent_tools/human_input/request_human_input_tool.ts
  • services/platform/convex/threads/list_threads.ts
  • services/platform/convex/threads/types.ts
  • services/platform/messages/en.json

Comment on lines +441 to +449
<div
className={cn(
markdownWrapperStyles,
'max-w-none text-sm leading-relaxed',
)}
>
<ReactMarkdown remarkPlugins={[remarkGfm]}>
{stripLeadingPunctuation(metadata.question)}
</ReactMarkdown>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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.tsx

Repository: 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.

Suggested change
<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.

@larryro larryro merged commit 1ed3409 into main Mar 21, 2026
17 checks passed
@larryro larryro deleted the feat/thread-status-indicators-and-markdown-approvals branch March 21, 2026 18:44
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