Skip to content

feat: add AI prompt section to profile settings for agent accounts#90823

Open
NicolasBonet wants to merge 23 commits into
mainfrom
feat/90244-add-prompt-section-to-profile
Open

feat: add AI prompt section to profile settings for agent accounts#90823
NicolasBonet wants to merge 23 commits into
mainfrom
feat/90244-add-prompt-section-to-profile

Conversation

@NicolasBonet
Copy link
Copy Markdown
Contributor

@NicolasBonet NicolasBonet commented May 15, 2026

Explanation of Change

This update introduces a new section in the profile settings where agent accounts can view and edit their AI prompt. The section includes a title, subtitle, and functionality to save or cancel edits. Additionally, translations for the new section have been added in multiple languages. The changes also include updates to the Agent actions to support the new prompt functionality.

Fixed Issues

$ #90244
PROPOSAL: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0AKV1FPD41?focus_section_id=temp:C:PDZa4644f0f9a49433fa55e205e5

Tests

  1. Create an agent with a prompt
  2. Copilot into the agent's account
  3. Go to the Profile section of account settings
  4. Verify you see the "AI Prompt" section with the current prompt in an uneditable state
  5. Click "edit prompt"
  6. Verify the text box becomes editable
  7. Edit the text and save the new promprt
  8. Verify the text box becomes uneditable again
  9. Return into the owner account
  10. Go to the Agents section of the owner account
  11. Click on the agent you just edited
  12. Verify the updated prompt is shown
  • Verify that no errors appear in the JS console

Offline tests

  1. Create an agent with a prompt
  2. Copilot into the agent's account
  3. Go to Account -> Troubleshoot and turn on Force offline
  4. Go to the Profile section of account settings
  5. Verify you see the "AI Prompt" section with the current prompt in an uneditable state
  6. Click "edit prompt"
  7. Verify the text box becomes editable
  8. Edit the text and save the new prompt
  9. Verify the prompt is reverted and you see an error
  10. Go to Account -> Troubleshoot and turn off Force offline
  11. Go to the Profile section of account settings
  12. Click "edit prompt"
  13. Verify the text box becomes editable
  14. Edit the text and save the new prompt
  15. Verify the updated prompt is shown

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I verified that similar component doesn't exist in the codebase
  • I verified that all props are defined accurately and each prop has a /** comment above it */
  • I verified that each file is named correctly
  • I verified that each component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
  • I verified that the only data being stored in component state is data necessary for rendering and nothing else
  • In component if we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
  • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
  • I verified that component internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
  • I verified that all JSX used for rendering exists in the render method
  • I verified that each component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

Screenshots/Videos

Android: Native
screen-20260525-152533-1779740701083.mp4
Android: mWeb Chrome
screen-20260525-152851-1779740885647.mp4
iOS: Native
ScreenRecording_05-25-2026.15-19-42_1.MP4
iOS: mWeb Safari
ScreenRecording_05-25-2026.15-19-42_1.MP4
MacOS: Chrome / Safari

@NicolasBonet NicolasBonet changed the title Add AI prompt section to profile settings for agent accounts feat: add AI prompt section to profile settings for agent accounts May 15, 2026
@OSBotify

This comment has been minimized.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 93.84% <ø> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/ValidationUtils.ts 57.32% <100.00%> (+2.34%) ⬆️
src/pages/settings/Agents/EditAgentPage.tsx 94.33% <100.00%> (ø)
...rc/pages/settings/Agents/Fields/EditPromptPage.tsx 69.23% <100.00%> (ø)
src/pages/settings/Profile/ProfilePage.tsx 89.90% <100.00%> (+2.05%) ⬆️
src/libs/actions/Agent.ts 79.62% <33.33%> (-2.73%) ⬇️
...rc/pages/settings/Profile/AgentAIPromptSection.tsx 84.84% <84.84%> (ø)
... and 10 files with indirect coverage changes

@NicolasBonet NicolasBonet force-pushed the feat/90244-add-prompt-section-to-profile branch from 8edf06a to 79d6fdc Compare May 15, 2026 19:04
@OSBotify

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@NicolasBonet NicolasBonet force-pushed the feat/90244-add-prompt-section-to-profile branch 2 times, most recently from 54abe64 to 34b7940 Compare May 18, 2026 15:31
@Expensify Expensify deleted a comment from github-actions Bot May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@NicolasBonet NicolasBonet marked this pull request as ready for review May 18, 2026 18:59
@NicolasBonet NicolasBonet requested review from a team as code owners May 18, 2026 18:59
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and parasharrajat and removed request for a team May 18, 2026 18:59
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 18, 2026

