🐛 fix(chat): refine workflow collapse headline#13717
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
| 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'); | ||
| }); | ||
|
|
There was a problem hiding this comment.
💡 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".
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
💻 Change Type
🔗 Related Issue
N/A
🔀 Description of Change
Working...while the workflow panel is expanded instead of the extracted headline🧪 How to Test
Test command:
📸 Screenshots / Videos
📝 Additional Information
N/A