diff --git a/devboard/client/src/components/Task/TaskModal.jsx b/devboard/client/src/components/Task/TaskModal.jsx index 68ed430..7bb0dd9 100644 --- a/devboard/client/src/components/Task/TaskModal.jsx +++ b/devboard/client/src/components/Task/TaskModal.jsx @@ -84,6 +84,20 @@ const TaskModal = ({ await updateTask(task._id, { snippets: updatedSnippets }); }; + const renderWithMentions = (text) => + text.split(/(@\w+)/g).map((part, i) => + part.startsWith("@") ? ( + + {part} + + ) : ( + {part} + ) + ); + useEffect(() => { window.history.pushState(null, "", window.location.href); const handlePop = () => { @@ -192,6 +206,12 @@ const TaskModal = ({ ? "s" : ""}

+ {/* Live preview with @username mentions highlighted */} + {form.description.trim() && ( +

+ {renderWithMentions(form.description)} +

+ )} {aiError && (

{aiError}