refactor(desktop): migrate plan-template editor onto the design system

Merged
CH
9d ago
+8-12

D30 of the design-system migration (Desktop stack, base feature/desktop-d29-notification-settings, #3408).

What

Settings › Plan template's title-line actions (apps/desktop/src/renderer/settings/plan-template-page.tsx) move off hand-rolled buttons onto @luke/ui:

  • Version history is the quiet IconButton (named "Version history"), still under the desktop's tooltip.
  • Reset to default is the outline Button, its reset glyph in the button's icon slot.

What's unchanged: the document itself, which is the plan's own PlanBody (its editor, autosave, the over-the-bound refusal, the failed-save Retry and toast) and is D58's to migrate; the note, which is the desktop Banner shared with archived plans (D59); the Reset confirmation (ConfirmDialog, already shared); the signed-out and read-failed states; and the version history, which is D31's.

No caller here imported @luke/ui/compat. No selector became unused: .icon-button, .toolbar-button, .bordered-button still have other callers, and .task-title-actions stays as the container layout for the two actions.

Visible changes

  • Reset to default uses the contract's label weight, 500. It was 600, so the button is a few pixels narrower.
  • Both buttons draw the shared quiet and outline fills, borders and hover states instead of the legacy icon-button / bordered-button ones.

Tests

  • No new tests, because no user-visible behaviour changed.
  • desktop-settings.test.ts passes unchanged. It finds the history button by its accessible name and opens the history from it.
  • pnpm check:affected exits 0.

Evidence

Captured on Linux with headless Chrome at 1280×840, using #3405's method. A throwaway, uncommitted test rendered the real DesktopSettings on the Plan template page, with a synthetic custom template so Reset to default shows. The page's markup was framed with the built desktop stylesheet, and dark was captured under prefers-color-scheme: dark.

LightDark
Before
After

Not verified on a Mac

  • the buttons staying out of the page's drag strip
  • the tooltip's timing over Version history
  • glyph and type rendering in SF Pro

🤖 Generated with Claude Code