Fix "Home - No "The maximum comment length is 15,000 characters" error on Concierge prompt box" - #99548
Fix "Home - No "The maximum comment length is 15,000 characters" error on Concierge prompt box"#99548Guccio163 wants to merge 6 commits into
Conversation
Wires ConciergePromptBox into the same useDebouncedCommentMaxLengthValidation hook the report composer uses, so the 15,000 character limit is enforced inline (red border, error text, disabled send) instead of only after send. Fixes Expensify#99483
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7905d88d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…eEffect PERF-8: handling a user-typed value change inside a useEffect adds an extra render cycle and obscures the direct relationship between typing and validation. Call the debounced validation from onChangeText, same pattern as ComposerInput's onValueChange.
The Home prompt sends directly through askConcierge/addComment and never interprets task syntax the way the report composer does. Without isEditing: true, any prompt starting with "[] " was misread as a task title and blocked past 100 characters, well under the 15,000-character comment limit.
|
@Guccio163 |
|
Sure, I'm already working on them - should be done very soon, I'll ping you once it's ready |
…ength The "+" attachment button's confirm modal unconditionally called askConciergeWithAttachment with the current comment text, bypassing the max-length guard that gates the normal send button. Match the main report composer's pattern (ComposerActionMenu's shouldDisableAttachmentItem): disable the trigger itself instead of guarding the send call.
|
@ZhenjaHorbach all comments are addressed, one thing that caught my attention is green button's flicker after pasting the text and before validation - the same effect is occurring also in chats, so it isn't this PR's fault, but we could potentially delay the button 'green-ing' till after the validation. Food for thought, LMKWDYT @ZhenjaHorbach and I'll post a proposal in Slack once I find the fix. Nevertheless I'll handle it separately, so this PR alone is ready for review 👀 Screen.Recording.2026-08-26.at.13.51.57.mov |
I suppose we need to have the same behaviour as in the input in the inbox chat |
|
Yeah we do right now, I'll work on fixing them both in a separate PR |
Since it's not a hotfix, I think we can fix all issues here |
|
Sure, I think we could do it here |
|
@ZhenjaHorbach circling back to the proposed fix, I think we should actually let it go: It is possible to avoid the button turning green, but then we have to base it on the debounced length value, which of course is delayed and this makes button look bad in every other normal use-case: Screen.Recording.2026-08-26.at.17.08.45.movThat being said, it's ready for a review 😃 |
|
I don't mind leaving this as it is |
…-fork into Guccio163/15kcharacters
|
@ZhenjaHorbach ready |
|
Actually, let's wait for this PR |
|
merged the above, please merge main cc @Guccio163 @ZhenjaHorbach |
Yeah |
…-fork into Guccio163/15kcharacters
|
@ZhenjaHorbach I think that we can close this PR then - when merging main a superset of our logic was already there ✨ |
|
@Guccio163 |
Explanation of Change
Wires ConciergePromptBox into the same useDebouncedCommentMaxLengthValidation hook the report composer uses, so the 15,000 character limit is enforced inline (red border, error text, disabled send) instead of only after send.
Fixed Issues
$ #99483
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-08-26.at.13.06.04.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-26.at.12.10.14.mov