Skip to content

Fix - Agents - "AI agents can make mistakes" is not displayed below input prompt - #97126

Merged
carlosmiceli merged 4 commits into
Expensify:mainfrom
FitseTLT:fix-add-ai-disclaimer-to-missing-pages
Aug 1, 2026
Merged

Fix - Agents - "AI agents can make mistakes" is not displayed below input prompt#97126
carlosmiceli merged 4 commits into
Expensify:mainfrom
FitseTLT:fix-add-ai-disclaimer-to-missing-pages

Conversation

@FitseTLT

@FitseTLT FitseTLT commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR adds the existing workspace.rules.agentRules.disclaimer string to the three agent-prompt input surfaces that were missing it: the Add agent page (appended to the end of the existing copilot note, per design), the Edit agent prompt page (below the input, matching the Add-rule Edit-tab pattern), and the Profile AI-prompt section (below the input). No new copy or translations are added.

Fixed Issues

$ #96991
PROPOSAL: #96991 (comment)

Tests

  1. Go to Settings > Agents > Add agent. Verify the copilot note under the instructions input now ends with "AI agents can make mistakes."
  2. Open an existing agent > Edit prompt (the instructions field). Verify "AI agents can make mistakes." shows below the input.
  3. Copilot into an agent account, open its Profile, and scroll to the AI prompt section. Verify "AI agents can make mistakes." shows below the prompt input, above Save.
  • Verify that no errors appear in the JS console

Offline tests

Same as tests (changes are not offline specific)

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 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 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)
  • 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)
  • 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.
  • 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.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
2026-07-27.20-18-04.mp4
iOS: Native
iOS: mWeb Safari
2026-07-27.20-13-59.mp4
MacOS: Chrome / Safari
2026-07-27.19-59-25.mp4

@FitseTLT
FitseTLT requested review from a team as code owners July 27, 2026 17:20
@melvin-bot
melvin-bot Bot requested review from Eskalifer1 and joekaufmanexpensify and removed request for a team July 27, 2026 17:20
@melvin-bot

melvin-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

@melvin-bot
melvin-bot Bot removed the request for review from a team July 27, 2026 17:20
@FitseTLT

Copy link
Copy Markdown
Contributor Author

@shawnborton pls review the snapshots. And also give attention to the 3rd spot which appears under the prompt in profile page when you switch your session to an agent. I think it is need there too but let me know your opinion.

@Eskalifer1

Eskalifer1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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 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 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)
  • 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)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • 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
    • 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 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.
  • 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/Videos

Android: HybridApp 97126-android-native-1 97126-android-native-2 97126-android-native-3
Android: mWeb Chrome 97126-android-web-1 97126-android-web-2 97126-android-web-3
iOS: HybridApp 97126-ios-native-1 97126-ios-native-2 97126-ios-native-3
iOS: mWeb Safari 97126-ios-web-1 97126-ios-web-2 97126-ios-web-3
MacOS: Chrome / Safari 97126-web-1 97126-web-2 97126-web-3

@Eskalifer1

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 379079c567

ℹ️ 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".

@joekaufmanexpensify joekaufmanexpensify left a comment

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.

👍

@Eskalifer1

Copy link
Copy Markdown
Contributor

Hi @FitseTLT! Overall, the changes look good. I just have two minor comments:

  1. I suggest writing “N/A” (and explaining why) in the Offline tests section instead of Same as tests—the reason is that we aren't adding any offline logic
  2. In my opinion, the indentation here is too large, but someone from the design team will let us know if that’s actually the case
Знімок екрана 2026-07-27 о 22 35 27

@Eskalifer1

Copy link
Copy Markdown
Contributor

I noticed one difference compared to all (or most) other pages on the project while reviewing this PR. The issue is that the page with only one input field doesn’t have autofocus.

Here’s how it works now:

not-working.mov

Here’s how it will work with autofocus:

working.mov

Here’s a page with similar functionality (it has autofocus):

workspace-name.mov

If you think that's really the case, then I can open a PR per Contributors+ Process Doc (C+)

cc: @shawnborton @carlosmiceli

@Eskalifer1

Copy link
Copy Markdown
Contributor

Let's wait for design team and then i will aprove ASAP

@shawnborton

Copy link
Copy Markdown
Contributor

Makes sense to use the autofocus behavior we have elsewhere.

@shawnborton

Copy link
Copy Markdown
Contributor

In my opinion, the indentation here is too large, but someone from the design team will let us know if that’s actually the case

This is fine because we're just centering the text, not indenting it.

@shawnborton

Copy link
Copy Markdown
Contributor

But actually, given the card looks like this, I actually think we should probably just left-align this specific case:
CleanShot 2026-07-28 at 15 57 32@2x

@FitseTLT

Copy link
Copy Markdown
Contributor Author

Is this better @shawnborton ?
image

@shawnborton

Copy link
Copy Markdown
Contributor

Can we reduce the space above the small fine print and increase the space below it? Maybe reduce the top padding by 4px and increase bottom padding by 8px or something?

@FitseTLT

Copy link
Copy Markdown
Contributor Author
image

@shawnborton

Copy link
Copy Markdown
Contributor

Nice, send it 👍

@FitseTLT

Copy link
Copy Markdown
Contributor Author

U can proceed @Eskalifer1

@Eskalifer1 Eskalifer1 left a comment

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.

LGTM!

@melvin-bot
melvin-bot Bot requested a review from carlosmiceli July 31, 2026 19:45
@Eskalifer1

Copy link
Copy Markdown
Contributor

Hi @carlosmiceli also take a look at this comment: #97126 (comment).

Here is confirmation from design team: #97126 (comment)

@carlosmiceli

Copy link
Copy Markdown
Contributor

@Eskalifer1 I agree with Shawn and it should be implemented in a new PR 👍

@carlosmiceli
carlosmiceli merged commit 7c85114 into Expensify:main Aug 1, 2026
34 of 36 checks passed
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify

OSBotify commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

OSBotify commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.4.49-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes required

I reviewed the changes in this PR against the help site articles under docs/articles, and no docs update is needed.

Why: This PR is a UI-only change that appends the existing workspace.rules.agentRules.disclaimer string ("AI agents can make mistakes.") to three agent-prompt input surfaces (Add agent, Edit prompt, and the Profile AI-prompt section). It adds no new copy, feature, behavior, or terminology — it's a helper-text disclaimer below input fields.

The underlying concept is already documented on the help site, and help articles don't describe per-input helper/disclaimer text:

Since no content, feature, or user-facing workflow changed, there's nothing to add or revise in the help site, so I did not open a draft docs PR. If you'd like the disclaimer explicitly called out somewhere in the agent docs anyway, let me know and I'll draft one.

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