writing-style: Switch to Tiptap editor and preserve line breaks - #1182
Merged
MacroscopeApp / Macroscope - Correctness Check
succeeded
Jan 4, 2026 in 2m 0s
No issues identified (2 code objects reviewed).
• Merge Base:
0a03402
• Head:1ae47e4
Details
| ✅ | File Path | Comments Posted |
|---|---|---|
| ✅ | apps/web/app/(app)/[emailAccountId]/assistant/settings/WritingStyleSetting.tsx |
0 |
| ✅ | apps/web/components/editor/Tiptap.tsx |
0 |
Filtered Issues Details
apps/web/app/(app)/[emailAccountId]/assistant/settings/WritingStyleSetting.tsx
- line 72: The form's
defaultValuesis set once withcurrentWritingStyleat component mount. If the dialog is closed without saving and then reopened after the prop changes (e.g., from a background data refetch viamutate()), the form will still show the stale initial value rather than the updatedcurrentWritingStyle. The form should either usereset()when the dialog opens or track prop changes withuseEffect. [ Out of scope ] - line 88: In the
onErrorcallback, accessingerror.error.serverErrorwill throw a runtime error iferror.errorisundefined. This can happen with certain error types fromnext-safe-action(e.g., validation errors, fetch errors). Should use optional chaining:error.error?.serverError. [ Out of scope ]
apps/web/components/editor/Tiptap.tsx
- line 79: The
useCallbackforonUpdatedepends onoutput, butuseEditordoes not re-register callbacks when dependencies change. If theoutputprop were to change after the editor is initialized, theonUpdatecallback would use the staleoutputvalue. Currently this isn't triggered sinceoutputis hardcoded to"markdown", but it could cause bugs if the prop becomes dynamic. [ Low confidence ]
Loading