feat: restore mentor page to final day/night spec

Rebuild the mentor workspace per the approved final design (day.png/night.png):
- mentorView gets a dedicated full-width immersive shell (independent 56px
  top bar with page title slot + theme mode text, hidden module-nav/market
  tape/overview/status bar) scoped to body[data-active-view=mentorView].
- Assistant messages become borderless body text with name/time above; only
  user messages use a blue bubble; keep loading/error/streaming caret states.
- 4 quick topics stay visible with history; composer restored to a framed
  ~94px card with bottom-left shortcut hint and bottom-right send button.
- Directory tools merged into one row (search + filter menu + sort); the
  filter menu still offers all/A/B/C; list selected state is an inset rounded
  fill; contact rows are borderless 75px items.
- Chat header always shows pin/note/profile/clear; pin reuses /api/mentors/
  preferences; theme toggle stays the single #themeToggle.
- Night tokens match the spec including the two distinct blues (#316FEF link,
  #5B8DEF quote/selected icon). Mobile (<768) stacks panels with no horizontal
  overflow; 1024+ follows the desktop spec.
- Update stale test baselines (300px sidebar, 94px composer, hint presence,
  night bubble color, centered disclaimer) and regenerate the architecture
  inventory.

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
MS-01-Codex
2026-08-18 11:54:57 +08:00
co-authored by multica-agent
parent 33f9db43b1
commit 8ac3adbb5d
12 changed files with 1118 additions and 465 deletions
+124
View File
@@ -3222,3 +3222,127 @@ body.sidebar-collapsed .status-bar {
display: none;
}
}
/* Dedicated mentor workspace (final day/night spec). Only the active mentor
view enables this immersive state; other pages keep the canonical shell. */
.app-page-context {
min-width: 0;
flex: 1 1 auto;
flex-direction: column;
justify-content: center;
gap: 2px;
display: none;
}
#themeModeText {
display: none;
}
.app-page-context strong {
overflow: hidden;
color: var(--text-primary);
font-size: 18px;
font-weight: var(--font-weight-semibold);
line-height: 1.3;
text-overflow: ellipsis;
white-space: nowrap;
}
.app-page-context span {
overflow: hidden;
color: var(--text-secondary);
font-size: 13px;
line-height: 1.4;
text-overflow: ellipsis;
white-space: nowrap;
}
@media (min-width: 1024px) {
body[data-active-view="mentorView"] .main {
width: 100%;
min-width: 0;
margin-left: 0;
height: 100dvh;
display: flex;
flex-direction: column;
overflow: hidden;
}
body[data-active-view="mentorView"] .module-nav {
display: none;
}
body[data-active-view="mentorView"] .status-bar {
display: none;
}
body[data-active-view="mentorView"] .market-tape,
body[data-active-view="mentorView"] .mobile-page-context {
display: none;
}
body[data-active-view="mentorView"] .overview-strip {
display: none;
}
body[data-active-view="mentorView"] .app-header {
flex: 0 0 56px;
height: 56px;
min-height: 56px;
gap: 24px;
padding: 0 20px;
background: #F5F6F7;
}
:root[data-theme="dark"] body[data-active-view="mentorView"] .app-header {
background: #141519;
}
body[data-active-view="mentorView"] .app-page-context {
display: flex;
}
body[data-active-view="mentorView"] .header-actions > :is(.global-search-button, .alert-button, .assistant-button, .header-menu-button) {
display: none;
}
body[data-active-view="mentorView"] .theme-toggle {
width: auto;
height: 32px;
min-height: 32px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 12px;
border-radius: var(--radius-md);
background: transparent;
color: var(--text-secondary);
font-size: var(--font-size-label);
font-weight: var(--font-weight-medium);
}
body[data-active-view="mentorView"] .theme-toggle .lucide {
width: 16px;
height: 16px;
}
body[data-active-view="mentorView"] #themeModeText {
display: inline-block;
}
body[data-active-view="mentorView"] .app-main {
flex: 1 1 auto;
height: calc(100dvh - 56px);
min-height: 0;
display: flex;
flex-direction: column;
padding: 0;
overflow: hidden;
}
body[data-active-view="mentorView"] .workspace-view.active-view {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
}
+5
View File
@@ -60,6 +60,7 @@
const page = registry.get(viewId);
const navigationId = page?.navigation_alias || viewId;
const marketView = page?.group === "market";
const previousActiveView = document.body.dataset.activeView;
document.body.dataset.activeView = viewId;
const mobileGroup = document.querySelector("#mobilePageGroup");
const mobileTitle = document.querySelector("#mobilePageTitle");
@@ -69,6 +70,10 @@
: page?.group === "personal" ? "复盘" : "工具";
}
if (mobileTitle) mobileTitle.textContent = page?.title || "小白复盘";
const pageTitle = document.querySelector("#currentPageTitle");
if (pageTitle) pageTitle.textContent = page?.title || "小白复盘";
const pageSubtitle = document.querySelector("#currentPageSubtitle");
if (pageSubtitle && previousActiveView !== viewId) pageSubtitle.textContent = "";
document.querySelectorAll(".module-tab").forEach((button) => {
button.classList.toggle("active", button.dataset.view === navigationId);
button.classList.toggle(
+2
View File
@@ -13,6 +13,8 @@ function syncThemeControl() {
button.setAttribute("aria-label", label);
button.setAttribute("aria-pressed", String(dark));
button.querySelector("i")?.setAttribute("data-lucide", dark ? "sun" : "moon");
const modeText = document.querySelector("#themeModeText");
if (modeText) modeText.textContent = dark ? "夜间模式" : "日间模式";
}
function clearThemeTransitionEffects() {
+4 -5
View File
@@ -219,13 +219,12 @@
--dragon-profile-weight-strong: 750;
--dragon-profile-weight-semibold: 600;
--mentor-directory-width: 280px;
--mentor-profile-width: 272px;
--mentor-pane-header-height: 58px;
--mentor-avatar-size: 38px;
--mentor-directory-width: 300px;
--mentor-pane-header-height: 60px;
--mentor-avatar-size: 42px;
--mentor-profile-avatar-size: 68px;
--mentor-composer-min-height: 94px;
--mentor-message-max-width: 82%;
--mentor-message-max-width: 60%;
--chart-background: #fbfcfd;
--chart-grid: #e2e8ec;