fix: word-wrap overflow in source cards, note editor, and inline edit

Add break-all to SourceCard title and InlineEdit display text so long
unbroken strings wrap instead of overflowing the container. Add min-w-0
to NoteEditorDialog form to prevent grid item expansion.

Also fix RecordID type error in notes API by converting command_id to
string before passing to NoteResponse (fixes 500 on note create/update).
This commit is contained in:
Luis Novo 2026-02-16 14:53:30 -03:00
parent 3b18e5c8ec
commit c596ed2233
4 changed files with 5 additions and 5 deletions

View file

@ -96,7 +96,7 @@ async def create_note(note_data: NoteCreate):
note_type=new_note.note_type,
created=str(new_note.created),
updated=str(new_note.updated),
command_id=command_id,
command_id=str(command_id) if command_id else None,
)
except HTTPException:
raise
@ -160,7 +160,7 @@ async def update_note(note_id: str, note_update: NoteUpdate):
note_type=note.note_type,
created=str(note.created),
updated=str(note.updated),
command_id=command_id,
command_id=str(command_id) if command_id else None,
)
except HTTPException:
raise

View file

@ -126,7 +126,7 @@ export function NoteEditorDialog({ open, onOpenChange, notebookId, note }: NoteE
<DialogTitle className="sr-only">
{isEditing ? t.sources.editNote : t.sources.createNote}
</DialogTitle>
<form onSubmit={handleSubmit(onSubmit)} className="flex h-full flex-col">
<form onSubmit={handleSubmit(onSubmit)} className="flex h-full flex-col min-w-0">
{isEditing && noteLoading ? (
<div className="flex-1 flex items-center justify-center py-10">
<span className="text-sm text-muted-foreground">{t.common.loading}</span>

View file

@ -87,7 +87,7 @@ export function InlineEdit({
<button
type="button"
className={cn(
"cursor-pointer hover:bg-muted/50 rounded px-2 py-1 -mx-2 -my-1 transition-colors text-left w-full",
"cursor-pointer hover:bg-muted/50 rounded px-2 py-1 -mx-2 -my-1 transition-colors text-left w-full break-all",
className
)}
onClick={(e) => {

View file

@ -240,7 +240,7 @@ export function SourceCard({
{/* Title */}
<div className={cn('mb-1.5', !isCompleted && 'mb-1')}>
<h4
className="text-sm font-medium leading-tight line-clamp-2"
className="text-sm font-medium leading-tight line-clamp-2 break-all"
title={title}
>
{title}