Skip to content

fix(chat-header): unify top-right cluster + soften blocked status tone - #237

Merged
jackwener merged 1 commit into
mainfrom
yuejing/topright-cleanup-and-status-tone
Jun 25, 2026
Merged

fix(chat-header): unify top-right cluster + soften blocked status tone#237
jackwener merged 1 commit into
mainfrom
yuejing/topright-cleanup-and-status-tone

Conversation

@jackwener

Copy link
Copy Markdown
Member

Summary

WAWQAQ flagged the chat top-right area as visually broken: the 「问题反馈」 button carried a text label while the other 3 top-bar actions (command palette / help / health) were icon-only, and the 「已阻塞」 status pill rendered next to that row in a bright destructive-red tone that clashed with the monochrome quiet-icons.

This PR fixes both in one shot:

  1. Top-right row unification — 「问题反馈」 routed through the same .maka-workspace-icon-action (size=icon-sm) bucket as the other three. Icon kept (MessageCircleQuestion), label moves to tooltip + aria-label. CSS shared block collapsed.
  2. blocked tone destructive → warning — Most blocked sessions are recoverable (permission_required, auth retry, missing connection). The destructive red read as a hard failure in a row of monochrome quiet-icons. warning (warm yellow) honestly says "you need to do something" without overpromising hard failure. Real hard failures still surface through ChatHeaderAlertBadge in destructive.
  3. Re-export SkillEntry — PR chore(ui): demote 4 more unused-export interfaces to file-private #229 demoted it but apps/desktop/src/renderer/main.tsx still imports it as a type — pre-existing build-break on upstream main. One-line export so the renderer's typecheck stays green.

Test plan

  • tsc --noEmit -p apps/desktop/tsconfig.renderer.json — clean
  • node --test dist/main/__tests__/session-status-presentation.test.js — 36/36 pass; renamed contract test confirms blocked → warning
  • Visually verify top-right cluster: 4 evenly-spaced 24×24 icon buttons.
  • Visually verify 「已阻塞」 pill renders in the warm-yellow warning tone, not bright red.
  • Verify OnboardingHero blocked hero still renders destructive tone (different code path — getOnboardingHeroCopy keeps its own tone: 'destructive' for all_connections_unhealthy).

WAWQAQ screenshot showed the workspace top-right area looking broken:
the 「问题反馈」 button carried a text label while the other three top
actions (command palette / help / health) were icon-only, and the
chat header's 「已阻塞」 pill rendered next to that row in a bright
destructive-red tone that clashed with the monochrome quiet-icons.

- main.tsx: route the 「问题反馈」 button through the same
  `.maka-workspace-icon-action` size=icon-sm bucket as the other three
  top actions. The icon remains MessageCircleQuestion; the Chinese label
  moves to title/aria-label so the row is visually one consistent strip.
- styles.css: drop the now-orphan `.maka-workspace-feedback-action`
  rule and collapse the shared block into a single
  `.maka-workspace-icon-action` definition.
- session-status-presentation.ts + components.tsx: switch
  `blocked` tone from `destructive` (red) to `warning` (warm yellow).
  Most blocked sessions are recoverable (permission_required, auth
  retry, missing connection), so the warm tone honestly says "you need
  to do something" rather than overpromising hard failure. Real hard
  failures still surface through ChatHeaderAlertBadge in destructive.
- session-status-presentation.test.ts: rename + flip the contract test
  to match the new tone.
- components.tsx SkillEntry: re-export the interface. PR #229 demoted
  it but `apps/desktop/src/renderer/main.tsx` still imports it as a
  type; this was a real build-break on upstream/main, not introduced
  here, but the diff would block tsc otherwise.
@jackwener
jackwener merged commit 4e0247f into main Jun 25, 2026
@jackwener
jackwener deleted the yuejing/topright-cleanup-and-status-tone branch June 25, 2026 06:45
jackwener added a commit that referenced this pull request Jun 25, 2026
Per @kenji audit `26a221be` against #237 main `4e0247f6`:

**#1 — bottom 「想先看看效果?」 hero buttons left-aligned.**
PR #236 right-aligned the top 「打开每日回顾」 button via
`.settingsFeatureStatusHeroActions` but the bottom 「生成每日回顾 /
生成深度分析」 row still used inline `style={{ display: 'flex', gap:
8, marginTop: 8 }}`, so it stayed glued to the paragraph margin.
Route the bottom row through the same class. Add `gap: 8px` to the
class so multi-button clusters keep proper spacing.

**#2 — 执行时间 disabled when the master switch is off.**
The disable condition was `formDisabled || savingKey === 'executeTime'
|| !(effectiveConfig?.enabled ?? false)`. That last clause blocked the
common UX of "pick a time first, then turn it on". Drop it — the time
value is harmless to edit while disabled (it doesn't fire until the
switch flips), and the disabled state was misread as "broken UI".

**#3 — 分析模型 default-row label still verbose.**
WAWQAQ's directive: "所有模型选择只用模型名". PR #236 went from
`使用对话默认模型(Codex OAuth · email · gpt-5.5)` to
`对话默认(gpt-5.5)` — better, but the model id parenthetical still
mixes "selectable model" with "follow chat default". Per @kenji's
"don't conflate the two semantics", the default row becomes plain
`跟随对话默认`; the explicit options carry the model id.

**#4 — duplicate model ids across connections looked unselectable.**
When two enabled connections both expose `gpt-5.5`, the flat
`model`-only labels read as two identical entries. Detect the collision
at build time and append `· ${connection.name}` ONLY to the colliding
entries; unique model ids stay terse per WAWQAQ's directive.

Deferred (with @kenji concurrence):
- **#5** (`data-control-width` semantic API replacing CSS-selector width
  patches) — pure refactor, no end-result change. WAWQAQ explicitly
  said 「只看最后的结果」.
- **#6** (collapse Daily Review hero card pile into a single grouped
  settings surface) — bigger visual restructure judgment call; needs
  WAWQAQ sign-off before swinging at the whole page layout.
Sign up for free to 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