feat(hololake): ship language platform 0.7.0

This commit is contained in:
冰朔 2026-08-09 03:37:41 +08:00
commit 5105ec5e32
47 changed files with 4566 additions and 398 deletions

View file

@ -0,0 +1,93 @@
# Shared UI Components
Framework: React 19 with custom TypeScript components and vanilla CSS. No third-party component library is used.
## Button families
Source: `../guanghu-knowledge-base/src/styles/app.css`
```css
.primary-button,
.secondary-button,
.text-button,
.icon-button {
min-height: 36px;
padding: 0 15px;
border-radius: 9px;
cursor: pointer;
}
.primary-button {
border: 1px solid var(--lake-accent);
background: var(--lake-accent);
color: #06121c;
font-weight: 650;
}
.secondary-button {
border: 1px solid var(--lake-border);
background: var(--lake-surface-2);
color: var(--lake-text-soft);
}
.text-button,
.icon-button {
border: 0;
background: transparent;
color: var(--lake-muted);
}
```
## HoloLake orbit mark
The current shared mark is CSS-only. It must replace every text avatar. The Chinese character `湖` is not a brand asset and must not appear as an avatar or empty-state illustration.
```css
.launcher-orbit {
position: relative;
width: 22px;
height: 22px;
border: 1px solid rgba(69, 183, 204, 0.58);
border-radius: 50%;
transform: rotate(-16deg);
}
.launcher-orbit::before {
content: "";
position: absolute;
inset: 7px -5px;
border: 1px solid rgba(69, 183, 204, 0.46);
border-radius: 50%;
}
.launcher-orbit::after {
content: "";
position: absolute;
width: 5px;
height: 5px;
left: 8px;
top: 8px;
border-radius: 50%;
background: var(--lake-accent);
}
```
## StorageLocationSheet
Source: `../guanghu-knowledge-base/src/components/StorageLocationSheet.tsx`
Purpose: account/server sign-in and local-versus-server knowledge storage. This is an application-level sheet, not Agent content. Key state: local/server mode, active server session, repository selection, repository creation, sign-out.
## HumanSettings
Source: `../guanghu-knowledge-base/src/components/HumanSettings.tsx`
Purpose: device-local human preferences. Controls language preference, UI font, reading size and appearance. It must remain separate from server credentials and from Agent model configuration.
## AgentChat
Source: `../guanghu-knowledge-base/src/components/AgentChat.tsx`
Purpose: current-channel assistance. The default render must contain only scope, status, conversation and composer. Model and Git engine controls are advanced application settings and must not be rendered in the default Agent surface.
## Knowledge primitives
- `DocTree.tsx`: folder/page hierarchy.
- `Editor.tsx`: document preview and edit mode.
- `SearchBar.tsx`: channel-local document search.
- `VersionHistory.tsx`: Git-backed revision history.

View file

@ -0,0 +1,36 @@
# Extractable components
## PlatformNavigation
- Source: `../guanghu-knowledge-base/src/components/PlatformNavigation.tsx`
- Category: layout
- Description: global domain rail and human account entry
- Extractable props: `activeRoute`, `knowledgeSelected`
- Hardcoded: HoloLake orbit mark, domain labels, settings/account icons
## AgentDrawer
- Source: `../guanghu-knowledge-base/src/components/AgentChat.tsx`
- Category: layout
- Description: contextual current-page assistant
- Extractable props: `operational`, `model`, `scope`, `isOpen`
- Hardcoded: orbit mark, composer layout, status treatment
## StorageLocationSheet
- Source: `../guanghu-knowledge-base/src/components/StorageLocationSheet.tsx`
- Category: basic
- Description: authenticated server and repository selection
- Extractable props: `mode`, `authenticated`, `username`, `selectedRepository`
- Hardcoded: privacy explanation and primary action hierarchy
## HumanSettings
- Source: `../guanghu-knowledge-base/src/components/HumanSettings.tsx`
- Category: basic
- Description: device-local preferences and advanced application settings
- Extractable props: `language`, `font`, `readingSize`, `appearance`
- Hardcoded: current data boundary explanation
## OrbitMark
- Source: `../guanghu-knowledge-base/src/styles/app.css`
- Category: basic
- Description: neutral HoloLake brand mark; replaces every `湖` text avatar
- Extractable props: `size`, `status`
- Hardcoded: cyan orbit geometry

View file

