Skip to content

fix: add 300-character limit and live counter to Profile bio textarea #1002

@OmanshiRaj

Description

@OmanshiRaj

The bio field on the Profile page has no character limit. A user can paste an arbitrarily large block of text into their bio and it will be saved to the database with no warning or feedback. This is the same class of bug that was already fixed in AnonymousDoubts (issue #927) but was missed in Profile.tsx. This PR adds a MAX_BIO_CHARS = 300 constant, wraps the textarea in a relative div, and renders a live X/300 counter in the bottom-right corner. The counter turns amber at 90% and red when over the limit. The Save button is disabled and handleSave guards with a toast error when the limit is exceeded, so the constraint is enforced at both the UI and handler level.
PLEASE ASSIGN THE ISSUE TO ME UNDER GSSOC'26

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions