diff --git a/docs/app/assistant.md b/docs/app/assistant.md index 74a6c52..234f529 100644 --- a/docs/app/assistant.md +++ b/docs/app/assistant.md @@ -42,3 +42,9 @@ description: 多轮对话、文件处理与操作计划,核对后通过现有 `mock` 用于离线示例和自动化验收,真实服务失败不会自动切换为 mock 或发布内容。`pnpm verify:ai` 使用临时数据库和模型 stub 验证权限、计划、附件和重复提交,不访问外网。 相关功能:[课件](courseware.md)、[课表](schedules.md)、[作业](homeworks.md)、[通知](notifications.md)、[角色与权限](../dev/permissions.md)。 + +## 对话与轮次 + +对话历史按账号保存在服务器。每次发送是一轮,右侧横条可跳转轮次,新对话独立保存。助手缺少必要信息时会显示问题卡片,可选答案或在输入框自由回答;追问阶段不执行写入。格式自动修正每轮至多一次,失败后保留明确的重试入口。 + +勾选“本轮明确替换当前待确认计划”后,新计划形成时只使选中的旧计划失效,历史记录保留。不勾选时保留旧计划;新建对话不影响其他对话的计划。 diff --git a/docs/app/courseware.md b/docs/app/courseware.md index 7e9f72d..6f58b5c 100644 --- a/docs/app/courseware.md +++ b/docs/app/courseware.md @@ -40,3 +40,7 @@ 使用反向代理时,需允许课件上传大小和足够的读写超时。仓库的 Nginx 样例单独为 `/api/courseware/` 配置 512 MB 和 1800 秒超时,其他接口维持原有大小限制。 开发验收:`pnpm verify:courseware` 自动使用隔离数据库和临时文件目录,不读取或向真实班级发送课件。 + +## 文件夹浏览 + +课件默认按文件夹逐层浏览,只显示当前层文件和直属子目录。使用面包屑或返回上级切换目录;多位教师的目录按教师身份区分。上传与新建目录默认使用当前位置,未分类文件位于根目录。日期归档视图仍可用于按日期查找文件。 diff --git a/docs/app/schedules.md b/docs/app/schedules.md index cf23ed1..9f40135 100644 --- a/docs/app/schedules.md +++ b/docs/app/schedules.md @@ -51,3 +51,9 @@ Web 管理端统一从「教学事务 → 课表档案」查看周课表并编 离线导入完整 ClassIsland 档案可创建班级自有作息,不依赖在线联动插件。 完整导入保留 1–9 周轮换、空课、停用、群组和预定;旧预览界面的单双周展示不代表新模型只能表达双周。 见[表格与课表导入](imports.md)。修改后广播 schedule:updated,客户端刷新。 + +## 每日作息差异 + +导入的每日作息不一致时,时间表按日期生成独立子表,同日单双周也可分别维护。子表独立保存完整作息,父级用于归组。周视图按课时对齐;点击日期或课程后,时间列显示对应日期的作息,点击时间列标题清除选择后显示带星期标记的差异时间。切换子表保留可对应的课程,节数不足时阻止切换并保留原草稿。 + +导入或保存时间表时自动补齐两节课之间的空白,包括午休。已有命名休息、活动及显式空课保留,不在最后一节之后追加休息。旧混合时间表请使用原文件预览后重新导入,不自动猜测空课归属。 diff --git a/docs/screenshots/assistant-agent-mobile-dark.png b/docs/screenshots/assistant-agent-mobile-dark.png index 1e9520a..ceab970 100644 Binary files a/docs/screenshots/assistant-agent-mobile-dark.png and b/docs/screenshots/assistant-agent-mobile-dark.png differ diff --git a/docs/screenshots/assistant-client-cache.png b/docs/screenshots/assistant-client-cache.png index 3c1cfab..23e9d12 100644 Binary files a/docs/screenshots/assistant-client-cache.png and b/docs/screenshots/assistant-client-cache.png differ diff --git a/docs/screenshots/assistant-plan.png b/docs/screenshots/assistant-plan.png index 7cd5df8..e67b54f 100644 Binary files a/docs/screenshots/assistant-plan.png and b/docs/screenshots/assistant-plan.png differ diff --git a/docs/screenshots/desktop-responsive/main-1000-dark.png b/docs/screenshots/desktop-responsive/main-1000-dark.png new file mode 100644 index 0000000..4966ea2 Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1000-dark.png differ diff --git a/docs/screenshots/desktop-responsive/main-1000-light.png b/docs/screenshots/desktop-responsive/main-1000-light.png new file mode 100644 index 0000000..a1db36a Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1000-light.png differ diff --git a/docs/screenshots/desktop-responsive/main-1242-dark.png b/docs/screenshots/desktop-responsive/main-1242-dark.png new file mode 100644 index 0000000..3a93e2a Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1242-dark.png differ diff --git a/docs/screenshots/desktop-responsive/main-1242-light.png b/docs/screenshots/desktop-responsive/main-1242-light.png new file mode 100644 index 0000000..b138e77 Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1242-light.png differ diff --git a/docs/screenshots/desktop-responsive/main-1920-dark.png b/docs/screenshots/desktop-responsive/main-1920-dark.png new file mode 100644 index 0000000..53352b9 Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1920-dark.png differ diff --git a/docs/screenshots/desktop-responsive/main-1920-light.png b/docs/screenshots/desktop-responsive/main-1920-light.png new file mode 100644 index 0000000..5e3934a Binary files /dev/null and b/docs/screenshots/desktop-responsive/main-1920-light.png differ diff --git a/docs/screenshots/plan-editor-list.png b/docs/screenshots/plan-editor-list.png index d887148..c7ec0f4 100644 Binary files a/docs/screenshots/plan-editor-list.png and b/docs/screenshots/plan-editor-list.png differ diff --git a/docs/screenshots/plan-editor-live-api.png b/docs/screenshots/plan-editor-live-api.png index 89fdc4a..216aa0b 100644 Binary files a/docs/screenshots/plan-editor-live-api.png and b/docs/screenshots/plan-editor-live-api.png differ diff --git a/docs/screenshots/plan-editor-shell.png b/docs/screenshots/plan-editor-shell.png index dec2a5d..81c0c1d 100644 Binary files a/docs/screenshots/plan-editor-shell.png and b/docs/screenshots/plan-editor-shell.png differ diff --git a/docs/screenshots/plan-editor-timeline.png b/docs/screenshots/plan-editor-timeline.png index 1a84acd..2f82ce7 100644 Binary files a/docs/screenshots/plan-editor-timeline.png and b/docs/screenshots/plan-editor-timeline.png differ diff --git a/docs/screenshots/plan-editor-yaml.png b/docs/screenshots/plan-editor-yaml.png index d59ebb5..77f1330 100644 Binary files a/docs/screenshots/plan-editor-yaml.png and b/docs/screenshots/plan-editor-yaml.png differ diff --git a/docs/screenshots/responsive-1366.png b/docs/screenshots/responsive-1366.png new file mode 100644 index 0000000..92e95cb Binary files /dev/null and b/docs/screenshots/responsive-1366.png differ diff --git a/docs/screenshots/responsive-1920.png b/docs/screenshots/responsive-1920.png new file mode 100644 index 0000000..af8f682 Binary files /dev/null and b/docs/screenshots/responsive-1920.png differ diff --git a/docs/screenshots/responsive-360.png b/docs/screenshots/responsive-360.png new file mode 100644 index 0000000..6742383 Binary files /dev/null and b/docs/screenshots/responsive-360.png differ diff --git a/docs/screenshots/responsive-768.png b/docs/screenshots/responsive-768.png new file mode 100644 index 0000000..057602a Binary files /dev/null and b/docs/screenshots/responsive-768.png differ diff --git a/docs/screenshots/shared-calendar-dark-care.png b/docs/screenshots/shared-calendar-dark-care.png index b9cd359..041a202 100644 Binary files a/docs/screenshots/shared-calendar-dark-care.png and b/docs/screenshots/shared-calendar-dark-care.png differ diff --git a/docs/screenshots/shared-calendar.png b/docs/screenshots/shared-calendar.png index 0cdbca6..03578e9 100644 Binary files a/docs/screenshots/shared-calendar.png and b/docs/screenshots/shared-calendar.png differ diff --git a/packages/desktop-client/src/main/smoke-quick.ts b/packages/desktop-client/src/main/smoke-quick.ts index f52a1ac..00e6001 100644 --- a/packages/desktop-client/src/main/smoke-quick.ts +++ b/packages/desktop-client/src/main/smoke-quick.ts @@ -83,6 +83,59 @@ export async function runQuickSmoke(win: BrowserWindow): Promise { return result.detail; }); } + await check('主窗口最小与常规尺寸、深浅主题及关怀字号无页面横向溢出', async () => { + const bounds = win.getContentBounds(); + const appearance = await win.webContents.executeJavaScript( + `({className:document.documentElement.className,style:document.documentElement.getAttribute('style')})`, + ); + const shots = path.resolve(app.getAppPath(), '../../docs/screenshots/desktop-responsive'); + fs.mkdirSync(shots, { recursive: true }); + await win.webContents.executeJavaScript('window.__classhelperSmoke__.islandEditorSmoke(true)'); + try { + for (const [width, height] of [ + [1000, 540], + [1242, 582], + [1920, 1080], + ]) + for (const theme of ['light', 'dark']) { + win.setContentSize(width!, height!); + await win.webContents.executeJavaScript( + `document.documentElement.classList.toggle('dark',${theme === 'dark'});document.documentElement.classList.toggle('care-mode',${theme === 'dark'});document.documentElement.style.setProperty('--ch-font-scale',${JSON.stringify(theme === 'dark' ? '1.5' : '1')})`, + ); + for (const route of [ + '/schedule', + '/homeworks', + '/notifications', + '/grades', + '/courseware', + '/settings/general', + '/settings/appearance', + '/settings/island', + '/settings/island/editor', + '/settings/reminder', + '/settings/account', + '/settings/about', + ]) { + await win.webContents.executeJavaScript(`location.hash=${JSON.stringify('#' + route)}`); + await new Promise((resolve) => setTimeout(resolve, 150)); + if ( + !(await win.webContents.executeJavaScript('document.documentElement.scrollWidth<=innerWidth+1')) + ) + throw new Error(`${route} ${width} ${theme} 页面溢出`); + } + fs.writeFileSync( + path.join(shots, `main-${width}-${theme}.png`), + (await win.webContents.capturePage()).toPNG(), + ); + } + } finally { + await win.webContents.executeJavaScript( + `document.documentElement.className=${JSON.stringify(appearance.className)};document.documentElement.setAttribute('style',${JSON.stringify(appearance.style || '')});window.__classhelperSmoke__.islandEditorSmoke(false)`, + ); + win.setContentSize(bounds.width, bounds.height); + } + return '1000×540、1242×582、1920×1080,截图保存在 docs/screenshots/desktop-responsive'; + }); await verifyAgentSmoke(check); await verifyLayoutSmoke(check); await verifyCoursewareSmoke(check); diff --git a/packages/desktop-client/src/renderer/views/CoursewareView.vue b/packages/desktop-client/src/renderer/views/CoursewareView.vue index baeeebf..281c1b9 100644 --- a/packages/desktop-client/src/renderer/views/CoursewareView.vue +++ b/packages/desktop-client/src/renderer/views/CoursewareView.vue @@ -1,5 +1,5 @@