@ -0,0 +1,52 @@
# Layouts
## Application shell
Source: `../guanghu-knowledge-base/src/App.tsx`
Current render branch:
```tsx
<div className="hololake-shell">
<header className="platform-topbar">channel title + document search</header>
<div className="platform-body">
<PlatformNavigation />
<section className="platform-workspace">
<div className="knowledge-tabbar" />
<div className="knowledge-module-bar" />
<div className="knowledge-layout">
<aside className="knowledge-sidebar" />
<main className="knowledge-content" />
</div>
{agentPanelOpen && <aside className="agent-drawer"><AgentChat /></aside>}
</section>
</div>
</div>
```
The current shell has too many simultaneous horizontal and vertical control bands. Redesign goal: one platform rail, one channel header, one active module canvas. Tabs, storage state, module actions and document navigation must not all compete in separate bars.
## Platform navigation
Source: `../guanghu-knowledge-base/src/components/PlatformNavigation.tsx`
Current content:
```tsx
<aside className="platform-navigation">
<div className="platform-brand">HoloLake</div>
<button className="channel-selector">Eternal Lake / heartbeat channel</button>
<nav className="platform-route-list">five domain entries</nav>
<div className="module-heading">installed modules</div>
<nav className="platform-module-list">knowledge + education</nav>
<div className="platform-nav-footer">settings + account</div>
</aside>
```
The rail mixes global domains, the active channel and installed modules. Redesign goal: preserve a compact global rail; move active-channel identity into the workspace header; render modules inside the selected channel.
## Agent drawer
Source: `../guanghu-knowledge-base/src/components/AgentChat.tsx`
Current drawer is 380px and overlays the reading canvas. It shows current scope, model badge, settings, runtime tool count, full model form, full Git form, welcome mark, suggestions and composer. Redesign goal: scope + conversation + composer only; advanced configuration moves to Human Settings.

View file

@ -0,0 +1,42 @@
# Page dependency trees
## Fifth Domain / Knowledge channel
Entry: `../guanghu-knowledge-base/src/App.tsx`
Dependencies:
- `src/App.tsx`
- `src/api.ts`
- `src/components/PlatformNavigation.tsx`
- `src/components/SearchBar.tsx`
- `src/components/DocTree.tsx`
- `src/components/Editor.tsx`
- `src/components/VersionHistory.tsx`
- `src/components/AgentChat.tsx`
- `src/components/StorageLocationSheet.tsx`
- `src/components/HumanSettings.tsx`
- `src/styles/app.css`
Desktop render branch is the only branch. The Electron window minimum is 800×600; the primary design viewport is 1280×860.
## Server/account entry
Entry: `src/components/StorageLocationSheet.tsx`
Dependencies:
- Electron preload `../hololake-desktop/electron/preload.ts`
- Electron IPC implementation `../hololake-desktop/electron/main.ts`
- Knowledge remote API `server/index.ts`
- Git engine `server/git-engine.ts`
- Shared controls from `src/styles/app.css`
## Human settings
Entry: `src/components/HumanSettings.tsx`
Dependencies:
- localStorage preference contract in the same file
- shared overlay/control styling in `src/styles/app.css`

View file

@ -0,0 +1,21 @@
# Routes
This Electron/Vite app uses state-based routes inside `src/App.tsx`, not React Router.
| State | Surface | Source |
| --- | --- | --- |
| `fifth` | BingShuo Fifth Domain / Eternal Lake channel | `src/App.tsx` |
| `main` | Guanghu Main Domain entry | `src/App.tsx` |
| `sub` | Industry subdomain entry | `src/App.tsx` |
| `zero` | Experimental domain entry | `src/App.tsx` |
| `zero-sense` | Governance/audit domain entry | `src/App.tsx` |
| `fifth + knowledge` | Knowledge module | `App.tsx`, `DocTree.tsx`, `Editor.tsx` |
| `sub + education` | Education industry staged entry | `src/App.tsx` |
Application-level overlays:
- server/account sign-in and repository selection: `StorageLocationSheet.tsx`;
- human preferences and advanced settings: `HumanSettings.tsx`;
- contextual assistance: `AgentChat.tsx`.
Target redesign route: desktop `fifth + knowledge`, with Agent open and authenticated-user entry visible.

View file

@ -0,0 +1,46 @@
# Theme
## Compact token summary
- Background: `#07111d`
- Primary surface: `#0d1825`
- Secondary surface: `#111e2c`
- Reading surface: `#0b1622`
- Border: `#263648`
- Primary text: `#e8edf3`
- Secondary text: `#c8d1dc`
- Muted text: `#78879a`
- Accent: `#45b7cc`
- Success: `#53c69b`
- Warning: `#d6aa4f`
- Danger: `#e36f72`
- UI font: Inter / SF Pro / PingFang SC
- Reading heading font: Songti SC / Georgia, used only for document content
- Radius: 812px controls, 1618px overlays
- Shadows: overlays only; normal workspace relies on borders and surface contrast
- Density: compact platform chrome, spacious reading content
## Raw source tokens
Source: `../guanghu-knowledge-base/src/styles/app.css`
```css
:root {
--lake-bg: #07111d;
--lake-surface: #0d1825;
--lake-surface-2: #111e2c;
--lake-reading: #0b1622;
--lake-border: #263648;
--lake-border-soft: rgba(119, 148, 174, 0.17);
--lake-text: #e8edf3;
--lake-text-soft: #c8d1dc;
--lake-muted: #78879a;
--lake-accent: #45b7cc;
--lake-accent-soft: rgba(69, 183, 204, 0.13);
--lake-success: #53c69b;
--lake-warning: #d6aa4f;
--lake-danger: #e36f72;
}
```
Design correction: no text glyph is allowed as a logo/avatar. Avoid ornamental serif typography outside the document canvas. Use whitespace, alignment and typography instead of nested bordered boxes.