Skip to content

fix(ui): reading-column polish — balanced density, conversation radius, flush sticky - #3375

Closed
jackwener wants to merge 1 commit into
mainfrom
fix/reading-column-polish
Closed

jackwener wants to merge 1 commit into
mainfrom
fix/reading-column-polish

Conversation

@jackwener

Copy link
Copy Markdown
Member

背景

对照 docs/astryx-shell-improvement.zh-CN.md / astryx-visual-excellence.zh-CN.md 在 57e08d8 上实测(真实 Electron + 8 连续工具调用 fixture,CDP 量测 + 截图)后的结论:文档里 P0.1/P0.2(工具、thinking 默认折叠)与 P1.4(composer 减法)已是现状;.maka-tool-* "第二套 DS ~254 条"的数据已过时(实际 3 个选择器)。真正成立且值得做的三刀在这个 PR 里。

改动

1. 阅读列密度(文档 P0.3) — ChatMessageList 去掉 compact + gap={4} 强制(gap={4} 本来就是 balanced 的 gap,compact 只买到了更紧的 padding)。真正的拥挤在 turn 内部:.maka-processing-sequence gap --space-1 → --space-3、.maka-assistant-answer-content 8px → 16px。实测 thinking→tool→正文 的块间距从 12/8px 提到 20/16px。

2. 用户气泡 conversation 档(文档 P0.4) — 10px card 档读起来像 settings row。新增 --radius-conversation: 16px(唯一消费者:filled user bubble),DESIGN.md §6 记录为盒高阶梯的 register 例外;assistant 侧保持 ghost 不变。先改了 DESIGN.md 再改 CSS,符合"契约先行"。

3. sticky 吸顶齐平 — --maka-activity-sticky-top 从 8px 改 0:8px 偏移在吸顶 header 上方开了一条透缝,上一行滚动时半透出(截图实测)。改 0 后 strip 量测为 0,双层 sticky(组头 + 行头)都正常。

验证

  • 真实 app 前后截图 + CDP 量测(gap 20/16px、radius 16px、sticky strip 0px)
  • @maka/ui 183 tests pass;renderer tsc --noEmit clean;prompt-rail e2e 7 pass

明确不做(已核实为非问题)

  • 待办 panel 默认展开 —— 是 e2e fixture 强制的(e2e-fixture.ts 设 workbarCollapsed: false),真实默认就是收起
  • 删"第二套 tool DS" —— 数据过时,现状只剩 3 个有明确理由的选择器

…s, flush sticky

Three cuts verified against a live 8-tool fixture session at 57e08d8
(measured over CDP, before/after screenshots):

- ChatMessageList drops the compact+gap={4} override for Astryx's own
  balanced density. compact with gap={4} was already balanced's gap with
  compact's padding, so the pin bought nothing but tightness. The real
  crowding was inside a turn: .maka-processing-sequence gap --space-1 →
  --space-3 and .maka-assistant-answer-content 8px → 16px take the
  evidence blocks from a measured 12/8px apart to 20/16px — reading
  rhythm instead of a log.

- User bubble moves from the card tier (10px, read as a settings row) to
  a new conversation tier: --radius-conversation 16px, single consumer,
  documented in DESIGN.md §6 as a register exception to the box-height
  ladder. Assistant stays ghost.

- Activity sticky offset --space-2 → 0: the 8px strip above the stuck
  header let the previous row scroll through half-visible. Flush with
  the scrollport, both sticky tiers verified (strip measured 0px).

Tests: @maka/ui 183 pass, renderer tsc clean, prompt-rail e2e 7 pass.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused visual cleanup and for documenting the intended reading rhythm. The exact-head test is green and I found no correctness or accessibility blocker. I left one non-blocking coverage gap and one small token-consistency note inline.\n\nAI-assisted review disclosure: Codex performed an independent exact-head review; I verified the changed visual contract and live PR state before posting.

className="maka-chat-message-list maka-chatContent"
density="compact"
gap={4}
density="balanced"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] This changes both message-list density and the sticky/spacing CSS contract, but the only verification recorded is manual CDP measurement. A later Astryx DOM or class change could silently disable the sticky selector or restore the old density. Please add one focused Storybook/browser contract that renders the relevant conversation shape and asserts the intended classes/layout behavior, or explicitly record this as accepted visual-only manual coverage.

/* 16px, the same reading rhythm as .maka-processing-sequence's --space-3 +
the tool group's own 8px margin: evidence and answer are separate thoughts,
and at 8px the prose sat glued to the last tool row. */
.maka-assistant-answer-content { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 16px; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] This hardcodes 16px next to a spacing system already expressed through --space-*. Using the equivalent shared token would keep one spacing authority and prevent this rhythm from drifting if the scale changes.

@Astro-Han

Copy link
Copy Markdown
Contributor

Hi — this PR conflicts with current main and cannot be merged as-is.

I tested a rebase onto current main locally (in a throwaway worktree — your branch was not touched). It stops on these files:

  • DESIGN.md
  • apps/desktop/src/renderer/styles/chat-message.css
  • packages/ui/src/chat-view.tsx

These are real source conflicts, so they need your judgement rather than a mechanical rebase — please rebase onto current main and resolve them yourself, then push. Once the branch is conflict-free and CI is green on the new head, I will pick it up for review.

git fetch upstream && git rebase upstream/main
# resolve, then
git push --force-with-lease

Thanks for the contribution — happy to help if any conflict is unclear.


AI-assisted maintenance note, not a review. It does not count as the required human review under CONTRIBUTING.md §Review.

@github-actions

Copy link
Copy Markdown

This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed.

Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the pinned label.

@github-actions github-actions Bot added the stale No qualifying activity within the lifecycle policy window label Sep 21, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been closed because it received no new commits during the 7-day grace period. This is not a judgement on the merit of the change; it only keeps the review queue aligned with work that is actively in flight.

The branch and review history are preserved. Push a new commit and reopen the pull request whenever the work is ready to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines stale No qualifying activity within the lifecycle policy window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants