Skip to content

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

Description

@Astro-Han

Context

Two shared-UI panels fold several independent state machines into one component.

  • composer.tsx (1124): draft persistence (draftStoreRef, saveCurrentDraft, swap-effect
    323-341) + prompt-history nav (481-526) + @/ mention state machine (270-280, 550-580,
    610-667) + drag/drop+paste import (669-737) + toolbars (822-1114).
  • plan-reminder-panel.tsx (863): ~20 useState mixing edit-form fields (127-134), list
    filter/sort/search (145-148), run-history range, dialog + per-action pending; the
    create/edit dialog form (668-860, ~190 JSX lines) is self-contained.

Proposed

  • Composer: extract useComposerDraft, useComposerHistory, useMentionPopup (or a
    child), and a ; composer orchestrates only.
  • Plan-reminder: extract owning all form state + submit; the
    panel keeps list/runs/query state.

Acceptance

Each hook/component owns one concern; the panels no longer hold every field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions