From fb66614e385dbbd1e7fd6947a2baf7356e9ac55d Mon Sep 17 00:00:00 2001
From: ChickenPige0n <2336983354@qq.com>
Date: Wed, 15 Jul 2026 17:39:22 +0800
Subject: [PATCH] fix(admin-web): break /admin/login returnTo redirect loop in
dev
vite dev only proxied /api and /auth, so /admin/login hit the SPA root
layout, re-ran loadSession, got 401, and redirected back to /admin/login
with an ever-nesting returnTo. Proxy /admin/login to the backend (which
owns it before the SPA fallback) and guard redirectToLogin against
re-entering /admin/login.
Replace the only emoji-as-icon (the back-arrow on project detail) with
the Icon component (new arrow-left glyph).
Add scripts/dev-bootstrap.ts for seeding a local Silo (stub probes) so
npm run dev can start on a fresh dev DB.
---
hub/admin-web/src/lib/components/Icon.svelte | 19 +++++--
hub/admin-web/src/lib/session.ts | 1 +
.../[slug]/projects/[projectId]/+page.svelte | 4 +-
hub/admin-web/vite.config.ts | 4 ++
hub/scripts/dev-bootstrap.ts | 52 +++++++++++++++++++
5 files changed, 74 insertions(+), 6 deletions(-)
create mode 100644 hub/scripts/dev-bootstrap.ts
diff --git a/hub/admin-web/src/lib/components/Icon.svelte b/hub/admin-web/src/lib/components/Icon.svelte
index f51370c..7f6ca06 100644
--- a/hub/admin-web/src/lib/components/Icon.svelte
+++ b/hub/admin-web/src/lib/components/Icon.svelte
@@ -11,11 +11,12 @@
| 'projects'
| 'provider'
| 'feishu'
- | 'menu'
- | 'logout'
- | 'org'
- | 'chevron'
- | 'folder'
+ | 'menu'
+ | 'logout'
+ | 'org'
+ | 'chevron'
+ | 'arrow-left'
+ | 'folder'
| 'file'
| 'check';
class?: string;
@@ -100,6 +101,14 @@
+{:else if name === 'arrow-left'}
+
{:else if name === 'folder'}