Skip to content

feat(task-detail): replace inline comment input with ChatInput that triggers a new run#14873

Merged
arvinxx merged 8 commits into
canaryfrom
feat/task-chat-input
Jun 5, 2026
Merged

feat(task-detail): replace inline comment input with ChatInput that triggers a new run#14873
arvinxx merged 8 commits into
canaryfrom
feat/task-chat-input

Conversation

@arvinxx

@arvinxx arvinxx commented May 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the small "Leave feedback" comment box in TaskActivities (top of activities) and TopicChatDrawer (drawer footer) with a richer ChatInput shell (@lobehub/editor/react), implemented as a new TaskChatInput component.
  • Submit no longer posts a task comment (addComment) — it now dispatches a new task run with the typed message as the prompt (runTask(taskId, { prompt })), so the message immediately drives the next run instead of just being recorded as feedback.
  • Drop the obsolete CommentInput.tsx / FeedbackInput.tsx plus their shared commentInputCard style, and refresh the affected i18n keys (taskDetail.commentPlaceholder rephrased, taskDetail.commentSubmitAndRun replaced with taskDetail.sendMessage). pnpm i18n was not run — only en-US / zh-CN are updated; the other locales will resync on the next i18n pass.

Test plan

  • bunx vitest run src/features/AgentTasks/AgentTaskDetail/TopicChatDrawer/index.test.tsx
  • bunx vitest run src/features/AgentTasks/ (all green)
  • Manually: open a Task detail page → activities section now renders the new ChatInput, sending a message triggers a new run (no comment row appears).
  • Manually: open a Topic chat drawer for a terminated topic → footer input is the new ChatInput, submitting dispatches a new run and closes the drawer.

🤖 Generated with Claude Code

@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.

Sorry @arvinxx, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented May 16, 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 Jun 5, 2026 4:45pm

Request Review

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. feature:editor something links lobehub editor / rich content text / markdown render i18n labels May 16, 2026

@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: ba495a098b

ℹ️ 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/AgentTasks/AgentTaskDetail/TaskChatInput.tsx Outdated
@codecov

codecov Bot commented May 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.85%. Comparing base (65ba086) to head (cb81c60).
⚠️ Report is 3 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #14873      +/-   ##
==========================================
- Coverage   70.85%   70.85%   -0.01%     
==========================================
  Files        3256     3256              
  Lines      321442   321441       -1     
  Branches    29378    34092    +4714     
==========================================
- Hits       227754   227750       -4     
- Misses      93506    93509       +3     
  Partials      182      182              
Flag Coverage Δ
app 61.55% <86.66%> (-0.01%) ⬇️
database 92.54% <ø> (ø)
packages/agent-manager-runtime 49.69% <ø> (ø)
packages/agent-runtime 81.08% <ø> (ø)
packages/builtin-tool-lobe-agent 18.52% <ø> (ø)
packages/context-engine 84.19% <ø> (ø)
packages/conversation-flow 91.29% <ø> (ø)
packages/device-gateway-client 90.51% <ø> (ø)
packages/eval-dataset-parser 95.15% <ø> (ø)
packages/eval-rubric 76.11% <ø> (ø)
packages/fetch-sse 85.57% <ø> (ø)
packages/file-loaders 87.89% <ø> (ø)
packages/memory-user-memory 74.99% <ø> (ø)
packages/model-bank 99.99% <ø> (ø)
packages/model-runtime 84.22% <ø> (ø)
packages/prompts 72.51% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 35.38% <ø> (ø)
packages/utils 84.98% <ø> (ø)
packages/web-crawler 88.08% <ø> (ø)

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

Components Coverage Δ
Store 68.53% <71.42%> (+<0.01%) ⬆️
Services 54.77% <ø> (ø)
Server 71.85% <ø> (-0.01%) ⬇️
Libs 57.03% <ø> (ø)
Utils 81.71% <ø> (ø)
🚀 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.

CommentInput in TaskActivities stays as-is on canary — avatar + EditorCanvas
+ attachment + send button, posting a plain task-level comment.

TopicChatDrawer footer becomes a FeedbackInput that calls the in-scope
ConversationProvider's sendMessage, continuing the existing topic
conversation instead of attaching a comment + restarting the run.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@arvinxx arvinxx force-pushed the feat/task-chat-input branch from 1726088 to d48e234 Compare June 5, 2026 05:35
arvinxx and others added 2 commits June 5, 2026 13:38
Drop the canLeaveFeedback gate so the in-thread reply box renders even
when the topic is pending/running. ConversationStore.sendMessage already
queues messages during an in-flight stream, so this just exposes the
queue affordance to the user — letting them steer the next step
without waiting for the current run to terminate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…n + add attach action

FeedbackInput now starts collapsed as a full-width "Send follow up message"
button. Click expands a ChatInput shell with EditorCanvas inside and a footer
that carries an AttachmentUploadButton on the left (+ icon) and the send
button on the right. Files are inserted inline into the editor (same
pattern as CommentInput) so they ride along on sendMessage's editorData.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
arvinxx and others added 4 commits June 5, 2026 22:29
…tton to filled

- CommentInput card: padding-block 8px → 4px, editor placeholder fontSize 14px
- FeedbackInput collapsed button: default size + variant="filled" for a less
  obtrusive look that sits flush in the chat footer

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rawer

Use paddingBlock="0 12px" so the follow-up button hugs the last message
instead of floating with a 12px gap above.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ssage

Previously the editor cleanup ran after the awaited sendMessage call, so
the box kept the just-sent text on screen until the entire send + stream
lifecycle resolved. Move clearContent / collapse before the await so the
input feels responsive (sendMessage already snapshots markdown and
editorData for its optimistic update).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop the setExpanded(false) call in handleSubmit so the ChatInput
remains open once the user has opened it. Collapsing it back to the
"Send follow up message" button right after every reply was disruptive
mid-conversation; the button only makes sense as the initial resting
state of the drawer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Plumb a new optional forceRuntime field through SendMessageParams →
ConversationLifecycle.sendMessage → selectRuntimeType(parentRuntime).
parentRuntime already wins over every other signal in the dispatcher,
so callers can pin a send to 'gateway' / 'client' / 'hetero' regardless
of the agent's local/cloud config.

Also propagate forceRuntime through the message queue (QueuedMessage +
MergedQueuedMessage + mergeQueuedMessages + both drain sites in the
client and hetero executors) so a follow-up queued during an in-flight
run keeps its runtime pin when it eventually fires.

FeedbackInput in TopicChatDrawer passes forceRuntime: 'gateway' so
task-topic follow-ups stay on the server-side path that runTask
originally used, even if the user's global runtime preference is local.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@arvinxx arvinxx merged commit 9c4dadd into canary Jun 5, 2026
35 checks passed
@arvinxx arvinxx deleted the feat/task-chat-input branch June 5, 2026 17:26
@arvinxx arvinxx mentioned this pull request Jun 9, 2026
@arvinxx arvinxx mentioned this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:editor something links lobehub editor / rich content text / markdown render i18n size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant