Repository navigation
Conversation
- Vite 5 to 8, @vitejs/plugin-vue 5 to 6; clears 7 known vulnerabilities in transitive build deps (vite, esbuild, postcss, nanoid, source-map-js); pnpm audit is now clean - Bump dompurify to 3.4.17, Vue to 3.5.44 (includes @vue/server-renderer security fix), marked to 18.1.1 - Migrate the icon library from lucide-vue-next to the officially maintained @lucide/vue; icon names and rendering stay unchanged - CI frontend job now audits production dependencies (pnpm audit --prod --audit-level=high) - vite.config.ts switches to vitest/config and registers the @ alias plus the tests/unit include glob, preparing the vitest stack - Login form gains autocomplete attributes (username / current-password) so password managers recognize it
- New tests/unit/ vitest stack (happy-dom) alongside the existing node --test *.test.cjs harness; pnpm test runs both - Covers the request helper, router/nav consistency, UiIcon mapping and the useAuth composable
- All routes except the home dashboard are now lazy route-level dynamic imports derived from nav.ts; datepicker styles load with the pages that need them. First-screen JS drops from ~858KB (gzip 291KB) to ~187KB (gzip 69KB), first-screen CSS from ~221KB to ~43KB - Pause background polling while the tab is hidden and resume on return: epochs 60s snapshot, llm-config 5s status poll, cron dashboard 30s refresh, status-bar heartbeat clock; a hidden tab no longer submits snapshot jobs or status requests to the bot process - Exponential backoff on consecutive poll failures: llm-config 5s doubling up to 30s, cron dashboard 30s up to 120s, diagnostic result reads 1s up to 10s; success resets the cadence - Epochs dashboard dedupes in-flight snapshot refreshes, and the timeline cursor moves through a lightweight incremental channel instead of resetting the whole chart option - Logs-live precomputes level colors at ingest; logs-trace keeps events ordered at insert instead of re-sorting per event - Load-more lists (conversations, quotes, tieba pool) stop at a 500-entry soft cap and point to keyword filtering - Remove the unused useAsyncData composable
- Page-header action groups wrap onto their own row on narrow screens, so save/create/install buttons stay reachable without horizontal scrolling; epochs, llm-usage and tieba pages no longer overflow sideways - Audit log switches from a squeezed table to per-entry cards on mobile, with full action/target badges and expandable before/after summaries - Persona list, group-LLM override list and the config file list no longer collapse into tiny inner scroll windows on phones; group selectors take a full row - Empty states and wording pass: selection hints for memory/quotes, cron dashboard distinguishes bot-not-reporting vs stale snapshot vs no tasks, diagnostics shows an explicit banner when the bot is offline, stats explains data provenance, logs-archive stops double prompting, logs-live reports connected-but-waiting, direction-neutral wording for personas/skills/tieba/logs-archive - Tieba sync-all asks for confirmation before firing multi-round external fetching - LLM config channel list becomes a native select on narrow screens (with protocol, model count and disabled marker); skill preset sync title no longer breaks mid-word - Light-theme warn badge text darkened to readable contrast (dark theme unchanged); niuniu text-mode select gains a placeholder - llm-config.test.cjs gains the polling backoff and hidden-tab cases pinning the store changes from the perf commit
- Summary reading view: the report body no longer gets squeezed into a small inner pane; toolbar and health cards hide while reading, the body card follows content height and the whole page scrolls; entering reading scrolls to top, returning restores the list scroll position - LLM config page scrolls at page level end to end: the viewport lock and per-section inner scroll panes are gone, the side nav and channel list stick to the viewport top instead, and the old 60vh patch chain is removed; raw-content caps (JSON preview, MCP tool list) stay - Remove the page-view-fill lock chain from config, skills, llm-about and conversations: left list panels become sticky, editors keep the agreed 55-60vh min height, and mobile breakpoints are unchanged. Skills desktop no longer crushes the file table to one line (48px) and the editor to a third of the screen when a file is open - App.vue: drop the now-consumer-less :has(> .page-view-fill) rule and register the __qqToggleTheme debug hook in dev builds only
- New frontend/README.md as the entry point for the Web Admin frontend module: stack, directory conventions, dev commands, the dual test stacks and the deployment shape - docs/dev/architecture.md documents the frontend/ engineering layer; docs/dev/style.md records the nav.ts single-source-of-truth and vitest-first testing conventions; docs/index.md links the new entry
- An aborted sync stream no longer fires onDone/onMessage: closing the old stream on re-entry or unmount previously let its async completion clobber the new stream's state (handle cleared, syncing reset, extra onSynced refresh) and fired callbacks after the component was gone - HTTP errors (401/403/405/500) now surface as a status line in the sync log instead of silently reporting completion
- Soft-cap notice no longer masks the end-of-list hint in tieba and conversations when the server actually has no more entries - Epochs dashboard: a manual snapshot click colliding with an in-flight auto refresh now shows loading feedback instead of being silently dropped - Cron dashboard: snapshot staleness now re-evaluates on every poll cycle while the page stays open, so the empty state flips to the stale variant when the bot dies mid-session - frontend README: views/ holds 29 routed pages plus the statically imported login gate, not 30
3aKHP
force-pushed
the
fix/web-admin-frontend-overhaul
branch
from
October 19, 2026 20:54
076ee1e to
8d324a4
Compare
Owner
Author
|
评审汇合(Deep-CR 五透镜 + 独立 Tier-1 CR + 交叉复核)后的修复轮,新 head: 七轨评审结论:无 Blocking。本 PR 侧已修复:
验证:vue-tsc 零错;59+26 双栈全绿;build 通过;后端 pytest 2925 全过(堆叠含 #307 修复)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
Web Admin 前端全面排查修复,覆盖移动端适配、长文阅读视图、性能(首屏分包 + 轮询治理)、构建工具链与测试基建。配套真实生产数据完成了两轮全站浏览器实测(29 路由 × 桌面/移动端)逐页验收。
堆叠关系:base 为 #307(
fix/web-admin-security)——本分支的两个 vitest 用例依赖其api/index.ts的BASE导出与useAuth新行为。#307 合并后本 PR 自动改指dev,diff 即收拢为下列 6 个 commit。commits:
feat(build): upgrade frontend toolchain to Vite 8— Vite 5→8、plugin-vue 5→6,消除工具链传递依赖 7 条已知漏洞(pnpm audit清零);dompurify 3.4.17 / Vue 3.5.44 / marked 18.1.1;图标库迁移至官方@lucide/vue;CI 新增生产依赖审计;登录表单补 autocomplete。feat(test): add vitest unit test stack—tests/unit/vitest 栈(happy-dom),与既有node --test双栈并行;覆盖请求封装、路由/导航一致性、UiIcon 映射与 useAuth。perf(web-admin): code splitting and polling control— 除首页外全部路由级动态 import,首屏 JS 约 858KB(gzip 291KB)→187KB(gzip 69KB)、CSS 221KB→43KB;标签页隐藏时暂停全部轮询/心跳;轮询失败指数退避;纪元看板在飞去重与时间轴光标增量通道;实时日志级别着色预计算、Trace 插入即保序;长列表 500 条软上限。fix(ui): mobile layout and empty-state fixes— 移动端页头操作区换行、纪元/用量/贴吧横向溢出、审计卡片化、各列表小滚动窗解放;空态与文案一致性一批;LLM 配置 Providers/MCP 面板定价与删除/重命名联动修复等。fix(ui): reading view and lock-chain cleanup— 总结页阅读视图整页滚动;LLM 配置页拆锁改页面级滚动;Config/Skills/资料/对话四页拆除视口锁高链(Skill 页文件表曾被压成 48px 一行高、编辑器仅 1/3 屏);编辑器 min-height 统一 55/60vh 约定。docs: add frontend module docs and sync references— 新增frontend/README.md,architecture/style/index 同步。验证
vue-tsc零错误;node --test59/59 + vitest 26/26(其中一次连跑中 cjs 出现 1 例偶发失败,单独连跑 4 次全绿,疑为竞态用例在并行负载下的时序敏感,留 CI 复核);vite build成功。ruff全过、pytest tests/unit2923 全过;validate_toml_examples.py与 self-docs 引用同步检查通过。scripts/check/deep-cr-trigger.sh dev:trigger=true,与 fix(security): Web Admin 登录限流、会话与 API 表面安全加固 #307 合并范围一并按 Huge 流程组织 Deep-CR 与独立 CR,结论汇总后请求人工合并。CHANGELOG 草稿
变更
pnpm audit现已清零。构建产物结构不变,对部署与使用无影响。修复
__qqToggleTheme仅在开发环境注册,生产构建不再向 window 暴露。frame-ancestors的非法指令值导致的浏览器控制台报错(随 fix(security): Web Admin 登录限流、会话与 API 表面安全加固 #307 的响应头一并生效)。