dev #5
@@ -7,6 +7,26 @@ This project follows the repository versioning rule:
|
|||||||
- `feature` -> `+0.1.0`
|
- `feature` -> `+0.1.0`
|
||||||
- `bugfix` -> `+0.0.1`
|
- `bugfix` -> `+0.0.1`
|
||||||
|
|
||||||
|
## 0.24.2
|
||||||
|
|
||||||
|
Released: 2026-04-09
|
||||||
|
|
||||||
|
### Highlights
|
||||||
|
|
||||||
|
- Fixed the public-entry and AI diagnostics regressions introduced during the recent frontend routing and playground work, while also reducing the main frontend bundle by switching to route-level lazy loading and more targeted vendor chunking.
|
||||||
|
|
||||||
|
### Improved
|
||||||
|
|
||||||
|
- Improved [frontend/src/App.tsx](/home/ray/dev/linkong/planet/frontend/src/App.tsx) by lazy-loading admin pages and large workspaces through `React.lazy()` plus `Suspense`, so the initial frontend entry no longer pulls every route into the first bundle.
|
||||||
|
- Improved [frontend/vite.config.ts](/home/ray/dev/linkong/planet/frontend/vite.config.ts) by adding targeted manual chunking for React, icon, network, and Earth-related vendor dependencies instead of leaving everything in one monolithic application bundle.
|
||||||
|
- Improved [frontend/src/index.css](/home/ray/dev/linkong/planet/frontend/src/index.css) by adding a shared route-loading state and making the Playground help panel size to its content instead of stretching to fill the sidebar.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed [frontend/src/App.tsx](/home/ray/dev/linkong/planet/frontend/src/App.tsx) so anonymous visits to `/` once again reach the public Earth entry through the existing `/ -> /earth` redirect instead of being intercepted by the login screen.
|
||||||
|
- Fixed [frontend/src/pages/Playground/Playground.tsx](/home/ray/dev/linkong/planet/frontend/src/pages/Playground/Playground.tsx) so cached provider status is shown immediately but still refreshed from the backend, avoiding stale diagnostics after `.env` or provider changes within the same browser tab.
|
||||||
|
- Fixed [frontend/src/pages/Playground/Playground.tsx](/home/ray/dev/linkong/planet/frontend/src/pages/Playground/Playground.tsx) and [frontend/src/index.css](/home/ray/dev/linkong/planet/frontend/src/index.css) so the `测试说明` card no longer over-expands and now fits its content more naturally in the sidebar.
|
||||||
|
|
||||||
## 0.24.1
|
## 0.24.1
|
||||||
|
|
||||||
Released: 2026-04-09
|
Released: 2026-04-09
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
## Current Version
|
## Current Version
|
||||||
|
|
||||||
- `main` 当前主线历史推导到:`0.16.5`
|
- `main` 当前主线历史推导到:`0.16.5`
|
||||||
- `dev` 当前开发分支历史推导到:`0.24.1`
|
- `dev` 当前开发分支历史推导到:`0.24.2`
|
||||||
|
|
||||||
## Timeline
|
## Timeline
|
||||||
|
|
||||||
@@ -74,6 +74,7 @@
|
|||||||
| `0.23.3` | bugfix | `dev` | `pending` | refine `planet.sh` zsh runtime compatibility, startup logging, and frontend readiness feedback |
|
| `0.23.3` | bugfix | `dev` | `pending` | refine `planet.sh` zsh runtime compatibility, startup logging, and frontend readiness feedback |
|
||||||
| `0.24.0` | feature | `dev` | `pending` | add AI Playground entry, provider diagnostics, and frontend layout guidance |
|
| `0.24.0` | feature | `dev` | `pending` | add AI Playground entry, provider diagnostics, and frontend layout guidance |
|
||||||
| `0.24.1` | bugfix | `dev` | `pending` | refactor Earth HUD into class-first CSS layers, unify Bun-only frontend tooling guidance, and auto-bootstrap Bun/uv in `planet.sh` |
|
| `0.24.1` | bugfix | `dev` | `pending` | refactor Earth HUD into class-first CSS layers, unify Bun-only frontend tooling guidance, and auto-bootstrap Bun/uv in `planet.sh` |
|
||||||
|
| `0.24.2` | bugfix | `dev` | `pending` | restore public Earth entry, refresh Playground provider diagnostics correctly, fit help-card content, and split frontend bundles by route/vendor |
|
||||||
|
|
||||||
## Maintenance Commits Not Counted as Version Bumps
|
## Maintenance Commits Not Counted as Version Bumps
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "planet-frontend",
|
"name": "planet-frontend",
|
||||||
"version": "0.24.1",
|
"version": "0.24.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "bun@1",
|
"packageManager": "bun@1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,36 +1,48 @@
|
|||||||
|
import { Suspense, lazy } from 'react'
|
||||||
|
import { Spin } from 'antd'
|
||||||
import { Routes, Route, Navigate } from 'react-router-dom'
|
import { Routes, Route, Navigate } from 'react-router-dom'
|
||||||
import { useAuthStore } from './stores/auth'
|
import { useAuthStore } from './stores/auth'
|
||||||
import Login from './pages/Login/Login'
|
import Login from './pages/Login/Login'
|
||||||
import Dashboard from './pages/Dashboard/Dashboard'
|
|
||||||
import Users from './pages/Users/Users'
|
const Dashboard = lazy(() => import('./pages/Dashboard/Dashboard'))
|
||||||
import DataSources from './pages/DataSources/DataSources'
|
const Users = lazy(() => import('./pages/Users/Users'))
|
||||||
import DataList from './pages/DataList/DataList'
|
const DataSources = lazy(() => import('./pages/DataSources/DataSources'))
|
||||||
import Earth from './pages/Earth/Earth'
|
const DataList = lazy(() => import('./pages/DataList/DataList'))
|
||||||
import Settings from './pages/Settings/Settings'
|
const Earth = lazy(() => import('./pages/Earth/Earth'))
|
||||||
import BGP from './pages/BGP/BGP'
|
const Settings = lazy(() => import('./pages/Settings/Settings'))
|
||||||
import Playground from './pages/Playground/Playground'
|
const BGP = lazy(() => import('./pages/BGP/BGP'))
|
||||||
|
const Playground = lazy(() => import('./pages/Playground/Playground'))
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const { token } = useAuthStore()
|
const { token } = useAuthStore()
|
||||||
const isEarthPage = window.location.pathname === '/earth'
|
const publicPaths = new Set(['/', '/earth'])
|
||||||
|
const isPublicRoute = publicPaths.has(window.location.pathname)
|
||||||
|
|
||||||
if (!token && !isEarthPage) {
|
if (!token && !isPublicRoute) {
|
||||||
return <Login />
|
return <Login />
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Routes>
|
<Suspense
|
||||||
<Route path="/admin" element={<Dashboard />} />
|
fallback={(
|
||||||
<Route path="/" element={<Navigate to="/earth" replace />} />
|
<div className="app-route-loading">
|
||||||
<Route path="/earth" element={<Earth />} />
|
<Spin size="large" />
|
||||||
<Route path="/users" element={<Users />} />
|
</div>
|
||||||
<Route path="/datasources" element={<DataSources />} />
|
)}
|
||||||
<Route path="/data" element={<DataList />} />
|
>
|
||||||
<Route path="/bgp" element={<BGP />} />
|
<Routes>
|
||||||
<Route path="/playground" element={<Playground />} />
|
<Route path="/admin" element={<Dashboard />} />
|
||||||
<Route path="/settings" element={<Settings />} />
|
<Route path="/" element={<Navigate to="/earth" replace />} />
|
||||||
<Route path="*" element={<Navigate to="/admin" replace />} />
|
<Route path="/earth" element={<Earth />} />
|
||||||
</Routes>
|
<Route path="/users" element={<Users />} />
|
||||||
|
<Route path="/datasources" element={<DataSources />} />
|
||||||
|
<Route path="/data" element={<DataList />} />
|
||||||
|
<Route path="/bgp" element={<BGP />} />
|
||||||
|
<Route path="/playground" element={<Playground />} />
|
||||||
|
<Route path="/settings" element={<Settings />} />
|
||||||
|
<Route path="*" element={<Navigate to="/admin" replace />} />
|
||||||
|
</Routes>
|
||||||
|
</Suspense>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,13 @@ body {
|
|||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-route-loading {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -472,7 +479,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playground-help--expanded {
|
.playground-help--expanded {
|
||||||
flex: 1 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playground-help.ant-collapse {
|
.playground-help.ant-collapse {
|
||||||
@@ -493,38 +500,21 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playground-help .ant-collapse-content {
|
.playground-help .ant-collapse-content {
|
||||||
flex: 1 1 auto;
|
flex: 0 0 auto;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
overflow: hidden;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playground-help .ant-collapse-content-box {
|
.playground-help .ant-collapse-content-box {
|
||||||
height: 100%;
|
height: auto;
|
||||||
overflow: auto;
|
overflow: visible;
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
|
||||||
padding: 12px 16px 16px !important;
|
padding: 12px 16px 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar {
|
.playground-help__content {
|
||||||
width: 8px;
|
display: flex;
|
||||||
height: 8px;
|
flex-direction: column;
|
||||||
}
|
gap: 12px;
|
||||||
|
|
||||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-thumb {
|
|
||||||
background: rgba(148, 163, 184, 0.82);
|
|
||||||
border-radius: 999px;
|
|
||||||
border: 2px solid transparent;
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-thumb:hover {
|
|
||||||
background: rgba(100, 116, 139, 0.9);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-track {
|
|
||||||
background: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.playground-note.ant-alert {
|
.playground-note.ant-alert {
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ function Playground() {
|
|||||||
if (cached) {
|
if (cached) {
|
||||||
try {
|
try {
|
||||||
setProviderStatus(JSON.parse(cached) as AIProviderStatus)
|
setProviderStatus(JSON.parse(cached) as AIProviderStatus)
|
||||||
return
|
|
||||||
} catch {
|
} catch {
|
||||||
sessionStorage.removeItem(PLAYGROUND_PROVIDER_STATUS_STORAGE_KEY)
|
sessionStorage.removeItem(PLAYGROUND_PROVIDER_STATUS_STORAGE_KEY)
|
||||||
}
|
}
|
||||||
@@ -207,22 +206,24 @@ function Playground() {
|
|||||||
key: 'help',
|
key: 'help',
|
||||||
label: '测试说明',
|
label: '测试说明',
|
||||||
children: (
|
children: (
|
||||||
<Alert
|
<div className="playground-help__content">
|
||||||
type="info"
|
<Alert
|
||||||
showIcon
|
type="info"
|
||||||
className="playground-note"
|
showIcon
|
||||||
message="用于验证 AI Provider 是否可用,以及 backend -> aiprovider 链路是否通畅。"
|
className="playground-note"
|
||||||
description={(
|
message="用于验证 AI Provider 是否可用,以及 backend -> aiprovider 链路是否通畅。"
|
||||||
<span>
|
description={(
|
||||||
当前链路:
|
<span>
|
||||||
<Text code>frontend /playground</Text>
|
当前链路:
|
||||||
{' -> '}
|
<Text code>frontend /playground</Text>
|
||||||
<Text code>backend /api/v1/ai/*</Text>
|
{' -> '}
|
||||||
{' -> '}
|
<Text code>backend /api/v1/ai/*</Text>
|
||||||
<Text code>aiprovider /v1/*</Text>
|
{' -> '}
|
||||||
</span>
|
<Text code>aiprovider /v1/*</Text>
|
||||||
)}
|
</span>
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|||||||
@@ -72,4 +72,36 @@ export default defineConfig({
|
|||||||
entries: ['src/main.tsx'],
|
entries: ['src/main.tsx'],
|
||||||
exclude: ['satellite.js'],
|
exclude: ['satellite.js'],
|
||||||
},
|
},
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
manualChunks(id) {
|
||||||
|
if (!id.includes('node_modules')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id.includes('/@ant-design/icons/')) {
|
||||||
|
return 'icons-vendor'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
id.includes('/react/') ||
|
||||||
|
id.includes('/react-dom/') ||
|
||||||
|
id.includes('/react-router-dom/') ||
|
||||||
|
id.includes('/scheduler/')
|
||||||
|
) {
|
||||||
|
return 'react-vendor'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id.includes('/axios/')) {
|
||||||
|
return 'network-vendor'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id.includes('/three/') || id.includes('/simplex-noise/') || id.includes('/satellite.js/')) {
|
||||||
|
return 'earth-vendor'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "planet"
|
name = "planet"
|
||||||
version = "0.24.1"
|
version = "0.24.2"
|
||||||
description = "智能星球计划 - 态势感知系统"
|
description = "智能星球计划 - 态势感知系统"
|
||||||
requires-python = ">=3.14"
|
requires-python = ">=3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
Reference in New Issue
Block a user