Skip to content

😂 refactor(tasks): drop per-agent /agent/:aid/tasks routes again#14164

Merged
arvinxx merged 3 commits into
canaryfrom
fix/remove-agent-task-menu
Apr 25, 2026
Merged

😂 refactor(tasks): drop per-agent /agent/:aid/tasks routes again#14164
arvinxx merged 3 commits into
canaryfrom
fix/remove-agent-task-menu

Conversation

@arvinxx

@arvinxx arvinxx commented Apr 25, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • Open an agent chat — sidebar no longer shows the "任务 / Tasks" entry between 消息频道 and 定时任务
  • Navigate to /tasks — list/kanban still works, opens task detail at /task/:id
  • Navigate to /agent/<aid>/tasks directly — should 404 / fall through to error boundary (route gone)
  • Create a task from the unified /tasks list — created task opens at /task/:id, not /agent/.../tasks/:id
  • Kanban "Canceled" column from 💄 style(tasks): polish kanban columns, status labels, priority hotkeys #14137 still renders

🤖 Generated with Claude Code

PR #13887 reintroduced the per-agent Tasks surface (sidebar entry, route
files, agentId-scoped breadcrumb/list/board, /agent/:aid/tasks/:taskId
navigation) that #14109 had removed in favor of unified /tasks and
/task/:id. Restore the unified-only model: drop the agent sidebar Tasks
nav item, delete the agent-scoped route files, strip agent-tasks blocks
from both desktopRouter configs, and revert the agentId props and
per-agent navigate paths in AgentTasksPage / KanbanBoard / Breadcrumb /
TaskDetailPage. Preserves #14137's canceled kanban column.

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

vercel Bot commented Apr 25, 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 25, 2026 10:07am

Request Review

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 25, 2026

@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

@codecov

codecov Bot commented Apr 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.59%. Comparing base (01f6858) to head (5b1f6b1).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@           Coverage Diff           @@
##           canary   #14164   +/-   ##
=======================================
  Coverage   67.59%   67.59%           
=======================================
  Files        2192     2192           
  Lines      188963   188947   -16     
  Branches    23276    23274    -2     
=======================================
- Hits       127721   127717    -4     
+ Misses      61113    61101   -12     
  Partials      129      129           
Flag Coverage Δ
app 60.62% <100.00%> (+<0.01%) ⬆️
database 92.22% <ø> (ø)
packages/agent-runtime 79.82% <ø> (ø)
packages/context-engine 83.23% <ø> (ø)
packages/conversation-flow 92.40% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.89% <ø> (ø)
packages/model-runtime 84.27% <ø> (ø)
packages/prompts 70.14% <ø> (ø)
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 67.15% <ø> (ø)
Services 53.24% <ø> (ø)
Server 66.63% <ø> (+<0.01%) ⬆️
Libs 53.30% <ø> (ø)
Utils 80.04% <ø> (ø)
🚀 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: bcb01e659e

ℹ️ 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/routes/(main)/agent/_layout/Sidebar/Header/Nav.tsx Outdated
arvinxx and others added 2 commits April 25, 2026 17:36
handleNewTopic only checked /profile and /channel, so on /agent/:aid/page,
/agent/:aid/cron/:cronId or other sub-routes the redirect was skipped and
mutate() opened a new topic on a non-chat screen — looking ineffective to
the user. Match useTopicNavigation's pattern: derive an agent base path
from params (with topicId when present) and treat anything longer than
that as a sub-route, so adding new sub-routes never re-introduces this gap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous fix conditioned the redirect on isInAgentSubRoute, which
left the URL untouched on /agent/:aid/:topicId — opening a new topic
while the URL still pointed at the previous one. Drop the conditional
and always push /agent/:aid: it covers every sub-route (/profile,
/channel, /page, /cron/:cronId, …) and strips any stale :topicId so
the URL matches the freshly opened topic. Restores Nav.test.tsx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arvinxx arvinxx changed the title 🔥 feat(tasks): drop per-agent /agent/:aid/tasks routes again 😂 refactor(tasks): drop per-agent /agent/:aid/tasks routes again Apr 25, 2026
@arvinxx arvinxx merged commit 61d27b4 into canary Apr 25, 2026
35 checks passed
@arvinxx arvinxx deleted the fix/remove-agent-task-menu branch April 25, 2026 10:19
Innei pushed a commit that referenced this pull request Apr 25, 2026
)

* 🔥 feat(tasks): drop per-agent /agent/:aid/tasks routes again

PR #13887 reintroduced the per-agent Tasks surface (sidebar entry, route
files, agentId-scoped breadcrumb/list/board, /agent/:aid/tasks/:taskId
navigation) that #14109 had removed in favor of unified /tasks and
/task/:id. Restore the unified-only model: drop the agent sidebar Tasks
nav item, delete the agent-scoped route files, strip agent-tasks blocks
from both desktopRouter configs, and revert the agentId props and
per-agent navigate paths in AgentTasksPage / KanbanBoard / Breadcrumb /
TaskDetailPage. Preserves #14137's canceled kanban column.

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

* 🐛 fix(agent): redirect any agent sub-route before opening new topic

handleNewTopic only checked /profile and /channel, so on /agent/:aid/page,
/agent/:aid/cron/:cronId or other sub-routes the redirect was skipped and
mutate() opened a new topic on a non-chat screen — looking ineffective to
the user. Match useTopicNavigation's pattern: derive an agent base path
from params (with topicId when present) and treat anything longer than
that as a sub-route, so adding new sub-routes never re-introduces this gap.

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

* 🐛 fix(agent): always push agent chat route before opening new topic

The previous fix conditioned the redirect on isInAgentSubRoute, which
left the URL untouched on /agent/:aid/:topicId — opening a new topic
while the URL still pointed at the previous one. Drop the conditional
and always push /agent/:aid: it covers every sub-route (/profile,
/channel, /page, /cron/:cronId, …) and strips any stale :topicId so
the URL matches the freshly opened topic. Restores Nav.test.tsx.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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