Skip to content

feat: promote system routes to top-level and improve no-app empty state UX#898

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/optimize-empty-state-menu-availability
Draft

feat: promote system routes to top-level and improve no-app empty state UX#898
Copilot wants to merge 4 commits intomainfrom
copilot/optimize-empty-state-menu-availability

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

After tenant creation with no apps, users were stuck on an empty state with no way to access system settings, and the "Create App" button was hidden when config loading failed.

Changes

Route promotion (App.tsx)

  • Add top-level /system/* and /create-app routes (wrapped in AuthGuard + ConnectedShell) so they're reachable without any app context
  • AppContent: allow system routes to render when no active app exists instead of early-returning to empty state

Empty state always actionable (App.tsx)

  • RootRedirect: always render both "Create App" and "System Settings" buttons — removes the {!error && ...} gate that hid the CTA on config failure
  • AppContent: same dual-button treatment with descriptive guidance text

Sidebar fallback navigation (AppSidebar.tsx)

  • When activeApp is falsy, render a systemFallbackNavigation array (Settings, Apps, Users, Orgs, Roles, Create App) instead of the app switcher + NavigationRenderer tree
  • Header shows "System Console" with a Settings icon; user menu links to /system instead of /apps/:appName/system
  • Mobile bottom nav uses the same fallback array

System pages handle missing appName (SystemHubPage.tsx, AppManagementPage.tsx)

// Before
const basePath = `/apps/${appName}`;
// After
const basePath = appName ? `/apps/${appName}` : '';

Tests

  • EmptyStateSystemRoutes.test.tsx: 5 tests covering empty-state buttons, system hub rendering at /apps/_new/system, and create-app rendering without an active app
Original prompt

This section details on the original issue you should resolve

<issue_title>改善后台管理系统空状态和系统菜单可用性</issue_title>
<issue_description>## 需求背景
在创建租户后,访问首页显示"无应用",此时应该允许用户立即创建应用。理论上,系统应该包含系统设置菜单,并且登录、注册页也应该可以正常访问,但当前未看到这些入口,导致用户无法进行后续操作。

综合评估后开发需求如下:

  1. 空状态下操作优化

    • 当"无应用"时,始终展示"创建应用"按钮,无论配置加载失败与否。
    • 空状态页应提示用户如何开启系统功能,并包含去设置页面和去创建应用的快捷入口。
  2. 系统菜单/设置入口可用性

    • 即使没有任何应用,也应在侧边栏或菜单中保留"系统设置"入口,使租户能够进行基础配置,如用户管理、权限分配等。
    • 系统相关路由(如用户管理、应用管理、组织管理、权限管理、个人中心等)需提升为主级路由,保证用户可以在未创建应用时访问。
  3. 登��/注册/忘记密码页可正常访问

    • 登录、注册、忘记密码应始终可访问,无论系统/应用状态如何。
    • 确认 ConditionalAuthWrapper 和相关逻辑在认证服务不可用时也能出发登录页显示。
  4. 后台管理整体结构优化

    • 侧边栏在无应用时显示基本系统导航(如系统设置、创建应用、帮助等)。
    • 文案、交互需适配不同"无应用"与"系统不可用"场景。

验收标准

  • 首页空状态有"创建应用"按钮,且设置入口可直接访问。
  • 登录、注册页始终可见。
  • 系统管理菜单无应用时可访问。
  • 租户能通过设置菜单调整系统参数。

建议技术实现

  • 路由微调(将系统管理相关路由提升到主路由层级)
  • 空状态 UI/UX 优化
  • 侧边栏 fallback 菜单配置
  • 认证包与权限包异常分支完善

请根据以上需求开展开发任务,实现后台管理的空状态优化与入口可用性提升。</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 27, 2026 11:57am
objectui-demo Error Error Feb 27, 2026 11:57am
objectui-storybook Ready Ready Preview, Comment Feb 27, 2026 11:57am

Request Review

- Always show Create App button in empty state (even on error)
- Add System Settings link to empty state pages
- Add top-level /system/* and /create-app routes for access without app context
- Modify AppSidebar to show system navigation when no apps configured
- Update SystemHubPage and AppManagementPage to handle missing appName

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Validates: create-app button always visible, system settings link present,
system routes accessible when no active app exists.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
- Simplify tooltip and label rendering for fallback nav items
- Reduce test timeouts from 10000ms to 5000ms
- Update ROADMAP.md with P1.12.1 empty state improvements

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve backend management system empty state and menu usability feat: promote system routes to top-level and improve no-app empty state UX Feb 27, 2026
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.

改善后台管理系统空状态和系统菜单可用性

2 participants