Skip to content

🐛 fix(chat): refine workflow collapse headline#13717

Merged
Innei merged 10 commits into
canaryfrom
fix/workflow-collapse-headline
Apr 10, 2026
Merged

🐛 fix(chat): refine workflow collapse headline#13717
Innei merged 10 commits into
canaryfrom
fix/workflow-collapse-headline

Conversation

@Innei

@Innei Innei commented Apr 10, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

N/A

🔀 Description of Change

  • move the workflow collapse arrow next to the headline text and align it with the Accordion solid indicator style
  • extract the workflow streaming headline from the last Markdown heading in trailing reasoning content
  • show Working... while the workflow panel is expanded instead of the extracted headline

🧪 How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

Test command:

bunx vitest run --silent='passed-only' 'src/features/Conversation/Messages/AssistantGroup/toolDisplayNames.test.ts'

📸 Screenshots / Videos

Before After
N/A N/A

📝 Additional Information

N/A

Copilot AI review requested due to automatic review settings April 10, 2026 08:47
@vercel

vercel Bot commented Apr 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Apr 10, 2026 3:13pm

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refines the workflow collapse header in the AssistantGroup UI by improving the placement/styling of the collapse indicator and by deriving a better streaming headline from trailing reasoning markdown.

Changes:

  • Added markdown heading extraction from trailing reasoning content and surfaced it as a new workflow headline input.
  • Updated workflow headline selection logic to prefer the extracted reasoning title, and show Working... while expanded.
  • Adjusted WorkflowCollapse header layout to place a custom arrow indicator next to the headline and hide the default Accordion indicator.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/features/Conversation/Messages/AssistantGroup/toolDisplayNames.ts Adds helper(s) to extract a heading title from reasoning markdown and includes it in getWorkflowStreamingHeadlineParts.
src/features/Conversation/Messages/AssistantGroup/toolDisplayNames.test.ts Adds tests for trailing reasoning headline extraction and its use as a workflow headline fallback.
src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx Updates headline selection/debouncing behavior and replaces the Accordion indicator with a custom inline arrow next to the headline.

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

Comment on lines +238 to +246
const extractMarkdownHeadingTitle = (md: string): string => {
const withoutCode = md.replaceAll(/```[\s\S]*?```/g, ' ');
const lines = withoutCode.split('\n');
let lastTitle = '';

for (const line of lines) {
const match = line.match(
new RegExp(`^\\s{0,3}#{1,${WORKFLOW_MARKDOWN_HEADING_MAX_LEVEL}}\\s+(.+?)\\s*$`),
);
}, [allComplete, raw]);
}, [allComplete, immediate, raw]);

return !allComplete ? out : raw;

expect(extractTrailingReasoningHeadline(blocks)).toBe('Planning the file updates');
});

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b9d468675

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/Conversation/Messages/AssistantGroup/components/WorkflowCollapse.tsx Outdated
@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.39640% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.60%. Comparing base (b95720d) to head (b493869).
⚠️ Report is 7 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13717      +/-   ##
==========================================
+ Coverage   66.55%   66.60%   +0.05%     
==========================================
  Files        2023     2023              
  Lines      170857   170988     +131     
  Branches    20591    20639      +48     
==========================================
+ Hits       113708   113884     +176     
+ Misses      57025    56980      -45     
  Partials      124      124              
Flag Coverage Δ
app 58.64% <96.39%> (+0.08%) ⬆️
database 92.66% <ø> (ø)
packages/agent-runtime 79.72% <ø> (ø)
packages/context-engine 83.33% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.86% <ø> (ø)
packages/model-runtime 84.29% <ø> (ø)
packages/prompts 70.05% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.14% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 65.79% <ø> (ø)
Services 52.12% <ø> (ø)
Server 66.34% <ø> (-0.01%) ⬇️
Libs 52.82% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Innei Innei merged commit 48d0a75 into canary Apr 10, 2026
34 checks passed
@Innei Innei deleted the fix/workflow-collapse-headline branch April 10, 2026 16:49
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