# To AI Agent: Fix Overlapping Text and Layout Overflow in MyNotePage Note Cards ## 1. Context & Layout Bug Analysis We are fixing a severe rendering and layout bug inside the Note Card component of `MyNotePage.tsx` as captured in `image_8a449e.png`: - **Bug 1 (Chữ đè chồng lên nhau):** The text lines inside the note body (headings, dates, journal contents) are collapsing vertically and rendering directly on top of each other. This is caused by rogue `absolute` positioning or a broken flex/grid system on inner content elements. - **Bug 2 (Tràn ra khỏi Board chứa):** Long text strings (such as resolved address lines with "Đà Nẵng, Vietnam" or "Tuy Hòa, Phú Yên") are breaking out horizontally and vertically beyond the rounded border bounds of the card. - **Goal:** Clean up the typography layout engine so that elements stack naturally in a vertical flow (`block` or `flex-col`), wrap text cleanly when boundaries are met, and respect the container's height/scroll rules. --- ## 2. Refactoring Instructions ### Step 1: Clean Up the Note Content Wrapper Class Locate the container rendering the inner markdown text inside the note board card. Force it to follow a regular vertical block layout flow and ensure text wrapping is active. ```jsx {/* ❌ OLD COLLAPSED CONTAINER (Dự đoán đang bị sai class) */}
{line}
); })}