@parasharrajat 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]

@NicolasBonet NicolasBonet force-pushed the feat/90244-add-prompt-section-to-profile branch from d04a338 to 316fed6 Compare May 18, 2026 18:59
Comment thread src/pages/settings/Profile/AgentAIPromptSection.tsx
Comment thread src/pages/settings/Profile/AgentAIPromptSection.tsx
Comment thread src/pages/settings/Profile/AgentAIPromptSection.tsx
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 316fed6d28

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/ui/ProfilePageTest.tsx
@github-actions
Copy link
Copy Markdown
Contributor

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

Comment thread src/libs/actions/Agent.ts Outdated
read(READ_COMMANDS.OPEN_AGENTS_PAGE, null);
}

function readAgentPrompt(agentAccountID: number) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why a ReadAgentPrompt command rather than an OpenProfilePage command. I don't have a super strong opinion, but the action the user is taking is opening the profile page, so that is what made sense to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that is not using the recently introduced READ_AGENT_PROMPT command, which is new and with this change should be usable as it's: https://github.com/Expensify/Web-Expensify/pull/52950

Comment thread src/libs/actions/Agent.ts Outdated
];

write(WRITE_COMMANDS.UPDATE_AGENT_PROMPT, {agentAccountID: accountID, prompt}, {optimisticData, successData, failureData});
write(WRITE_COMMANDS.UPDATE_AGENT_PROMPT, {agentAccountID: accountID, reportID: 0, prompt}, {optimisticData, successData, failureData});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need reportID param?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is outdated, we are no longer needing that as the backend changed!

@parasharrajat
Copy link
Copy Markdown
Member

Oopsy doopsy.... @puneetlath, can you give my account access for this feature?

image

…romptSection for character limit handling

This commit introduces a new AGENT_PROMPT_LIMIT constant set to 300, enhancing the management of character limits for agent prompts. The EditAgentPage is updated to include character limit handling for the prompt title, while the AgentAIPromptSection is modified to utilize a ScrollView for better display of prompts, ensuring improved user experience and consistency across components.
…ge transition

This commit adds a loading state check in the AgentAIPromptSection component to prevent premature navigation to the profile page during app loading. The useEffect hook is updated to include the isLoadingApp dependency, ensuring that the openProfilePage function is only called when the app is fully loaded. This change enhances the user experience by avoiding potential issues during copilot transitions.
This commit introduces the containsHtmlTag function to the ValidationUtils module, which checks for non-whitelisted HTML-like tags in strings. The function is integrated into the AgentAIPromptSection and EditPromptPage components to prevent invalid characters in user inputs. Additionally, unit tests are added to ensure the functionality works as expected, enhancing input validation across the application.
…o reflect new subtitle: 'Write custom instructions'
@NicolasBonet NicolasBonet force-pushed the feat/90244-add-prompt-section-to-profile branch from a2de05f to 969e35a Compare May 22, 2026 20:27
@NicolasBonet
Copy link
Copy Markdown
Contributor Author

NicolasBonet commented May 22, 2026

@puneetlath updated that line:

image

@OSBotify
Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index d9b5d047..6f9f7a53 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1962,10 +1962,10 @@ const translations: TranslationDeepObject<typeof en> = {
         },
         aiPromptSection: {
             title: 'KI-Aufforderung',
-            subtitle: 'Eigene Anweisungen schreiben',
-            prompt: 'Aufforderung',
+            subtitle: 'Eigene Anweisungen verfassen',
+            prompt: 'Eingabeaufforderung',
             editPrompt: 'Eingabeaufforderung bearbeiten',
-            promptCannotBeEmpty: 'Eingabe darf nicht leer sein',
+            promptCannotBeEmpty: 'Eingabeaufforderung darf nicht leer sein',
         },
     },
     securityPage: {
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 55ba3e69..e8e16d7a 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1848,11 +1848,11 @@ const translations: TranslationDeepObject<typeof en> = {
             subtitle: 'Estos detalles se utilizan para viajes y pagos. Nunca se mostrarán en tu perfil público.',
         },
         aiPromptSection: {
-            title: 'Indicaciones de IA',
-            subtitle: 'Escribe instrucciones personalizadas',
+            title: 'Indicación para IA',
+            subtitle: 'Escribir instrucciones personalizadas',
             prompt: 'Indicador',
             editPrompt: 'Editar mensaje',
-            promptCannotBeEmpty: 'El campo de indicaciones no puede estar vacío',
+            promptCannotBeEmpty: 'El mensaje no puede estar vacío',
         },
     },
     securityPage: {
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 15a9581c..d2a589c4 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1966,10 +1966,10 @@ const translations: TranslationDeepObject<typeof en> = {
         },
         aiPromptSection: {
             title: 'Invite IA',
-            subtitle: 'Rédiger des instructions personnalisées',
+            subtitle: 'Écrire des instructions personnalisées',
             prompt: 'Invite',
-            editPrompt: "Modifier l'invite",
-            promptCannotBeEmpty: "L'invite ne peut pas être vide",
+            editPrompt: 'Modifier l’invite',
+            promptCannotBeEmpty: 'L’invite ne peut pas être vide',
         },
     },
     securityPage: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index d2426569..2fd1b308 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1938,13 +1938,7 @@ const translations: TranslationDeepObject<typeof en> = {
             title: '非公開',
             subtitle: 'これらの詳細は、旅行や支払いのために使用されます。あなたの公開プロフィールに表示されることは決してありません。',
         },
