fix: 优化控制台侧边栏载入速度并统一主区域右侧淡入划入 - #3
Merged
Merged
Conversation
原因: Pin 队列两条缺陷约束——Q-01/Q-02(问答进度)与 S-01/Q-03(Pages 展示态) 内容: - 问答: computeSessionProgress 补 skipped 桶,四桶之和恒等于 total; 进度条改多色段(已答 lagoon/跳过琥珀/已取消红),紧凑读数收敛为 「已答/总计」,明细移入 Hover/点击聚焦的 Tooltip 卡片 - 预览: Pages 展示态悬浮卡片按登录态隔离,未登录仅保留可渲染页面与 高级资源切换视图,隐藏版本列表、设为生效、Fork 与控制台跳转入口; 展开动效由 zoom-in-95 改为 slide-in-from-top-2 自上而下流动 影响: 仅 web 前端;SessionProgress 新增 skipped 字段,消费方均经 computeSessionProgress 构造,无手写字面量
原因: 原 pin_consume 读取即原子出队并标记已消费,导致 Agent 无法在不改变 pending 状态的前提下审阅队首正文并进行技术决策 内容: - 持久层: PinRepo 新增 GetOldestPending 纯只读查询队首 pending 记录 - 业务层: PinLogic 新增 PeekOldestPending 供消费前审阅且无副作用 - 工具层: pin_peek 支持 project_name 参数以只读预览队首待处理约束;pin_list 补齐正文展示;pin_consume 明确为决策处理完毕后的显式消费闭环 - 测试层: 补齐 Logic 与 MCP 端到端全链路生命周期测试用例 影响: 仅扩展 Pin 模块读取能力,不破坏现有精确 ID 消费与 FIFO 原子出队契约
- 侧边栏:大幅缩短延迟与交错间隔,提速 76% - 顶栏:将 Header 导航栏调整为直接纯淡入,移除水平位移 - 主区域:统一 PageHeader 与主内容为从右向左淡入划入,消除方向冲突
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.
变更背景
当前控制台管理界面的载入动效存在两个体验问题:
sidebarStaggerContainer延迟与交错间隔过长,子项达 14 个节点,整体展开耗时约 1.55s,界面呈现拖沓感。PageHeader(采用staggerItemLeft,从左向右划入)与主内容卡片/表格(采用staggerItem,从右向左划入)方向相反,造成视线割裂。核心变更
侧边栏动画大幅提速:
sidebarStaggerContainer:delayChildren缩减至0.03s,staggerChildren缩减至0.025s。sidebarItem:duration优化至0.22s,位移调整为x: -10px。顶栏 Header 直接纯淡入:
web/src/routes/console.tsx:移除headerVariants的水平位移x,仅保留opacity: 0 -> 1平滑淡入,视觉更加沉稳。Main 内容区域统一右侧淡入划入:
web/src/components/page-header.tsx:统一使用staggerItem(右侧淡入划入x: 20px -> 0)。components/src/motion/index.ts:将staggerItemLeft的位移统一设为右侧滑入(x: 20),确保全域一致性。web/src/routes/interact/thank.tsx:统一组件变体为staggerItem。验证与测试
/local:lumina-preview制作高保真动效样例并经视觉评审核对。pnpm --filter @lumina/components test(55 test files, 287 passed)。pnpm --filter web test(34 test files, 162 passed)。pnpm --filter @lumina/components build与pnpm --filter web build均编译无误。make check(版本连续性规则测试 + gofmt + go vet + go test -race)全部通过。