Skip to content

fix(ui): chat surface unify + startup flash + daily-review IA + dead-code cleanup (round 4) - #492

Merged
jackwener merged 10 commits into
mainfrom
fix/ui-round4-surface-flash-dailyreview
Jul 4, 2026
Merged

fix(ui): chat surface unify + startup flash + daily-review IA + dead-code cleanup (round 4)#492
jackwener merged 10 commits into
mainfrom
fix/ui-round4-surface-flash-dailyreview

Conversation

@jackwener

@jackwenerjackwener commented Jul 4, 2026

Copy link
Copy Markdown
Member

PR #488 在第一波修复后已被合入,本 PR 承接其后未进 main 的三个 commit(已在最新 main 上 cherry-pick 并适配 #487 CSS 拆分 / #479 文字层级收敛 / #485 cascade 整理)。

修复清单

  1. 聊天页「三块颜色」(owner 反馈):.maka-main 只给聊天滚动区刷纯白,darwin 玻璃下与面板容器色 #fafafa 形成 composer 第三色带。改 transparent —— 右面板单一表面;顺带删除 theme-glass 里打不赢 cascade 的死规则(0,2,1 vs 0,3,0)。
  2. 启动闪屏(owner 反馈「配置页闪一下」):snapshot 到达帧 loading 门已放开而 sessions 仍空,useEffect 在 paint 后才种入会话 → 有历史的用户每次启动闪一帧空态 hero。改 useLayoutEffect(paint 前提交),permission-response-ipc-boundary 契约同步放宽。
  3. 技能市场死按钮:永久 disabled 的「安装」→ 静态「即将上线」pill(与筛选 pill 同一判例;文字色用语义别名适配 feat(design): converge foreground text tiers 5→3 (issue #430 PR4) #479)。
  4. 死代码清理:agent 全仓扫描(renderer + packages/ui)确认无死文件、无死 CSS 文件;实际清理 = 6 个从未引用的 lucide icon 再导出 + 4 个仅文件内使用的 helper 去 export(smooth-stream 的保留,有单测引用)。
  5. 每日回顾 IA 重构第一轮(owner:「太乱、不直观」):时间上下文合一 —— 日期步进器与 今日/本周/本月 tabs 并入同一 header 条(原 tabs 漂在页面中部);两段说明卡收成一行提示;导出操作紧贴统计区。radius 契约同步。

验证(在最新 main 基础上)

  • typecheck ✓ / @maka/desktop 1821 tests 全绿 / check-dead-css ✓ / check-copy ✓
  • 截图:turn-narrative light+dark、module-daily-review、module-skills、provider-workspace 重截验收
  • @maka/ui 2 个存量失败(chat-primitives tailwind-merge 断言)为 main 已有问题,另行跟进

后续追加(同分支,loop 迭代)

  1. 定时任务页死控件 ×2:「保持系统唤醒」永久 disabled Switch → 静态「即将支持」pill;已完成的一次性提醒不再显示灰 OFF 开关(读作「被暂停」)→「已完成」徽章。
  2. 每日回顾报告段落节奏:四段报告块 8px 均匀间距糊成一块 → 段内 8px / 段间 16px + hairline。
  3. 每日回顾报告正文走共享 Markdown 管线:LLM 生成的 markdown 之前按纯文本渲染,列表/行内代码全糊;复用聊天同款组件(含脱敏与链接管控)。
  4. 数据页工作区路径:右对齐比例字体折成锯齿三行 → SettingRow 新增 mono 值模式(mono/左对齐/caption/整齐断行)。
  5. 记忆页悬空 meta 行:MEMORY.md 路径+备份/草稿状态词漂浮无容器 → hairline 锚定为编辑区 footnote。
  6. turn 分支徽标文案 bug:shortId 未剥 turn- 前缀,渲染成「已重新生成 → turn turn-r」(词重复且只剩 1 位有效 ID)→ 先剥前缀再截断。

全部:desktop 1821 tests ✓ / typecheck ✓ / dead-css ✓ / 截图验收。

jackwener added 10 commits July 4, 2026 09:01
- .maka-main painted solid var(--background) over only the chat scroll
area, so on darwin glass (--agents-content-area-bg #fafafa) the
composer region below read as a THIRD color band (shell / chat /
composer). Now transparent: one panel, one surface, both themes.
- remove the dead theme-glass darwin .maka-panel-detail override — it
always lost to the .agents-content-area rule on specificity (0,3,0
vs 0,2,1) and its half-applied intent is what created the band.
- snapshot session seeding moves useEffect → useLayoutEffect: the
snapshot render un-gates the loading state while sessions is still
[], and a passive effect seeds after paint — users with history saw
a one-frame empty-state hero flash on every startup (闪屏).
permission-response-ipc-boundary contract updated to accept the
layout effect on the boot path.
- marketplace card 安装 was a permanently-disabled button — a dead
control that promises interactivity (the codebase already replaced
the filter pills for the same reason). Now a static 即将上线 pill.
- drop 6 never-imported lucide icon re-exports from @maka/ui/icons.
- un-export 4 internal-only helpers (plan-reminder sort ranks,
createAbsoluteTimeFormat) — file-local implementation details.
smooth-stream helpers stay exported: they're unit-tested.
…pass 1)
Owner feedback: 页面太乱、不直观. Root of the mess was time context
split across the page — date stepper at top, 今日/本周/本月 tabs
floating mid-page above the stats they control, with a two-paragraph
explainer card pushing everything below the fold.
- header is now the one time bar: stepper + day label left, range
tabs right (tabs relocated from the mid-page nav, which is gone).
- explainer card unboxed to a single quiet hint line.
- export actions (复制/粘到输入框/保存) keep their conditional but now
sit directly above the stats they export, right-aligned.
- radius contract entry for the retired info card removed.
- 保持系统唤醒 was a permanently-disabled Switch (checked=false,
aria-label literally said 暂未启用) — a dead toggle promising
interactivity. Now a static 即将支持 pill in the info-alert tint,
same precedent as the skills marketplace 即将上线 tag.
- completed one-shot reminders showed a disabled OFF switch that read
as 'paused', not 'done' — a terminal state can't be re-enabled, so
the card chrome now shows an 已完成 badge instead of the toggle.
The four report blocks (对话摘要/遗漏提醒/使用洞察/代码建议) sat at a
uniform 8px cadence and read as one slab. 8px within a section, 16px +
hairline divider between sections — divider over nested cards per the
anti-nested-box rule.
…n pipeline
Reports are LLM-generated markdown; flat pre-wrap <p> text turned
bullet lists and inline code into mush. Reuse the chat Markdown
component (lazy pipeline, secret redaction, link gating included) and
restore list markers locally (preflight strips them).
…-aligned prose
SettingRow gains an opt-in mono value mode (data-mono) — long machine
values like the workspace path wrapped into a ragged right-aligned
3-line block in proportional type. Mono + left-aligned + caption size
reads as the file path it is. First consumer: 数据 page 工作区路径.
The path + backup/draft/count status words floated unboxed between two
cards and read as orphaned fragments. A hairline top border + breathing
room marks the strip as the editor's status footnote (divider over a
nested card, per the anti-nested-box rule).
shortId sliced the raw turnId, but real ids start with turn- and the
labels interpolate as turn ${shortId} — badges rendered「已重新生成 →
turn turn-r」with one useful character of id. Strip the prefix first.
@jackwener
jackwener merged commit c6f5f6d into mainJul 4, 2026
@jackwener
jackwener deleted the fix/ui-round4-surface-flash-dailyreview branch July 4, 2026 03:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jackwener