Skip to content

feat(nav): rework the sidebar — nested capability center, dedicated scheduled-tasks and sites entries - #71

Merged
Luhaozhu merged 1 commit into
mainfrom
feat/sidebar-nav-rework
Aug 8, 2026
Merged

feat(nav): rework the sidebar — nested capability center, dedicated scheduled-tasks and sites entries#71
Luhaozhu merged 1 commit into
mainfrom
feat/sidebar-nav-rework

Conversation

@Luhaozhu

@Luhaozhu Luhaozhu commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

The sidebar goes from a flat pile of entries to "a few top-level entries + a nested capability center".

Capability center is promoted to a top-level entry, and its four capability kinds — agents / skills / connectors / plugins — become a nested list with a tree guide line. Clicking the parent row collapses or expands it, and that choice is remembered. The in-page tab strip is gone. "MCP tool library" is renamed "connectors" throughout.

Scheduled tasks moves out of the app center into its own top-level entry, with a reworked page: a carousel of recommended tasks (six built-in examples that prefill the create dialog), separate "my scheduled tasks" and "run history" views, sorting, search and an empty state.

Sites is promoted out of the lab. Knowledge base moves from a top-level entry into a tab of my space, right next to file assets — the documents there were already the upstream of "add to a private knowledge base". App center and projects move down into the user avatar menu. Sidebar typography is tightened by one step.

Worth calling out

  • Single source of truth for the category list. catalog/abilityTabs.ts feeds both the sidebar's nested items and the page's panes. Pane lookup is a Record<AbilityTabKey, …>, so adding a category without a pane is a compile error rather than a silently blank page.
  • Panes mount lazily. Each of the four panes fetches its own list on mount, so entering the capability center used to fire all four request sets at once. They now mount on first visit and stay mounted — opening a single category costs 2 requests instead of 8.
  • The user avatar menu renders nested items too, so an administrator who parks the capability center there does not leave its four categories unreachable.
  • The startup safety net had a real bug. backfill_navigation_entries only ever checked sidebar_items, so "an operator deliberately moved this entry into the user menu" was indistinguishable from "this deployment is missing the entry" — it got re-seeded into the sidebar on every restart and ended up duplicated across both buckets. Entries now declare a target bucket and count as placed if they appear in either one. Panel copy is also no longer re-typed there; it is read from DEFAULT_PAGE_CONFIG.

Deployment note

The runtime source of truth for sidebar layout is page_config.navigation in the database; the arrays in code are only factory defaults for a fresh install. Existing deployments will not switch to the new layout on their own — the new "scheduled tasks" and "sites" entries get seeded by the startup safety net above, but entries that already exist (such as the capability center) keep their current placement. To move fully to the new layout, adjust it under system config → page config → sidebar layout, which supports moving entries between "sidebar / user menu / disabled" and reordering, and has a "restore defaults" button.

Verification

  • tsc -b, the i18n dictionary check and eslint all pass — eslint was diffed line by line against a pristine tree with zero new findings, and two pre-existing errors were removed
  • Backend tests/api: 77 passed. test_page_config_backfill.py grew from 6 to 8 cases; the two new ones cover the bug above in both directions (sidebar → menu and menu → sidebar)
  • The CE derivation pipeline passes --frontend-check, with the brand gate reporting 0 hits

…cheduled-tasks and sites entries

The sidebar goes from a flat pile of entries to "a few top-level entries + a nested
capability center".

- **Capability center** is promoted to a top-level entry, and its four capability kinds
  (agents / skills / connectors / plugins) are now a nested list with a tree guide line.
  Clicking the parent row collapses or expands it, and that choice is remembered in
  localStorage. The in-page tab strip is gone. "MCP tool library" is renamed "connectors"
  throughout.
- **Automation** moves out of the app center into its own top-level "scheduled tasks"
  entry, with a reworked page: a carousel of recommended tasks (six built-in examples that
  prefill the create dialog), separate "my scheduled tasks" and "run history" views,
  sorting, search and an empty state.
- **Sites** is promoted out of the lab. **Knowledge base** moves from a top-level entry
  into a tab of "my space", right next to file assets — the documents there were already
  the upstream of "add to a private knowledge base". **App center and projects** move down
  into the user avatar menu.
- Sidebar typography is tightened by one step.

Supporting changes:

- The category list has a single source of truth in `catalog/abilityTabs.ts`, shared by the
  sidebar's nested items and the page's panes. Pane lookup is a `Record<AbilityTabKey, …>`,
  so adding a category without a pane is a compile error rather than a blank page.
- Capability-center panes now mount on first visit instead of all at once. Each pane fetches
  its own list on mount, so opening a single category no longer costs four list requests.
- The user avatar menu renders nested items too, so parking the capability center there does
  not leave its categories unreachable.
- Backend `page_config` factory defaults are realigned with the frontend. The startup
  safety net `backfill_navigation_entries` now lets an entry declare its target bucket
  (sidebar or menu) and treats an entry as placed if it appears in *either* bucket. It
  previously only looked at `sidebar_items`, so an operator who deliberately moved an entry
  into the user menu had it re-seeded into the sidebar on every restart, ending up
  duplicated across both buckets. Panel copy is no longer re-typed there either — it is read
  from `DEFAULT_PAGE_CONFIG`.
- Cleanup: the old capability-center tab-bar CSS, the now-unused `onDetailChange` /
  `sitesListRequested` / `onBack` plumbing, and the unreachable `skills|mcp|agents` panel
  routes. Run timestamps now use the timezone-consistent `formatShortDateTime` helper.

Note: the runtime source of truth for sidebar layout is `page_config.navigation` in the
database; the arrays in code are only factory defaults. Administrators can rearrange
everything under system config → page config. Existing deployments need that config updated
separately.
@Luhaozhu
Luhaozhu force-pushed the feat/sidebar-nav-rework branch from af4237e to cea1e68 Compare August 7, 2026 16:00
@Luhaozhu Luhaozhu changed the title feat(nav): 左侧边栏改版——能力中心二级导航、定时任务/站点独立入口、知识库并入我的空间 feat(nav): rework the sidebar — nested capability center, dedicated scheduled-tasks and sites entries Aug 7, 2026
@Luhaozhu
Luhaozhu merged commit 1e535eb into main Aug 8, 2026
5 checks passed
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.

1 participant