Skip to content

fix(ui): clear the outstanding UI-review P0s and follow-ups - #463

Merged
jackwener merged 1 commit into
mainfrom
fix/ui-review-p0-batch
Jul 3, 2026
Merged

jackwener merged 1 commit into
mainfrom
fix/ui-review-p0-batch

Conversation

@jackwener

Copy link
Copy Markdown
Member

把 2026-07-03 三路 code review 在案未修的项全部清掉(不留给别人):

P0 × 3

  1. 搜索选结果后焦点被拽回侧栏:useModalA11y 卸载时无条件恢复焦点,无视调用方 restoreFocus:false 的意图。hook 新增可选 suppressFocusRestoreRef;SearchModal 在导航接管焦点时置位。lifecycle 契约同步(StrictMode still-mounted 保护原样,只是后移一行)。
  2. 技能页视图切换器 ARIA 违约:role=tablist/tab 承诺了从未实现的 tabs 键盘契约(roving tabindex/方向键/panel 关联)→ 改为诚实的 aria-pressed 分段按钮。
  3. bot 平台导航七行冻结无解释:契约有意锁定操作期间的平台切换 —— 保留锁,补上缺失的 title(「当前操作进行中,完成后可切换平台」),修的是"无解释"这半个缺陷。

跟进 × 2

验证

npm --workspace @maka/desktop test: 1696/1696

Closes out every remaining item from the 2026-07-03 three-way code
review instead of leaving them as suggestions:

- Search modal focus yank (P0): selecting a result navigated to the
  chat turn but useModalA11y unconditionally restored focus to the
  sidebar search trigger on unmount, defeating the call site's
  restoreFocus:false intent. The hook now takes an optional
  suppressFocusRestoreRef; SearchModal sets it when navigation owns
  focus. Lifecycle contract updated to the new signature/structure
  (StrictMode still-mounted guard unchanged, one line later).
- Skills view switcher ARIA (P0): role=tablist/tab promised the ARIA
  tabs keyboard contract (roving tabindex, arrow keys, linked panels)
  that plain buttons never implemented. Now honest aria-pressed
  segmented buttons.
- Bot platform nav freeze (P0, amended per existing contract): the
  contract intentionally locks platform switching while a provider
  action runs, but all seven rows froze with NO explanation. Kept the
  lock, added the missing title (当前操作进行中,完成后可切换平台).
- Dead filter pills (P2): 全部 / 排序:热门 were disabled buttons
  visually promising interactivity; now static spans (CSS gains
  explicit inline-flex so the span keeps the 28px pill geometry).
- Motion contract TSX scanner (#431 review P2): strip //-line and
  /*-block comments before scanning so prose "ease"/"linear" in doc
  comments cannot false-positive — closes the CSS/TSX asymmetry.

Desktop suite 1696/1696.
@jackwener
jackwener merged commit e3f7794 into main Jul 3, 2026
@jackwener
jackwener deleted the fix/ui-review-p0-batch branch July 3, 2026 08:41
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