Repository navigation
Composer decomposition PR8: text ownership migration - #89898
cristipaval merged 9 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann 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] |
|
@cristipaval 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: fa9567be0f
ℹ️ 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".
|
PR doesn’t need product input as a migration PR. Unassigning and unsubscribing myself. |
|
The key difference: What this means for // Before this PR (reads Onyx):
const shouldAutoFocus = (shouldFocusInputOnScreenFocus || !!draftComment) && ...
// After this PR (reads context):
const shouldAutoFocus = (shouldFocusInputOnScreenFocus || !!value) && ...
So
The sync mechanism between the two is Bottom line: Using |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-05-14.at.14.42.18.movAndroid: mWeb ChromeScreen.Recording.2026-05-14.at.14.20.35.moviOS: HybridAppScreen.Recording.2026-05-14.at.14.26.03.moviOS: mWeb SafariScreen.Recording.2026-05-14.at.14.19.28.movMacOS: Chrome / SafariScreen.Recording.2026-05-14.at.14.14.47.mov |
|
@adhorodyski Could you merge the latest main and ping me again? |
|
Yes I'm just verifying the latest updates from #89375 |
|
@DylanDylann all ready |
|
🚧 @cristipaval has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 9.3.74-7 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a pure internal refactoring that migrates React state management (draft text ownership) from |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|
|
Hi @adhorodyski. The QA team encountered a problem with steps 7 and 9. How can we verify in a Concierge chat that the AI placeholder cycles between the three placeholder strings on focus and disappears as soon as you start typing? Concierge.mp4Task is not created when typing task.is.not.created.mp4 |
Explanation of Change
PR8 of the Composer decomposition series. Single-file change: text ownership for the composer's draft text migrates from
ComposerWithSuggestionsintoComposerProvider(ComposerTextContext).Before:
ComposerWithSuggestionsowned a localuseStatefor the draft text and its ownuseOnyx(REPORT_DRAFT_COMMENT)to seed it.After:
textlives inComposerProvider.ComposerWithSuggestionsreadsvalueviauseComposerText()and writes viasetTextfromuseComposerActions(). A one-shotinitialTextsnapshot (set once at mount viauseState(() => ...)) covers the handful of decisions that should run only at mount — initial selection cursor, emoji baseline (emojisPresentBefore),valueRef/lastTextRef/commentRefinitial values, and theshouldAutoFocusdecision. Reading the livevaluefor any of these would cause re-renders or effect re-fires on every keystroke.This is a single source of truth for the keystroke-hot value: one
useState, oneuseOnyxremoved from the hot path; downstream pieces of the compound can now read draft text from one place.Fixed Issues
$ #89375
PROPOSAL:
Tests
:smile:). Verify the emoji replaces the shortcode and a single space is inserted after it./task @someone do thingand press Enter. Verify the task is created with the correct assignee.Offline tests
N/A
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
iOS: mWeb Safari
MacOS: Chrome / Safari