-        aiPromptSection: {
-            title: 'AIプロンプト',
-            subtitle: 'カスタム指示を作成',
-            prompt: 'プロンプト',
-            editPrompt: 'プロンプトを編集',
-            promptCannotBeEmpty: 'プロンプトを入力してください',
-        },
+        aiPromptSection: {title: 'AI プロンプト', subtitle: 'カスタム手順を作成', prompt: 'プロンプト', editPrompt: 'プロンプトを編集', promptCannotBeEmpty: 'プロンプトを入力してください'},
     },
     securityPage: {
         title: 'セキュリティオプション',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 6c13c6dc..cda8baac 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1954,7 +1954,7 @@ const translations: TranslationDeepObject<typeof en> = {
             subtitle: 'Deze gegevens worden gebruikt voor reizen en betalingen. Ze worden nooit getoond op je openbare profiel.',
         },
         aiPromptSection: {
-            title: 'AI-prompt',
+            title: 'AI-opdracht',
             subtitle: 'Schrijf aangepaste instructies',
             prompt: 'Prompt',
             editPrompt: 'Prompt bewerken',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 26f850eb..73e735a2 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1954,13 +1954,7 @@ const translations: TranslationDeepObject<typeof en> = {
             title: 'Prywatne',
             subtitle: 'Te dane są używane do podróży i płatności. Nigdy nie są wyświetlane w Twoim publicznym profilu.',
         },
-        aiPromptSection: {
-            title: 'Prompt AI',
-            subtitle: 'Napisz niestandardowe instrukcje',
-            prompt: 'Zachęta',
-            editPrompt: 'Edytuj podpowiedź',
-            promptCannotBeEmpty: 'Pole nie może być puste',
-        },
+        aiPromptSection: {title: 'Prompt AI', subtitle: 'Napisz własne instrukcje', prompt: 'Monit', editPrompt: 'Edytuj podpowiedź', promptCannotBeEmpty: 'Pole nie może być puste'},
     },
     securityPage: {
         title: 'Opcje zabezpieczeń',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index b0a570c6..121eaa21 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1956,7 +1956,7 @@ const translations: TranslationDeepObject<typeof en> = {
             subtitle: 'Escrever instruções personalizadas',
             prompt: 'Prompt',
             editPrompt: 'Editar prompt',
-            promptCannotBeEmpty: 'O prompt não pode ficar vazio',
+            promptCannotBeEmpty: 'O prompt não pode estar vazio',
         },
     },
     securityPage: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 0bece09d..6227597f 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1899,7 +1899,7 @@ const translations: TranslationDeepObject<typeof en> = {
             title: '私人',
             subtitle: '这些详细信息用于旅行和付款。它们绝不会显示在你的公开资料中。',
         },
-        aiPromptSection: {title: 'AI 提示', subtitle: '编写自定义说明', prompt: '提示', editPrompt: '编辑提示', promptCannotBeEmpty: '提示不能为空'},
+        aiPromptSection: {title: 'AI 提示词', subtitle: '编写自定义说明', prompt: '提示', editPrompt: '编辑提示', promptCannotBeEmpty: '提示不能为空'},
     },
     securityPage: {
         title: '安全选项',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@puneetlath
Copy link
Copy Markdown
Contributor

Great, thanks. @parasharrajat can you complete your review? I don't think we're going to get any design feedback this week and let's not block on it. We'll still see if they have any feedback on the PR next week and if so, we can address in a follow-up.

@parasharrajat
Copy link
Copy Markdown
Member

parasharrajat commented May 23, 2026

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots

🔲 iOS / native

🔲 iOS / Safari

🔲 MacOS / Chrome

23.05.2026_14.45.57_REC.mp4

🔲 Android / native

23.05.2026_15.44.54_REC.mp4

@parasharrajat
Copy link
Copy Markdown
Member

parasharrajat commented May 23, 2026

BUG; iOS Safari web: Noticed one scrolling issue on iOS Safari. Sometimes, scrolling the box adds whitespace below the input. I think this can be solved.

This does not happen on other screens.

23.05.2026_14.48.04_REC.mp4

@parasharrajat
Copy link
Copy Markdown
Member

BUG: iOS: Screen does not scroll when focusing on the edit prompt input. Input remains hidden behind the keyboard.

23.05.2026_14.53.27_REC.mp4

Copy link
Copy Markdown
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 bugs.

@github-actions
Copy link
Copy Markdown
Contributor

🚧 @dubielzyk-expensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@dubielzyk-expensify
Copy link
Copy Markdown
Contributor

I'd expect the field to have the same padding before and after editing it. I assumed we'd just apply a disabled attribute on it, but either way it should look the same. Currently it changes:

CleanShot.2026-05-25.at.10.25.22.mp4

And the space between the buttons should be 8px not 12px:

CleanShot 2026-05-25 at 10 26 29@2x

@dubielzyk-expensify
Copy link
Copy Markdown
Contributor

I also noticed that I see the border on the avatar here. That shouldn't be the case:

CleanShot 2026-05-25 at 10 27 43@2x

It should look like this:

CleanShot 2026-05-25 at 10 28 36@2x

@shawnborton
Copy link
Copy Markdown
Contributor

Why do we need an explicit "Edit prompt" button here? I guess I haven't seen this pattern elsewhere in the app before so I'm mostly just trying to understand how it's supposed to work. Like why not just show the editable text area and then show a Save/Cancel button if we detect that changes are made?

@dubielzyk-expensify
Copy link
Copy Markdown
Contributor

We could for sure. The thinking was that you'd avoid any sort of mistypes or dialogs to discard.

The main goal was to avoid the push input here, but if we wanna stay super consistent then having it as a push input or just an editable text area makes the most sense.

Let me know what you're preference is.

@shawnborton
Copy link
Copy Markdown
Contributor

I guess the argument to avoid a push input is to reduce clicks. Having a "Edit" button is the same amount of clicks as the push input. So I think just having it be an editable textarea with a conditional Save/Cancel might be better? I don't feel strongly though, I am totally happy to go with what you have planned - just wanted to call that out.

@dubielzyk-expensify
Copy link
Copy Markdown
Contributor

I guess the argument to avoid a push input is to reduce clicks. Having a "Edit" button is the same amount of clicks as the push input.

Yeah more about perception than clicks cause you're right.

So I think just having it be an editable textarea with a conditional Save/Cancel might be better?

We can go with that. @dannymcclain for thoughts as well

@dannymcclain
Copy link
Copy Markdown
Contributor

No strong feelings from me. I like the explicitness of the Edit button but would be fine with what Shawn's suggesting. If we realize/get feedback that we've got a lot of mistypes and such going on we can add in the edit button.

Also I agree that the edit button and the push row are technically the same number of clicks, but agree with Jon that it's more about the perception haha.

@NicolasBonet
Copy link
Copy Markdown
Contributor Author

NicolasBonet commented May 25, 2026

@parasharrajat

BUG; iOS Safari web: Noticed one scrolling issue on iOS Safari. Sometimes, scrolling the box adds whitespace below the input. I think this can be solved.

Can you give more steps or pre-conditions to reproduce this? I have tried, but I definitely cannot reproduce this one ever in Safari iOS

BUG: iOS: Screen does not scroll when focusing on the edit prompt input. Input remains hidden behind the keyboard.

Fixed:

Screen.Recording.2026-05-25.at.3.01.22.PM.mov

…arentScrollViewRef from ProfilePage to manage scrolling behavior. Update imports and types for better clarity and functionality.
@github-actions
Copy link
Copy Markdown
Contributor

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@dubielzyk-expensify
Copy link
Copy Markdown
Contributor

Let's do what Shawn says and remove the edit button and just make that a regular text area with a save button:

CleanShot 2026-05-26 at 09 39 50@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants