mirror of https://github.com/usememos/memos.git
41 lines
2.2 KiB
Markdown
41 lines
2.2 KiB
Markdown
## Execution Log
|
|
|
|
### T1: Add recorder state and browser capture hook
|
|
|
|
**Status**: Completed
|
|
**Files Changed**:
|
|
- `web/src/components/MemoEditor/hooks/useVoiceRecorder.ts`
|
|
- `web/src/components/MemoEditor/hooks/index.ts`
|
|
- `web/src/components/MemoEditor/state/types.ts`
|
|
- `web/src/components/MemoEditor/state/actions.ts`
|
|
- `web/src/components/MemoEditor/state/reducer.ts`
|
|
- `web/src/components/MemoEditor/services/memoService.ts`
|
|
**Validation**: `cd web && pnpm lint` — PASS
|
|
**Path Corrections**: Added `web/src/components/MemoEditor/services/memoService.ts` after plan update because `memoService.fromMemo()` also constructs `EditorState`.
|
|
**Deviations**: None after the approved plan correction.
|
|
|
|
Implemented a dedicated `voiceRecorder` editor state slice, reducer/actions for recorder lifecycle updates, a browser `MediaRecorder` hook that produces a `LocalFile` preview, and the matching `fromMemo()` defaults needed to keep the editor state shape valid for existing memo edit flows.
|
|
|
|
### T2: Add composer recorder UI and draft audio handling
|
|
|
|
**Status**: Completed
|
|
**Files Changed**:
|
|
- `web/src/components/MemoEditor/components/VoiceRecorderPanel.tsx`
|
|
- `web/src/components/MemoEditor/components/EditorToolbar.tsx`
|
|
- `web/src/components/MemoEditor/components/index.ts`
|
|
- `web/src/components/MemoEditor/index.tsx`
|
|
- `web/src/components/MemoEditor/types/components.ts`
|
|
- `web/src/components/MemoEditor/types/attachment.ts`
|
|
- `web/src/components/MemoMetadata/Attachment/AttachmentListEditor.tsx`
|
|
- `web/src/components/MemoEditor/services/validationService.ts`
|
|
- `web/src/locales/en.json`
|
|
**Validation**: `cd web && pnpm lint` — PASS
|
|
**Path Corrections**: None
|
|
**Deviations**: None
|
|
|
|
Added a `Voice note` action to the editor tool dropdown, wired the memo editor to start recording and render an inline recorder/review panel, let users keep a completed clip as a normal draft `LocalFile`, rendered local audio drafts with playable controls in the attachment editor, and blocked save only while permission is pending or recording is live.
|
|
|
|
## Completion Declaration
|
|
|
|
**Execution completed successfully** — the frontend memo composer now has a tool-dropdown voice recorder entrypoint that creates draft audio files through the existing attachment flow, with no backend or transcription changes.
|