Files
langflow/src
Keval718 f7e99ee9b6 refactor(memories): polish Auto-capture toggle to principal-level standards
Follow-up cleanup on top of the badge + toast change. Addresses the
B-grade items I called out in self-review:

  - Extract MemoryAutoCaptureToggle component. MemoryDetailsHeader was
    inlining a 20-line Tailwind blob; pull it into a small presentational
    component with prop-level JSDoc and a single accessible button.
    Header now reads as orchestration only.

  - Replace the hand-rolled status pill with the existing Badge primitive
    (variant=successStatic / secondaryStatic, size=sm). One source of
    truth for badge tokens across the app — no more drifting Tailwind
    blobs.

  - Route all user-visible Auto-capture copy through i18n
    (memories.autoCapture.{label,stateOn,stateOff,ariaEnable,ariaDisable,
    toastEnabled,toastDisabled} in en.json). No more hardcoded English
    in TS.

  - Export NextIsActive from useAutoCaptureDebouncedToggle so the
    toggle component can type its onToggle prop precisely.

  - Add focused unit tests for useAutoCaptureDebouncedToggle in
    isolation (debounce, on→off→on collapse, success/error callbacks,
    memory-id cleanup, no-memory no-op). Previously only covered through
    useMemoriesData integration tests.

  - Update MemoryDetailsHeader.test.tsx to assert against the new
    state-aware aria-labels and the badge testid.

74/74 memories suite green, 841/841 across FlowPage + createMemoryModal.
2026-05-14 18:18:12 -04:00
..
2026-05-13 22:23:39 +00:00
2026-05-13 22:23:39 +00:00