Skip to content

test(ui): pin draft/history helpers and relocate form seeds (#1044 follow-up) - #1157

Merged
Astro-Han merged 2 commits into
mainfrom
refactor/1044-ui-panel-polish
Jul 17, 2026
Merged

test(ui): pin draft/history helpers and relocate form seeds (#1044 follow-up)#1157
Astro-Han merged 2 commits into
mainfrom
refactor/1044-ui-panel-polish

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Follow-up polish to #1153 (Closes #1044 already shipped). Behavior-neutral only:

  1. Pure unit coverage for the composer draft/history helpers that back useComposerDraft / useComposerHistory (rememberComposerDraft/readComposerDraft, rememberComposerHistoryEntry, navigateComposerHistory) — closes the untested-gap note from the refactor(ui): decompose composer and plan-reminder panels into focused hooks (#1044) #1153 review.
  2. Move PlanReminderFormSeed + create/template/edit/duplicate seed builders from plan-reminder-form-dialog.tsx into plan-reminder-helpers.ts (pure mappings). Panel imports seeds from helpers; dialog stays the React owner of field state + submit.

No behavior or visual change; no contract weakening.

Verification

  • npm --workspace @maka/ui run build + typecheck — clean.
  • node --test packages/ui/dist/__tests__/composer-helpers.test.js — 22/22 pass (includes the new draft/history suites).
  • npm --workspace @maka/ui run test:dist — 184/184 pass.
  • npm --workspace @maka/desktop run typecheck — clean.
  • Related desktop contracts (plan-reminder-panel, command-palette-plan-reminder, renderer-utility-primitives, visible-copy-hygiene, settings-roadmap-cleanup, composer-send-guard) — 63/63 pass.
  • Not run: e2e / visual smoke (no DOM/behavior change).

Review focus

Seed move is mechanical (same functions, new module). Prefer reading the new pure tests against composer-helpers.ts for the draft Map caps and history navigation round trip.

Pin rememberComposerDraft/readComposerDraft (key no-op, blank delete,
120k/32 caps), rememberComposerHistoryEntry (trim/dedup/50 cap), and
navigateComposerHistory (up/down + saved-draft round trip) so the
useComposerDraft/useComposerHistory seams from #1153 stay pure-unit
covered.
PlanReminderFormSeed and the create/template/edit/duplicate seed
builders are pure mappings — relocate them next to the other form
helpers so PlanReminderFormDialog stays the React owner of field state
and submit, matching the #1044 ownership split.
@Astro-Han
Astro-Han merged commit 93a13b5 into main Jul 17, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the refactor/1044-ui-panel-polish branch July 17, 2026 01:03
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.

refactor(ui): decompose composer and plan-reminder panels into focused hooks

1 participant