收口 Rust Web 入口与 AI 写入链

- 将 3000 主入口继续收口到 mnote-web,补齐 /favicon.ico、/api/auth、session alias、AI run 等 Rust Web 路由边界。

- 更新登录页与 Convex Auth 代理,支持测试账号快速登录写入真实 Convex Auth cookie。

- 推进页面设置、Wolai 对齐、Phase 7 AI kernel/CLI-first 设计文档与相关 smoke 脚本。

- 更新 leptos-tiptap 生成资产、mnote-cli/bridge-runtime、前端依赖和 dev/prod 启动脚本。
This commit is contained in:
lix-2026
2026-05-06 21:44:20 +08:00
parent 98b6360595
commit e8ba12e461
86 changed files with 8872 additions and 1716 deletions
+700 -18
View File
@@ -877,32 +877,190 @@ a:hover {
/* ===== 认证页面 ===== */
.mnote-auth {
display: flex;
height: 100vh;
position: relative;
display: grid;
min-height: 100vh;
place-items: center;
padding: 48px 20px;
background: #FFFFFF;
}
.mnote-auth-brand {
position: fixed;
top: 28px;
left: 34px;
display: inline-flex;
align-items: center;
gap: 10px;
color: #37352F;
font-size: 18px;
font-weight: 650;
letter-spacing: 0;
}
.mnote-auth-brand:hover {
color: #37352F;
}
.mnote-auth-brand-mark {
display: inline-flex;
width: 32px;
height: 32px;
align-items: center;
justify-content: center;
background: var(--wolai-bg);
}
.mnote-auth-card {
text-align: center;
padding: 48px 32px;
max-width: 340px;
}
.mnote-auth-card h1 {
font-size: 32px;
border-radius: 6px;
background: #37352F;
color: #FFF;
font-size: 18px;
font-weight: 700;
color: var(--wolai-text-primary);
margin-bottom: 8px;
line-height: 1;
}
.mnote-auth-card p {
color: var(--wolai-text-secondary);
font-size: 15px;
.mnote-auth-panel {
width: min(100%, 360px);
color: #37352F;
}
.mnote-auth-heading {
margin-bottom: 30px;
text-align: center;
}
.mnote-auth-heading h1 {
margin: 0 0 8px;
color: #37352F;
font-size: 28px;
font-weight: 650;
line-height: 1.25;
letter-spacing: 0;
}
.mnote-auth-heading p {
color: #9B9A97;
font-size: 14px;
line-height: 1.5;
}
.mnote-auth-form {
display: grid;
gap: 12px;
}
.mnote-auth-field {
display: grid;
gap: 7px;
color: #6D6D69;
font-size: 13px;
line-height: 1.3;
}
.mnote-auth-field input {
width: 100%;
height: 42px;
border: 1px solid #DCDAD6;
border-radius: 4px;
background: #FFF;
color: #37352F;
font: 400 15px/1.4 var(--wolai-font-sans);
letter-spacing: 0;
outline: none;
padding: 0 12px;
}
.mnote-auth-field input::placeholder {
color: #B5B1AA;
}
.mnote-auth-field input:focus {
border-color: #A8A39A;
box-shadow: 0 0 0 2px rgba(55, 53, 47, 0.08);
}
.mnote-auth-message {
min-height: 20px;
color: #9B9A97;
font-size: 13px;
line-height: 20px;
text-align: center;
}
.mnote-auth-message[data-type="error"] {
color: #D14343;
}
.mnote-auth-message[data-type="success"] {
color: #23834D;
}
.mnote-auth-submit {
width: 100%;
height: 42px;
border: 0;
border-radius: 4px;
background: #37352F;
color: #FFF;
cursor: pointer;
font: 600 15px/1 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-submit:hover {
background: #2F2D29;
}
.mnote-auth-submit:disabled {
cursor: default;
opacity: .58;
}
.mnote-auth-quick-login {
width: 100%;
height: 42px;
border: 1px solid #DCDAD6;
border-radius: 4px;
background: #FFF;
color: #37352F;
cursor: pointer;
font: 500 14px/1 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-quick-login:hover {
background: #F7F7F5;
}
.mnote-auth-quick-login:disabled {
cursor: default;
opacity: .58;
}
.mnote-auth-switch {
display: block;
margin: 18px auto 0;
border: 0;
background: transparent;
color: #6D6D69;
cursor: pointer;
font: 400 14px/1.4 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-switch:hover {
color: #37352F;
}
@media (max-width: 640px) {
.mnote-auth {
align-items: start;
padding-top: 132px;
}
.mnote-auth-brand {
top: 24px;
left: 22px;
}
}
/* ===== ProseMirror 兼容 ===== */
.ProseMirror {
white-space: pre-wrap;
@@ -1875,6 +2033,515 @@ body {
font-size: 18px;
}
.document-shell[data-page-wide-layout="true"] {
width: min(100%, 980px);
}
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror,
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror li {
font-size: 15px;
line-height: 22px;
}
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ul,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ol,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror blockquote {
margin-bottom: 4px;
}
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ul,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ol,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror blockquote {
margin-bottom: 14px;
}
.document-shell[data-page-font="song"] .document-title-input,
.document-shell[data-page-font="song"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
font-family: "Noto Serif SC", "Songti SC", serif;
}
.document-shell[data-page-font="kai"] .document-title-input,
.document-shell[data-page-font="kai"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
font-family: "STKaiti", "KaiTi", serif;
}
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
counter-reset: mnote-heading;
}
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h1::before,
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h2::before,
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h3::before {
counter-increment: mnote-heading;
content: counter(mnote-heading) ". ";
color: #8B8782;
font-weight: 500;
}
.wolai-page-settings-popover {
position: fixed;
top: 52px;
right: 18px;
z-index: 90;
}
.wolai-page-settings-panel {
width: min(360px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 12px;
padding: 14px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 14px;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0 18px 48px rgba(27, 28, 28, 0.12);
}
.wolai-page-settings-tabs {
display: flex;
gap: 6px;
}
.wolai-page-settings-tab {
height: 30px;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: #6D6A65;
font-size: 13px;
cursor: pointer;
}
.wolai-page-settings-tab.is-active {
background: #F4F3F3;
color: #1B1C1C;
font-weight: 600;
}
.wolai-page-settings-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.wolai-page-settings-section[hidden] {
display: none !important;
}
.wolai-page-setting-row {
min-height: 48px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 0;
}
.wolai-page-setting-row.is-pending {
opacity: 0.72;
}
.wolai-page-setting-copy {
display: flex;
min-width: 0;
flex-direction: column;
gap: 3px;
}
.wolai-page-setting-label {
color: #1B1C1C;
font-size: 14px;
line-height: 20px;
}
.wolai-page-setting-hint,
.wolai-page-settings-global-note {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-setting-checkbox {
width: 16px;
height: 16px;
flex: 0 0 auto;
}
.wolai-page-setting-select {
min-width: 96px;
height: 30px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 8px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
}
.wolai-page-settings-actions {
display: flex;
flex-direction: column;
gap: 6px;
padding-top: 4px;
border-top: 1px solid rgba(27, 28, 28, 0.06);
}
.wolai-page-settings-action {
min-height: 34px;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: #1B1C1C;
font-size: 13px;
cursor: pointer;
}
.wolai-page-settings-action:hover {
background: #F4F3F3;
}
.wolai-page-settings-action.is-disabled {
color: #A19D97;
cursor: not-allowed;
}
.wolai-page-settings-action.is-danger {
color: #C44B55;
}
.wolai-page-settings-stats {
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
padding-top: 4px;
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-history-drawer {
position: fixed;
inset: 0;
z-index: 88;
background: rgba(27, 28, 28, 0.04);
}
.wolai-page-history-drawer[hidden] {
display: none !important;
}
.wolai-page-history-panel {
position: absolute;
top: 16px;
right: 16px;
bottom: 16px;
width: min(380px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 14px;
padding: 16px;
border-left: 1px solid rgba(27, 28, 28, 0.08);
background: #FFF;
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.12);
}
.wolai-page-history-header,
.wolai-page-share-header,
.wolai-page-ai-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.wolai-page-history-title,
.wolai-page-share-title,
.wolai-page-ai-title {
color: #1B1C1C;
font-size: 16px;
font-weight: 600;
line-height: 24px;
}
.wolai-page-history-subtitle,
.wolai-page-share-subtitle,
.wolai-page-ai-subtitle {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-surface-close {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 8px;
background: transparent;
color: #5A5A5A;
cursor: pointer;
}
.wolai-surface-close:hover {
background: #F4F3F3;
}
.wolai-page-history-list {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
overflow: auto;
}
.wolai-page-history-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 10px;
background: #FFF;
}
.wolai-page-history-item-title {
color: #1B1C1C;
font-size: 13px;
font-weight: 500;
line-height: 20px;
}
.wolai-page-history-item-meta,
.wolai-page-history-empty,
.wolai-page-share-copy,
.wolai-page-share-footer,
.wolai-page-ai-empty,
.wolai-page-ai-message-role {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-history-item-ghost,
.wolai-page-ai-ghost,
.wolai-page-ai-tab,
.wolai-page-ai-model-chip,
.wolai-page-share-copy-button {
height: 30px;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: #F4F3F3;
color: #1B1C1C;
font-size: 12px;
cursor: pointer;
}
.wolai-page-share-dialog {
position: fixed;
inset: 0;
z-index: 92;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(27, 28, 28, 0.12);
}
.wolai-page-share-dialog[hidden] {
display: none !important;
}
.wolai-page-share-card {
width: min(460px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 16px;
padding: 18px;
border-radius: 16px;
background: #FFF;
box-shadow: 0 18px 48px rgba(27, 28, 28, 0.18);
}
.wolai-page-share-state {
display: flex;
flex-direction: column;
gap: 8px;
}
.wolai-public-pill--inline {
width: fit-content;
}
.wolai-page-share-url-row {
display: flex;
gap: 8px;
}
.wolai-page-share-url {
flex: 1 1 auto;
height: 34px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 8px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
}
.wolai-page-ai-drawer {
position: fixed;
top: 12px;
right: 12px;
bottom: 12px;
z-index: 89;
}
.wolai-page-ai-drawer[hidden] {
display: none !important;
}
.wolai-page-ai-panel {
width: min(440px, calc(100vw - 24px));
height: 100%;
display: flex;
flex-direction: column;
gap: 14px;
padding: 16px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 18px;
background: rgba(255, 255, 255, 0.98);
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.14);
}
.wolai-page-ai-header-copy {
display: flex;
flex-direction: column;
gap: 4px;
}
.wolai-page-ai-body {
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 16px;
}
.wolai-page-ai-suggestions {
display: flex;
flex-direction: column;
gap: 10px;
}
.wolai-page-ai-suggestions-header,
.wolai-page-ai-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.wolai-page-ai-suggestion-list,
.wolai-page-ai-toolbar {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.wolai-page-ai-suggestion {
min-height: 32px;
padding: 8px 10px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 10px;
background: #FFF;
color: #1B1C1C;
font-size: 12px;
text-align: left;
cursor: pointer;
}
.wolai-page-ai-conversation {
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
overflow: auto;
}
.wolai-page-ai-message {
display: flex;
flex-direction: column;
gap: 4px;
padding: 10px 12px;
border-radius: 12px;
background: #F7F7F7;
}
.wolai-page-ai-message--user {
background: #F4F8FF;
}
.wolai-page-ai-message-text {
color: #1B1C1C;
font-size: 13px;
line-height: 20px;
white-space: pre-wrap;
}
.wolai-page-ai-footer {
display: flex;
flex-direction: column;
gap: 10px;
}
.wolai-page-ai-tab.is-active {
background: #1B1C1C;
color: #FFF;
}
.wolai-page-ai-input-row {
display: flex;
gap: 8px;
align-items: flex-end;
}
.wolai-page-ai-input {
flex: 1 1 auto;
min-height: 88px;
padding: 10px 12px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 12px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
line-height: 20px;
resize: none;
}
.wolai-page-ai-send {
width: 36px;
height: 36px;
border: 0;
border-radius: 10px;
background: #1B1C1C;
color: #FFF;
font-size: 16px;
cursor: pointer;
}
@media (max-width: 768px) {
.mnote-sidebar,
.wolai-sidebar {
@@ -1885,6 +2552,15 @@ body {
padding: 0 12px;
}
.wolai-page-settings-popover {
right: 12px;
}
.wolai-page-history-panel,
.wolai-page-ai-panel {
width: min(100vw - 24px, 420px);
}
.wolai-public-pill,
.wolai-breadcrumb-root,
.wolai-breadcrumb-separator {
@@ -1930,6 +2606,12 @@ body {
.wolai-topbar-actions {
gap: 2px;
}
.wolai-page-settings-panel,
.wolai-page-share-card,
.wolai-page-ai-panel {
width: calc(100vw - 24px);
}
}
"##;