daily icon indicating copy to clipboard operation
daily copied to clipboard

πŸ› BUG: max character count on shared post not shown or validated

Open GrahamTheDevRel opened this issue 11 months ago β€’ 3 comments

What went wrong? πŸ€”

If you click on "share a link" there is a box to enter extra info.

share a link screen

This box does not stop you writing more than 250 characters, which appears to be the limit according to the graphQL error I saw in the network tab.

The error shown is just "validation failed" in the user interface.

This needs the same character count info and front end validation as the "write a post" tab in the same screen to avoid confusion.

Steps to replicate

Insert a URL and then type 251 characters (or more) into the "share your thoughts" screen, you will get a validation error toast.

Network request response:

{
    "data": null,
    "errors": [
        {
            "message": "Validation error",
            "locations": [
                {
                    "line": 14,
                    "column": 5
                }
            ],
            "path": [
                "createPostInMultipleSources"
            ],
            "extensions": {
                "code": "ZOD_VALIDATION_ERROR",
                "issues": [
                    {
                        "origin": "string",
                        "code": "too_big",
                        "maximum": 250,
                        "inclusive": true,
                        "path": [
                            "commentary"
                        ],
                        "message": "Too big: expected string to have <=250 characters"
                    }
                ]
            }
        }
    ]
}

Expected Behavior

It stops you adding more than 250 characters in the first place and shows a character counter.

Steps to Reproduce Issue

Include in main description

Solution Proposed

See expected behaviour.

Screenshots

No response

Environment

No response

Browsers

Chrome

OS

Windows

Version of daily.dev

latest / web

Additional Context


Code of Conduct

  • [x] I follow the conditions of this project.

GrahamTheDevRel avatar Dec 22 '25 14:12 GrahamTheDevRel

I’ve submitted a fix in the apps repository that adds frontend character limit enforcement and a counter to the β€œShare a link” commentary field. PR: https://github.com/dailydotdev/apps/pull/5194/commits/dd7456040fb3c682794d82c79564dcf0dd614692

edwinjojie avatar Dec 23 '25 09:12 edwinjojie

@edwinjojie thanks for your help! there's pending feedback on your PR πŸ™

idoshamun avatar Dec 28 '25 08:12 idoshamun

This is fixed now 🀘

rebelchris avatar Jan 13 '26 08:01 rebelchris