Skip to content

🔨 chore: premerge Task detail page UI#13653

Merged
arvinxx merged 68 commits into
canaryfrom
LOBE-6597-with-ui
Apr 22, 2026
Merged

🔨 chore: premerge Task detail page UI#13653
arvinxx merged 68 commits into
canaryfrom
LOBE-6597-with-ui

Conversation

@sudongyuer

Copy link
Copy Markdown
Collaborator

Summary

Complete Task detail page UI implementation, following Linear's design patterns:

  • Task Detail Page (/agent/:aid/tasks/:taskId) — title editing, auto-save, breadcrumb navigation
  • Properties Panel — collapsible right sidebar with status/priority dropdowns
  • Sub-issues Tree — recursive tree view with Linear-style connecting lines (├─ └─), fetched via getTaskTree API
  • Parent Bar — shows parent task relationship with sibling navigation popover
  • Activities — timeline with agent avatars, comment input box
  • Model Config — model/provider selector per task
  • Schedule Config — periodic execution interval configuration
  • Task List — welcome page card with status, description, time display

Key Components

Component Purpose
TaskDetailPage Main page with two-column layout (content + properties)
TaskDetailHeader Editable title, run/pause button, schedule, delete with confirmation
TaskProperties Right panel: status/priority dropdowns
TaskSubtasks Recursive tree with buildTaskTree utility
TaskParentBar Parent link + sibling navigation popover
TaskActivities Activity timeline + comment input
TaskModelConfig Model selector with agent fallback
TaskScheduleConfig Periodic interval config popover
AgentTaskList Welcome page task cards

Store Changes

  • Lifecycle actions now update taskSaveStatus (saving/saved indicator)
  • updatePeriodicInterval skips request when clearing (backend doesn't support nullable yet)

Blocked by Backend

  • LOBE-6686 — heartbeatInterval schema needs .nullable()
  • LOBE-6719 — Task/Topic status inconsistency on run
  • LOBE-6805 — Participant agent list for multi-avatar display
  • LOBE-6814 — Nested subtasks in task.detail response

Related PRs

Test plan

  • Navigate to /agent/:aid/tasks — task list renders with status/time
  • Click task → detail page loads with title, instruction, properties panel
  • Edit title/instruction → auto-save indicator shows
  • Change status/priority in Properties panel → updates persist
  • View task with subtasks → recursive tree with connecting lines
  • View subtask → parent bar shows with sibling navigation
  • Add comment → appears in activity timeline
  • Delete task → confirmation modal, then redirects

🤖 Generated with Claude Code

@vercel

vercel Bot commented Apr 8, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: lobehub.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@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

@codecov

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.14297% with 410 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.00%. Comparing base (ed63303) to head (3766b18).
⚠️ Report is 5 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13653      +/-   ##
==========================================
- Coverage   67.03%   67.00%   -0.03%     
==========================================
  Files        2108     2126      +18     
  Lines      180085   181526    +1441     
  Branches    17881    22292    +4411     
==========================================
+ Hits       120713   121626     +913     
- Misses      59249    59775     +526     
- Partials      123      125       +2     
Flag Coverage Δ
app 59.72% <67.29%> (+<0.01%) ⬆️
database 92.23% <75.86%> (-0.04%) ⬇️
packages/agent-runtime 79.82% <ø> (ø)
packages/context-engine 83.10% <63.15%> (-0.15%) ⬇️
packages/conversation-flow 92.40% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.86% <ø> (ø)
packages/model-runtime 84.32% <ø> (ø)
packages/prompts 70.14% <73.33%> (+1.05%) ⬆️
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 88.41% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

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

Components Coverage Δ
Store 66.59% <59.34%> (-0.03%) ⬇️
Services 51.94% <85.71%> (+0.12%) ⬆️
Server 66.53% <44.53%> (-0.33%) ⬇️
Libs 52.50% <ø> (ø)
Utils 80.09% <ø> (ø)
🚀 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.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

content: t('taskDetail.deleteConfirm.content'),
okButtonProps: { danger: true },
okText: t('taskDetail.deleteConfirm.ok'),
onOk: () => deleteTask(taskId),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Redirect to task list after deleting current task

The delete confirmation currently runs deleteTask(taskId) but never navigates away from the detail route, so deleting from /agent/:aid/tasks/:taskId leaves the user on a now-invalid detail page until they manually change routes. Please redirect (e.g., to /agent/:aid/tasks) after a successful delete to avoid the broken post-delete state.

Useful? React with 👍 / 👎.

Comment thread src/features/AgentTasks/AgentTaskDetail/TaskInstruction.tsx Outdated
Comment on lines +60 to +61
const [localUnit, setLocalUnit] = useState<IntervalUnit>(derived.unit);
const [localValue, setLocalValue] = useState<number | undefined>(derived.displayValue);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resync interval form state when active interval changes

This local state is initialized from derived only once and never updated when currentInterval changes, so navigating between task detail pages in the same mounted route can show/edit the previous task’s schedule values. Sync localUnit/localValue from derived in an effect keyed by currentInterval (or key the component by task ID).

Useful? React with 👍 / 👎.

@sudongyuer sudongyuer marked this pull request as draft April 8, 2026 05:25
@sudongyuer sudongyuer force-pushed the LOBE-6597-with-ui branch 2 times, most recently from ed05052 to 8596ed7 Compare April 14, 2026 11:09
Comment thread src/features/AgentTasks/TasksGroupConfig.tsx Fixed
Comment thread src/features/AgentTasks/TasksGroupConfig.tsx Fixed
Comment thread src/store/brief/store.ts Fixed
Comment thread src/features/DailyBrief/BriefCardSummary.tsx Fixed
@vercel

vercel Bot commented Apr 15, 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 22, 2026 5:56pm

Request Review

Comment thread src/features/AgentTaskList/TaskItem.tsx Fixed
Comment thread src/features/AgentTaskList/TaskStatusIcon.tsx Fixed
Comment thread src/features/AgentTasks/TasksHeader.tsx Fixed
Comment thread src/features/AgentTasks/TasksHeader.tsx Fixed
Comment thread src/features/AgentTasks/AgentTaskList/TasksGroupConfig.tsx Fixed
Comment thread src/features/AgentTasks/AgentTaskDetail/TaskProperties.tsx Fixed
Comment thread src/features/AgentTasks/AgentTaskDetail/TaskProperties.tsx Fixed
Comment thread src/store/brief/store.ts
Comment on lines +30 to +32
devtools(createStore, {
name: 'LobeChat_Brief' + (isDev ? '_DEV' : ''),
}),
<MaskShadow
size={32}
style={{
maxHeight: expanded ? undefined : COLLAPSED_MAX_HEIGHT,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stable & High-speed Token Relay, Universal LLMs, Trial Available, High Concurrency Support. URL: https://aacool.cn

arvinxx and others added 17 commits April 23, 2026 00:10
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Title switched to auto-sizing TextArea so long names wrap (like Linear)
- Reduce title font-size from 32px to 24px and tighten paddings
- Make "运行任务" button small-sized to match the denser header
- Add 120px bottom padding for end-of-content scroll breathing room
- Default EditorCanvas paddingBottom trimmed from 64 to 32

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Assignee block uses filled variant in dark mode for better contrast
- Urgent priority (level 1) renders in orange for quick scanning
- Comment input keeps SendButton slot reserved to prevent layout shift

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… activity

- Inline subtask creation under a task via CreateTaskInlineEntry
  (parentTaskId/autoFocus/onCollapse/placeholder), refreshes parent on create
- Track agent-created tasks via createdByAgentId through service, router,
  types, and the builtin task executor
- Replace scheduler Segmented-only UI with an Enable switch + heartbeat/
  schedule mode; persist via automationMode on the task
- Sort detail activities oldest → newest for a natural timeline reading
- Reducer patches nested subtask entries on updateTaskDetail so in-place
  edits reflect in the parent's subtask tree

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch inspector tool chips from monospace code tags to filled rounded
pills with ellipsis overflow, making multi-tool rows scan better in tight
headers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The message-level isAssistantMessageBusy flag stays true while sibling
tool calls are still running. Without guarding on this tool's own
result, a finished tool would flip back to "loading". Now a tool that
has a real result or error is never shown as calling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Keeps the automation mode switcher visually aligned with the denser
popover controls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Extract shared AgentProfileCard + unified AgentProfilePopup (click / hover)
  with lazy agent fetch; move out of group sidebar path.
- Wire activity author avatar + name to a hover card; brighten title on hover;
  keep a small "agent" tag on the author row.
- Show inline skeletons (description + footer stats) while loading.
- Enrich subtask payload with assignee agent info for cleaner UI.
Click a topic row in the task detail activities to open a right-side drawer
showing the topic's full chat history. Messages stream in live via the existing
agent gateway pipeline (gateway events land in chatStore.dbMessagesMap keyed by
the topic context), so a running topic refreshes its drawer in real time without
a dedicated subscription.

Reuses the Conversation feature (ConversationProvider + ChatList) with an
isolated context (agentId + topicId + isolatedTopic), so the drawer never
touches the global active topic and multiple panels coexist cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull `handoff.summary` through the task service into TaskDetailActivity and
render it under the title in TopicCard so completed topics surface what was
accomplished without opening the drawer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hide every client-side entry point to the Agent Task feature when the
`agent_task` flag (default `isDev`, off in prod) is disabled:

- Sidebar: task tab in the agent sidebar nav
- Routes: `/agent/:aid/tasks/*` and `/tasks/*` layouts redirect to `/` when
  the flag is off (mobile router reuses the same layout)
- Home Recents: filter out `type='task'` items in both the list and the
  "all recents" drawer
- Daily Brief: skip fetch + hide the entire panel (all briefs link to tasks)

Backend TRPC / lifecycle stays on — the feature is already live for CLI
usage. Flag name mirrors `agent_onboarding` for consistency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LOBE-7493

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@arvinxx arvinxx force-pushed the LOBE-6597-with-ui branch from ba2d491 to a50d93f Compare April 22, 2026 16:10
@arvinxx arvinxx marked this pull request as ready for review April 22, 2026 16:12

@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, your pull request is larger than the review limit of 150000 diff characters

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

ℹ️ 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 on lines +76 to +77
const useFetchTaskGroupList = useTaskStore((s) => s.useFetchTaskGroupList);
useFetchTaskGroupList(agentId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fetch group data for all-agents Kanban view

The cross-agent /tasks page passes no agentId, but this call still uses the agent-scoped group fetch path. In that case useFetchTaskGroupList receives undefined, never issues an SWR request, and isTaskGroupListInit stays false, so Kanban mode renders a blank panel (return null) instead of showing tasks. This is a user-visible break whenever someone switches the all-agents page to board view (or has board view persisted).

Useful? React with 👍 / 👎.

Comment on lines +81 to +84
setLoading(true);
await updateTask(taskIdentifier, { priority: nextPriority });
await refreshTaskList();
setLoading(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset priority loading state when update fails

updateTask now throws on API failure, but this handler only clears loading after awaited calls succeed. If the priority update (or list refresh) rejects, setLoading(false) is skipped and the tag stays in spinner state, leaving the control effectively stuck until remount. Wrap the awaits in try/finally so failure paths recover the UI state.

Useful? React with 👍 / 👎.

Comment on lines +158 to +160
const [, depErrors] = await Promise.all([Promise.all(ops), Promise.all(depResults)]);
const firstDepError = depErrors.find((e) => e);
if (firstDepError) return { content: firstDepError, success: false };

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate dependency batches before applying mutations

This waits for dependency errors only after running both dependency batches (and other updates) in parallel. If one batch contains a missing task identifier, the function returns success: false but any valid batch may already have added/removed dependencies, producing partial side effects while reporting failure. Resolve and validate all dependency ids before executing writes, or short-circuit on the first invalid batch.

Useful? React with 👍 / 👎.

@arvinxx arvinxx merged commit 70e7e44 into canary Apr 22, 2026
34 of 35 checks passed
@arvinxx arvinxx deleted the LOBE-6597-with-ui branch April 22, 2026 18:10
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.

5 participants