Skip to content

💄 style(space-panel): split agent resources into Skills / Documents / Web tabs#15057

Merged
arvinxx merged 2 commits into
canaryfrom
refactor/space-panel
May 21, 2026
Merged

💄 style(space-panel): split agent resources into Skills / Documents / Web tabs#15057
arvinxx merged 2 commits into
canaryfrom
refactor/space-panel

Conversation

@arvinxx

@arvinxx arvinxx commented May 21, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • ♻️ refactor

🔀 Description of Change

Reshape the right-side Space panel for non-heterogeneous agents from the old All / Documents / Web pill filter into three dedicated tabs: Skills / Documents / Web (default: Skills). The Skills tab now mirrors the heterogeneous agent's skills surface — each skill bundle is a collapsible row with a count badge, expanding to reveal child files (e.g. SKILL.md) underneath.

Notable bits:

  • Extract the row primitive into a new shared SkillsList component under src/features/AgentDocumentsExplorer/SkillsList.tsx. Both the hetero SkillsGroup (filesystem-backed) and the non-hetero AgentDocumentsGroup (DB-backed) consume it — no UI duplication.

  • Per-tab data split:

    Tab Filter
    Skills isSkillBundleItem(doc) + walked children → files[]
    Documents sourceType !== 'web' && !isManagedSkillItem(doc)
    Web sourceType === 'web'

    Skill bundles + SKILL.md index docs no longer leak into the Documents tree.

  • Drop the dead viewMode='list' \| 'tree' prop and its tree-grouping branch — the Documents tab always renders the tree now.

  • i18n: replace workingPanel.resources.filter.all with workingPanel.resources.filter.skills in src/locales/default/chat.ts, locales/en-US/chat.json, locales/zh-CN/chat.json. Other locales will regenerate via pnpm i18n.

Known follow-up (intentionally deferred): the previous orphan-skill-bundle delete-recovery affordance is gone in this round — the new SkillsList row has no inline delete. Orphan bundles are still listed and openable. Will revisit once we decide whether to expose delete via context menu or a per-row slot.

🧪 How to Test

  • Tested locally (Electron)
  • Added/updated tests

Verified all three tabs render correctly against a real agent with 246 documents (2 skill bundles, 42 docs, 198 web). Skills tab expand shows nested SKILL.md. 11 unit tests in AgentDocumentsGroup.test.tsx pass. bun run type-check clean.

📸 Screenshots / Videos

Before After (Skills tab)
All / Documents / Web pill, flat cards Skills bundle rows with expand + count

📝 Additional Information

Scope: non-hetero agent Space panel only. Hetero SkillsGroup keeps its existing header but now delegates row rendering to the shared component, so visual parity is preserved.

…eb tabs

Replace the All / Documents / Web filter on the agent Space panel with
three dedicated tabs (Skills / Documents / Web, default Skills) and give
the Skills tab a folder-style list with expand-to-children rows that
matches the heterogeneous agent's skills panel. Extract the row primitive
into a shared `SkillsList` component so both panels render the same UI.
Skill bundles and their `SKILL.md` index are filtered out of the
Documents tree; web items live on their own tab.

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

vercel Bot commented May 21, 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 May 21, 2026 8:27am

Request Review

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. feature:agent Assistant/Agent configuration and behavior labels May 21, 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.

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

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 43.31395% with 195 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.73%. Comparing base (516a265) to head (b53339c).
⚠️ Report is 7 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #15057      +/-   ##
==========================================
- Coverage   70.73%   70.73%   -0.01%     
==========================================
  Files        3099     3100       +1     
  Lines      308317   308381      +64     
  Branches    32408    27774    -4634     
==========================================
+ Hits       218076   218119      +43     
- Misses      90078    90099      +21     
  Partials      163      163              
Flag Coverage Δ
app 61.38% <43.31%> (-0.01%) ⬇️
database 92.14% <ø> (ø)
packages/agent-runtime 80.48% <ø> (ø)
packages/builtin-tool-lobe-agent 19.87% <ø> (ø)
packages/context-engine 84.07% <ø> (ø)
packages/conversation-flow 91.28% <ø> (ø)
packages/file-loaders 87.89% <ø> (ø)
packages/memory-user-memory 75.01% <ø> (ø)
packages/model-bank 99.99% <ø> (ø)
packages/model-runtime 83.55% <ø> (+0.05%) ⬆️
packages/prompts 71.60% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 35.16% <ø> (ø)
packages/utils 88.02% <ø> (ø)
packages/web-crawler 87.74% <ø> (ø)

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

Components Coverage Δ
Store 67.97% <ø> (ø)
Services 54.66% <ø> (ø)
Server 71.98% <ø> (+<0.01%) ⬆️
Libs 56.39% <ø> (ø)
Utils 85.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.

@arvinxx arvinxx changed the title ♻️ refactor(space-panel): split agent resources into Skills / Documents / Web tabs 💄 style(space-panel): split agent resources into Skills / Documents / Web tabs May 21, 2026
…ebar test

`AgentDocumentsGroup` now calls `useNavigate`/`useMatch` at the top level
and defaults to the Skills tab, so the parent `AgentWorkingSidebar` test
needs a `react-router-dom` mock and the Skills empty-state i18n key.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@arvinxx arvinxx merged commit e78cbaf into canary May 21, 2026
32 of 34 checks passed
@arvinxx arvinxx deleted the refactor/space-panel branch May 21, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:agent Assistant/Agent configuration and behavior size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant