Skip to content

writing-style: Switch to Tiptap editor and preserve line breaks - #1182

Merged
elie222 merged 3 commits into
mainfrom
feat/writing-style-rich-text-editor
Jan 4, 2026
Merged

writing-style: Switch to Tiptap editor and preserve line breaks#1182
elie222 merged 3 commits into
mainfrom
feat/writing-style-rich-text-editor

fixes

1ae47e4
Select commit
Loading
Failed to load commit list.
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 defaultValues is set once with currentWritingStyle at component mount. If the dialog is closed without saving and then reopened after the prop changes (e.g., from a background data refetch via mutate()), the form will still show the stale initial value rather than the updated currentWritingStyle. The form should either use reset() when the dialog opens or track prop changes with useEffect. [ Out of scope ]
  • line 88: In the onError callback, accessing error.error.serverError will throw a runtime error if error.error is undefined. This can happen with certain error types from next-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 useCallback for onUpdate depends on output, but useEditor does not re-register callbacks when dependencies change. If the output prop were to change after the editor is initialized, the onUpdate callback would use the stale output value. Currently this isn't triggered since output is hardcoded to "markdown", but it could cause bugs if the prop becomes dynamic. [ Low confidence ]