Skip to content

Prevent removing or demoting RuleBot while Agent rules exist#96981

Open
MelvinBot wants to merge 7 commits into
mainfrom
claude-flagRuleBotNotEnforced
Open

Prevent removing or demoting RuleBot while Agent rules exist#96981
MelvinBot wants to merge 7 commits into
mainfrom
claude-flagRuleBotNotEnforced

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

When a workspace has Agent rules, they are enforced by a RuleBot agent that is added as a workspace admin. If that RuleBot is removed from the workspace (or its account is closed, the agent is deleted, or it's demoted to a role that can't act on other members' reports), the rules silently stop being enforced.

Instead of flagging that broken state after the fact, this PR prevents it from happening:

  • Members list (bulk remove) and member details page: attempting to remove the RuleBot while the workspace still has Agent rules shows a blocking "Unable to remove" modal — "The [agent rules] being enforced by RuleBot need to be removed from your workspace first before you can remove this agent." — with "agent rules" linking to the workspace Rules page. The only action is "Got it".
  • Role changes (member details role page and Members list bulk "Make member"/"Make auditor"): attempting to change the RuleBot's role to anything other than Admin while the workspace still has Agent rules shows a blocking "Unable to change role" modal with the same rules link. Promoting the RuleBot to Admin remains allowed.
  • Agent deletion (Account → Agents edit page "Delete agent", Agents list bulk delete, and Settings → Security → "Close account" while copiloting into the agent): attempting to delete an agent that is the RuleBot of any workspace that still has Agent rules shows a blocking "Unable to delete agent" modal.
  • Close account: if the signed-in account (e.g. via copilot access into the RuleBot account) is the RuleBot for any workspace that still has Agent rules, submitting the Close Account form shows a blocking "Unable to close account" modal instead of closing the account.
  • Added hasAgentRules / isRuleBotEnforcingRules / isRuleBotEnforcingRulesOnAnyPolicy helpers to AgentRulesUtils. Rules pending delete don't count, so removal is allowed once the last rule is deleted (even while the delete is still optimistic).

Once all Agent rules are deleted from the workspace, RuleBot can be removed, demoted, or deleted normally.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/663163
PROPOSAL: https://github.com/Expensify/Expensify/issues/663163#issuecomment-5060447097

Tests

  1. On a Control workspace, go to Rules → Agent rules and add an Agent rule. Confirm RuleBot is added as a workspace admin.
  2. Go to Members, open RuleBot's member details page, and press Remove from workspace. Verify the "Unable to remove" modal appears with the message "The agent rules being enforced by RuleBot need to be removed from your workspace first before you can remove this agent.", that "agent rules" links to the workspace Rules page, and that the only button is "Got it". Verify RuleBot is not removed.
  3. Back on the Members list, select RuleBot (alone or together with other members) and choose Remove members from the bulk actions dropdown. Verify the same "Unable to remove" modal appears and no member is removed.
  4. On RuleBot's member details page, press the Role row and select Member (or Auditor). Verify the "Unable to change role" modal appears with the message "The agent rules being enforced by RuleBot need to be removed from your workspace first before you can change this agent's role.", that "agent rules" links to the workspace Rules page, and that RuleBot's role is unchanged.
  5. Back on the Members list, select RuleBot and choose Make member (or Make auditor) from the bulk actions dropdown. Verify the same "Unable to change role" modal appears and no role is changed.
  6. Go to Account → Agents, open the RuleBot agent's edit page, and press Delete agent. Verify the "Unable to delete agent" modal appears with the message "The agent rules being enforced by RuleBot need to be removed from your workspace first before you can delete this agent." and the agent is not deleted.
  7. Back on the Agents list, select the RuleBot agent (alone or together with other agents) and choose Delete agent from the bulk actions dropdown. Verify the same "Unable to delete agent" modal appears and no agent is deleted.
  8. From the RuleBot agent's edit page, press Copilot into account to switch into the agent. Go to Settings → Security and press Close account. Verify the "Unable to delete agent" modal appears instead of the delete confirmation.
  9. Still copiloting into the agent, deep-link to settings/security/closeAccount, fill in the form, and submit. Verify the "Unable to close account" modal appears and the account is not closed.
  10. Switch back to your own account, delete all Agent rules from the workspace, then repeat steps 2–7. Verify the normal confirmation modals appear and RuleBot can be removed, demoted, and deleted.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests — the guard is derived from Onyx policy data, so the blocking modals appear identically while offline.

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

MacOS: Chrome / Safari rulebot-guard-1-member-details-remove rulebot-guard-2-bulk-remove rulebot-guard-3-bulk-role-change rulebot-guard-4-role-page rulebot-guard-5-edit-agent-delete rulebot-guard-6-agents-bulk-delete rulebot-guard-7-copilot-close-account rulebot-guard-8-close-account-form

@MelvinBot
MelvinBot requested a review from a team July 24, 2026 15:33
@OSBotify

This comment has been minimized.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing typecheck check and pushed to this branch.

Root cause: The new workspace.rules.agentRules.notEnforced copy string was added to en.ts and es.ts only. Every src/languages/*.ts file must define the same keys, so tsc failed with TS2741: Property 'notEnforced' is missing in the other 8 locales (de, fr, it, ja, nl, pl, pt-BR, zh-hans).

Fix: Added a localized notEnforced string to all 8 remaining locale files, placed right after enforcedBy (matching the en/es structure).

Verified locally: npm run typecheck-tsgo passes with no errors, and npm run fmt produced no further changes.

Notes
  • The checklist (PR Author Checklist) failure is the human-completed checklist, not a code check — it's expected to remain red until the co-author checks the boxes.
  • The remaining test/perf jobs were still running when I pushed; the new commit re-triggers them.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Claude's API is currently overloaded (HTTP 529). This is a temporary issue on Anthropic's side. Try again in a few minutes, or check status.anthropic.com.

Run details

@MelvinBot

Copy link
Copy Markdown
Contributor Author

typecheck now passes — the fix I pushed (a6741e1) resolved it.

What was wrong: The new workspace.rules.agentRules.notEnforced copy string existed only in en.ts/es.ts, but every src/languages/*.ts must define the same keys — so tsc failed with TS2741: Property 'notEnforced' is missing in the other 8 locales (de, fr, it, ja, nl, pl, pt-BR, zh-hans).

Fix: Added a localized notEnforced string to all 8 remaining locale files.

ESLint, Storybook, and the builds are also green. The remaining test/perf jobs are still running; since the change only adds translation keys it won't affect them. The only remaining red check is checklist (the human PR Author Checklist), which is expected to stay red until the boxes are checked.

@NicolasBonet
NicolasBonet marked this pull request as ready for review July 24, 2026 16:46
@NicolasBonet
NicolasBonet requested a review from a team as a code owner July 24, 2026 16:46
@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and linhvovan29546 and removed request for a team July 24, 2026 16:46
@melvin-bot

melvin-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

@linhvovan29546 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 24, 2026 16:46
@NicolasBonet NicolasBonet changed the title Flag Agent rules when no RuleBot is enforcing them [Hold Auth#23205] Flag Agent rules when no RuleBot is enforcing them Jul 24, 2026

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

Copy link
Copy Markdown

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: a6741e16d4

ℹ️ 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 src/components/AgentRules/useAgentRulesSectionHeader.tsx Outdated
@MelvinBot

Copy link
Copy Markdown
Contributor Author

All code checks are now green after my earlier push (a6741e1) — typecheck, all 8 test jobs, and the perf-test suite pass.

The one remaining red check is PR Reviewer Checklist / checklist, which is the human-completed reviewer checklist (it stays red until a reviewer checks the boxes). That's not a code failure and isn't something I resolve by pushing — nothing further for me to fix here.

Recap of the fix

The real failure was typecheck: the new workspace.rules.agentRules.notEnforced copy was only in en/es, but every src/languages/*.ts must define the same keys. I added a localized notEnforced string to the other 8 locales (de, fr, it, ja, nl, pl, pt-BR, zh-hans), which cleared the TS2741 errors.

@NicolasBonet
NicolasBonet requested a review from a team as a code owner July 24, 2026 17:07
@melvin-bot
melvin-bot Bot requested a review from ikevin127 July 24, 2026 17:07
@melvin-bot

melvin-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

@ikevin127 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 24, 2026 17:07
@NicolasBonet NicolasBonet changed the title [Hold Auth#23205] Flag Agent rules when no RuleBot is enforcing them [Hold Auth#23205] Prevent removing RuleBot while Agent rules exist Jul 24, 2026
@OSBotify

This comment has been minimized.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

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/libs/AgentRulesUtils.ts 95.00% <100.00%> (+2.14%) ⬆️
src/pages/workspace/WorkspaceMembersPage.tsx 61.53% <100.00%> (+1.16%) ⬆️
...s/workspace/members/WorkspaceMemberDetailsPage.tsx 72.83% <100.00%> (+0.33%) ⬆️
src/pages/settings/Agents/EditAgentPage.tsx 92.53% <0.00%> (-2.85%) ⬇️
...c/pages/settings/Security/SecuritySettingsPage.tsx 0.00% <0.00%> (ø)
src/pages/settings/Agents/AgentsPage.tsx 77.17% <0.00%> (-2.61%) ⬇️
src/pages/settings/Security/CloseAccountPage.tsx 0.00% <0.00%> (ø)
...rkspace/members/WorkspaceMemberDetailsRolePage.tsx 0.00% <0.00%> (ø)
... and 33 files with indirect coverage changes

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing Compare knip issues against main check and pushed to this branch (0e6d520).

Root cause: src/libs/AgentRulesUtils.ts exported hasAgentRules, but nothing imports it — it's only used internally by isRuleBotEnforcingRules in the same file. Knip flagged it as a new unused export (delta +1 vs main).

Fix: Removed hasAgentRules from the export list; it stays defined and used internally.

Verified locally: ESLint passes on the file, and the internal call in isRuleBotEnforcingRules is unchanged.

Notes
  • The earlier typecheck failure (missing notEnforced locale key) is no longer relevant — the branch was reworked and that copy string is no longer part of the PR.
  • Remaining test/perf/build jobs are still running; this push re-triggers them.

MelvinBot and others added 4 commits July 24, 2026 13:16
When a workspace has Agent rules but no live RuleBot assigned (none
assigned, the agent was deleted, or it was removed from the workspace
member list), the rules are silently not enforced. Surface this in the
Agent rules section header with a red warning so admins know.

Adds a hasRules input to useAgentRulesSectionHeader and renders the
warning when rules exist but ruleBotAccountID is missing or the assigned
bot is no longer an active policy member.

Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
The server assigns a RuleBot when it processes a rule creation, so the
optimistic add briefly shows the warning until the response arrives.
Only count server-confirmed rules when deciding enforcement is missing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the not-enforced warning approach: instead of flagging rules
without an enforcer after the fact, prevent RuleBot from being removed
(member details page and bulk members removal) and its account from
being closed while agent rules still exist on the workspace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NicolasBonet
NicolasBonet force-pushed the claude-flagRuleBotNotEnforced branch from 0e6d520 to 89bdcec Compare July 24, 2026 18:16
Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing Compare knip issues against main check and pushed to this branch.

Root cause: The latest commit on this branch (Block removing RuleBot and closing its account while agent rules exist) added hasAgentRules to the export list of src/libs/AgentRulesUtils.ts, but it's only used internally by isRuleBotEnforcingRules in the same file. Knip flagged it as a new unused export (delta +1).

Fix: Removed hasAgentRules from the export statement — it stays defined and used within the file. The other three exports (getAgentRuleDisplayTitle, getVisibleAgentRules, isRuleBotEnforcingRules) are all imported elsewhere, so they remain exported.

Verification
  • Grep across src/ and tests/ confirms hasAgentRules is referenced only in its own definition, the internal call inside isRuleBotEnforcingRules, and the export line — nothing imports it, so removing the export can't break any import.
  • The earlier typecheck failure (missing notEnforced locale keys) was already resolved by commit Add notEnforced translation to remaining locales to fix typecheck.

@NicolasBonet NicolasBonet changed the title [Hold Auth#23205] Prevent removing RuleBot while Agent rules exist Prevent removing RuleBot while Agent rules exist Jul 24, 2026
@NicolasBonet NicolasBonet changed the title Prevent removing RuleBot while Agent rules exist Prevent removing or demoting RuleBot while Agent rules exist Jul 24, 2026
…xist

Deleting the RuleBot agent (edit agent page, agents bulk delete, or close
account while copiloting into it) or demoting it to a non-admin role
(role selection page, members bulk role change) would leave the
workspace's agent rules without an enforcer, so both are blocked with an
explanatory modal until the rules are removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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 899fb5ef09a..85d889d076e 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7802,15 +7802,14 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
                 deleteRuleConfirmation: 'Sind Sie sicher, dass Sie diese Regel löschen möchten?',
                 unableToRemoveTitle: 'Entfernen nicht möglich',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `Die von RuleBot durchgesetzten <a href="${rulesRoute}">Agentenregeln</a> müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie diese Agentin/diesen Agenten entfernen können.`,
+                    `Die von RuleBot durchgesetzten <a href="${rulesRoute}">Agentenregeln</a> müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie diesen Agenten entfernen können.`,
                 unableToCloseAccountTitle: 'Konto kann nicht geschlossen werden',
-                unableToCloseAccountPrompt: 'Die von RuleBot durchgesetzten Agentenregeln müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie dieses Konto schließen können.',
+                unableToCloseAccountPrompt: 'Die von RuleBot durchgesetzten Agentenregeln müssen zunächst aus Ihrem Workspace entfernt werden, bevor Sie dieses Konto schließen können.',
                 unableToDeleteAgentTitle: 'Agent kann nicht gelöscht werden',
-                unableToDeleteAgentPrompt:
-                    'Die von RuleBot durchgesetzten Agentenregeln müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie diese Agentin/diesen Agenten löschen können.',
+                unableToDeleteAgentPrompt: 'Die von RuleBot durchgesetzten Agentenregeln müssen zuerst aus Ihrem Arbeitsbereich entfernt werden, bevor Sie diesen Agenten löschen können.',
                 unableToChangeRoleTitle: 'Rolle kann nicht geändert werden',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `Die von RuleBot durchgesetzten <a href="${rulesRoute}">Agentenregeln</a> müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie die Rolle dieser Agentin/dieses Agenten ändern können.`,
+                    `Die von RuleBot durchgesetzten <a href="${rulesRoute}">Agent:innenregeln</a> müssen zuerst aus Ihrem Workspace entfernt werden, bevor Sie die Rolle dieser:s Agent:in ändern können.`,
                 describeRuleTitle: 'Beschreiben Sie die Regel, der Ihre KI-Agentin/Ihr KI-Agent folgen soll',
                 describeRuleHeadline: 'Beschreibe deine Regel',
                 disclaimer: 'KI-Agenten können Fehler machen.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 5927128dfc5..9410172197d 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -7716,14 +7716,14 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
                 deleteRuleConfirmation: '¿Seguro que quieres eliminar esta regla?',
                 unableToRemoveTitle: 'No se puede eliminar',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `Las <a href="${rulesRoute}">reglas de agente</a> que RuleBot está aplicando deben eliminarse primero de tu espacio de trabajo antes de que puedas eliminar este agente.`,
+                    `Primero debes eliminar de tu espacio de trabajo las <a href="${rulesRoute}">reglas de agente</a> que aplica RuleBot antes de poder eliminar este agente.`,
                 unableToCloseAccountTitle: 'No se puede cerrar la cuenta',
-                unableToCloseAccountPrompt: 'Las reglas de agente que RuleBot está aplicando deben eliminarse primero de tu espacio de trabajo antes de que puedas cerrar esta cuenta.',
-                unableToDeleteAgentTitle: 'No se puede eliminar el agente',
-                unableToDeleteAgentPrompt: 'Las reglas de agente que RuleBot está aplicando deben eliminarse primero de tu espacio de trabajo antes de que puedas eliminar este agente.',
+                unableToCloseAccountPrompt: 'Primero hay que eliminar de tu espacio de trabajo las reglas de agente que está aplicando RuleBot antes de poder cerrar esta cuenta.',
+                unableToDeleteAgentTitle: 'No se puede eliminar al agente',
+                unableToDeleteAgentPrompt: 'Primero hay que eliminar las reglas del agente que está aplicando RuleBot en tu espacio de trabajo antes de que puedas borrar este agente.',
                 unableToChangeRoleTitle: 'No se puede cambiar el rol',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `Las <a href="${rulesRoute}">reglas de agente</a> que RuleBot está aplicando deben eliminarse primero de tu espacio de trabajo antes de que puedas cambiar el rol de este agente.`,
+                    `Primero tienes que eliminar de tu espacio de trabajo las <a href="${rulesRoute}">reglas de agente</a> que está aplicando RuleBot antes de poder cambiar el rol de este agente.`,
                 disclaimer: 'Los agentes de IA pueden cometer errores.',
                 agentCreatedTitle: '¡RuleBot se ha añadido a tu espacio de trabajo!',
                 agentCreatedDescription: (agentsRoute: string) =>
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index ca203bcd4d6..36b36397c96 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7828,17 +7828,17 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
                 editRuleTitle: 'Modifier la règle',
                 deleteRule: 'Supprimer la règle',
                 deleteRuleConfirmation: 'Voulez-vous vraiment supprimer cette règle ?',
-                unableToRemoveTitle: 'Suppression impossible',
+                unableToRemoveTitle: 'Impossible de supprimer',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `Les <a href="${rulesRoute}">règles d’agent</a> appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez retirer cet agent.`,
+                    `Les <a href="${rulesRoute}">règles d’agent</a> appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez supprimer cet agent.`,
                 unableToCloseAccountTitle: 'Impossible de fermer le compte',
-                unableToCloseAccountPrompt: 'Les règles d’agent appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez fermer ce compte.',
+                unableToCloseAccountPrompt: 'Les règles d’agent appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant de pouvoir fermer ce compte.',
                 unableToDeleteAgentTitle: 'Impossible de supprimer l’agent',
                 unableToDeleteAgentPrompt:
                     'Les règles d’agent appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez supprimer cet agent.',
-                unableToChangeRoleTitle: 'Impossible de changer le rôle',
+                unableToChangeRoleTitle: 'Impossible de modifier le rôle',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `Les <a href="${rulesRoute}">règles d’agent</a> appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez changer le rôle de cet agent.`,
+                    `Les <a href="${rulesRoute}">règles d’agent</a> appliquées par RuleBot doivent d’abord être supprimées de votre espace de travail avant que vous puissiez modifier le rôle de cet agent.`,
                 describeRuleTitle: 'Décrivez la règle que votre agent IA doit suivre',
                 describeRuleHeadline: 'Décrivez votre règle',
                 disclaimer: 'Les agents IA peuvent faire des erreurs.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 50e5bac265e..281aeb57deb 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7780,14 +7780,14 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
                 deleteRuleConfirmation: 'Sei sicuro di voler eliminare questa regola?',
                 unableToRemoveTitle: 'Impossibile rimuovere',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `Le <a href="${rulesRoute}">regole agente</a> applicate da RuleBot devono essere rimosse dal tuo spazio di lavoro prima di poter rimuovere questo agente.`,
+                    `Le <a href="${rulesRoute}">regole dell'agente</a> applicate da RuleBot devono prima essere rimosse dal tuo spazio di lavoro prima che tu possa rimuovere questo agente.`,
                 unableToCloseAccountTitle: 'Impossibile chiudere l’account',
-                unableToCloseAccountPrompt: 'Le regole agente applicate da RuleBot devono essere rimosse dal tuo spazio di lavoro prima di poter chiudere questo account.',
-                unableToDeleteAgentTitle: 'Impossibile eliminare l’agente',
-                unableToDeleteAgentPrompt: 'Le regole agente applicate da RuleBot devono essere rimosse dal tuo spazio di lavoro prima di poter eliminare questo agente.',
+                unableToCloseAccountPrompt: 'Le regole dell’agente applicate da RuleBot devono prima essere rimosse dal tuo workspace prima che tu possa chiudere questo account.',
+                unableToDeleteAgentTitle: "Impossibile eliminare l'agente",
+                unableToDeleteAgentPrompt: 'Le regole dell’agente applicate da RuleBot devono prima essere rimosse dal tuo spazio di lavoro prima che tu possa eliminare questo agente.',
                 unableToChangeRoleTitle: 'Impossibile modificare il ruolo',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `Le <a href="${rulesRoute}">regole agente</a> applicate da RuleBot devono essere rimosse dal tuo spazio di lavoro prima di poter modificare il ruolo di questo agente.`,
+                    `Le <a href="${rulesRoute}">regole dell’agente</a> applicate da RuleBot devono prima essere rimosse dal tuo workspace prima che tu possa cambiare il ruolo di questo agente.`,
                 describeRuleTitle: 'Descrivi la regola che il tuo agente AI deve seguire',
                 describeRuleHeadline: 'Descrivi la tua regola',
                 disclaimer: 'Gli agenti IA possono commettere errori.',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 84ac4cf0246..453c4d0ca44 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7687,14 +7687,14 @@ ${reportName}`,
                 deleteRuleConfirmation: 'このルールを削除してもよろしいですか?',
                 unableToRemoveTitle: '削除できません',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `このエージェントを削除する前に、RuleBot が適用している<a href="${rulesRoute}">エージェントルール</a>をワークスペースから削除する必要があります。`,
+                    `このエージェントを削除する前に、RuleBot によって適用されている<a href="${rulesRoute}">エージェントルール</a>をワークスペースから先に削除する必要があります。`,
                 unableToCloseAccountTitle: 'アカウントを閉鎖できません',
-                unableToCloseAccountPrompt: 'このアカウントを閉鎖する前に、RuleBot が適用しているエージェントルールをワークスペースから削除する必要があります。',
+                unableToCloseAccountPrompt: 'このアカウントを閉鎖する前に、RuleBot によって適用されているエージェントルールを、まずワークスペースから削除する必要があります。',
                 unableToDeleteAgentTitle: 'エージェントを削除できません',
-                unableToDeleteAgentPrompt: 'このエージェントを削除する前に、RuleBot が適用しているエージェントルールをワークスペースから削除する必要があります。',
+                unableToDeleteAgentPrompt: 'このエージェントを削除するには、まず RuleBot によって適用されているエージェントルールをワークスペースから削除する必要があります。',
                 unableToChangeRoleTitle: 'ロールを変更できません',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `このエージェントのロールを変更する前に、RuleBot が適用している<a href="${rulesRoute}">エージェントルール</a>をワークスペースから削除する必要があります。`,
+                    `RuleBot によって適用されている <a href="${rulesRoute}">エージェントルール</a> は、このエージェントのロールを変更する前に、まずワークスペースから削除する必要があります。`,
                 describeRuleTitle: 'AI エージェントに従わせるルールを記述してください',
                 describeRuleHeadline: 'ルールを説明する',
                 disclaimer: 'AI エージェントは間違える場合があります。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index ed5698163bc..0eaeadf9575 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7759,16 +7759,16 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
                 editRuleTitle: 'Regel bewerken',
                 deleteRule: 'Regel verwijderen',
                 deleteRuleConfirmation: 'Weet je zeker dat je deze regel wilt verwijderen?',
-                unableToRemoveTitle: 'Verwijderen niet mogelijk',
+                unableToRemoveTitle: 'Kan niet verwijderen',
                 unableToRemovePrompt: (rulesRoute: string) =>
                     `De <a href="${rulesRoute}">agentregels</a> die door RuleBot worden afgedwongen, moeten eerst uit je werkruimte worden verwijderd voordat je deze agent kunt verwijderen.`,
-                unableToCloseAccountTitle: 'Account kan niet worden gesloten',
-                unableToCloseAccountPrompt: 'De agentregels die door RuleBot worden afgedwongen, moeten eerst uit je werkruimte worden verwijderd voordat je dit account kunt sluiten.',
-                unableToDeleteAgentTitle: 'Agent kan niet worden verwijderd',
-                unableToDeleteAgentPrompt: 'De agentregels die door RuleBot worden afgedwongen, moeten eerst uit je werkruimte worden verwijderd voordat je deze agent kunt verwijderen.',
-                unableToChangeRoleTitle: 'Rol kan niet worden gewijzigd',
+                unableToCloseAccountTitle: 'Kan account niet sluiten',
+                unableToCloseAccountPrompt: 'De agentregels die door RuleBot worden afgedwongen, moeten eerst uit je werkruimte worden verwijderd voordat je deze account kunt sluiten.',
+                unableToDeleteAgentTitle: 'Kan agent niet verwijderen',
+                unableToDeleteAgentPrompt: 'De door RuleBot afgedwongen agentregels moeten eerst uit je werkruimte worden verwijderd voordat je deze agent kunt verwijderen.',
+                unableToChangeRoleTitle: 'Kan rol niet wijzigen',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `De <a href="${rulesRoute}">agentregels</a> die door RuleBot worden afgedwongen, moeten eerst uit je werkruimte worden verwijderd voordat je de rol van deze agent kunt wijzigen.`,
+                    `De door RuleBot afgedwongen <a href="${rulesRoute}">agentregels</a> moeten eerst uit je werkruimte worden verwijderd voordat je de rol van deze agent kunt wijzigen.`,
                 describeRuleTitle: 'Beschrijf de regel die je AI-agent moet volgen',
                 describeRuleHeadline: 'Beschrijf je regel',
                 disclaimer: 'AI-agents kunnen fouten maken.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 1cb126b62df..fe2d433af80 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7741,14 +7741,14 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
                 deleteRuleConfirmation: 'Na pewno chcesz usunąć tę regułę?',
                 unableToRemoveTitle: 'Nie można usunąć',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `<a href="${rulesRoute}">Zasady agenta</a> egzekwowane przez RuleBot muszą najpierw zostać usunięte z przestrzeni roboczej, zanim będzie można usunąć tego agenta.`,
+                    `Zanim będziesz mógł usunąć tego agenta, musisz najpierw usunąć z przestrzeni roboczej <a href="${rulesRoute}">reguły agentów</a> wymuszane przez RuleBota.`,
                 unableToCloseAccountTitle: 'Nie można zamknąć konta',
-                unableToCloseAccountPrompt: 'Zasady agenta egzekwowane przez RuleBot muszą najpierw zostać usunięte z przestrzeni roboczej, zanim będzie można zamknąć to konto.',
+                unableToCloseAccountPrompt: 'Zanim będziesz mógł zamknąć to konto, musisz najpierw usunąć z przestrzeni roboczej reguły agentów egzekwowane przez RuleBot.',
                 unableToDeleteAgentTitle: 'Nie można usunąć agenta',
-                unableToDeleteAgentPrompt: 'Zasady agenta egzekwowane przez RuleBot muszą najpierw zostać usunięte z przestrzeni roboczej, zanim będzie można usunąć tego agenta.',
+                unableToDeleteAgentPrompt: 'Zanim będziesz mógł usunąć tego agenta, musisz najpierw usunąć z przestrzeni roboczej reguły agenta egzekwowane przez RuleBota.',
                 unableToChangeRoleTitle: 'Nie można zmienić roli',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `<a href="${rulesRoute}">Zasady agenta</a> egzekwowane przez RuleBot muszą najpierw zostać usunięte z przestrzeni roboczej, zanim będzie można zmienić rolę tego agenta.`,
+                    `Aby zmienić rolę tego agenta, najpierw musisz usunąć z jego przestrzeni roboczej <a href="${rulesRoute}">reguły agenta</a>, które są egzekwowane przez RuleBota.`,
                 describeRuleTitle: 'Opisz zasadę, której ma przestrzegać twój agent AI',
                 describeRuleHeadline: 'Opisz swoją regułę',
                 disclaimer: 'Agenci AI mogą popełniać błędy.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 2adcc47c8e3..f6dd812ae77 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7751,16 +7751,16 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
                 editRuleTitle: 'Editar regra',
                 deleteRule: 'Excluir regra',
                 deleteRuleConfirmation: 'Tem certeza de que quer excluir esta regra?',
-                unableToRemoveTitle: 'Não é possível remover',
+                unableToRemoveTitle: 'Não foi possível remover',
                 unableToRemovePrompt: (rulesRoute: string) =>
-                    `As <a href="${rulesRoute}">regras de agente</a> aplicadas pelo RuleBot precisam ser removidas do seu espaço de trabalho antes que você possa remover este agente.`,
-                unableToCloseAccountTitle: 'Não é possível encerrar a conta',
-                unableToCloseAccountPrompt: 'As regras de agente aplicadas pelo RuleBot precisam ser removidas do seu espaço de trabalho antes que você possa encerrar esta conta.',
-                unableToDeleteAgentTitle: 'Não é possível excluir o agente',
-                unableToDeleteAgentPrompt: 'As regras de agente aplicadas pelo RuleBot precisam ser removidas do seu espaço de trabalho antes que você possa excluir este agente.',
-                unableToChangeRoleTitle: 'Não é possível alterar a função',
+                    `As <a href="${rulesRoute}">regras de agente</a> aplicadas pelo RuleBot precisam ser removidas do seu workspace antes que você possa remover este agente.`,
+                unableToCloseAccountTitle: 'Não foi possível encerrar a conta',
+                unableToCloseAccountPrompt: 'As regras de agente aplicadas pelo RuleBot precisam ser removidas do seu workspace antes que você possa encerrar esta conta.',
+                unableToDeleteAgentTitle: 'Não é possível excluir agente',
+                unableToDeleteAgentPrompt: 'As regras de agente aplicadas pelo RuleBot precisam ser removidas do seu workspace antes que você possa excluir este agente.',
+                unableToChangeRoleTitle: 'Não foi possível alterar a função',
                 unableToChangeRolePrompt: (rulesRoute: string) =>
-                    `As <a href="${rulesRoute}">regras de agente</a> aplicadas pelo RuleBot precisam ser removidas do seu espaço de trabalho antes que você possa alterar a função deste agente.`,
+                    `As <a href="${rulesRoute}">regras de agente</a> aplicadas pelo RuleBot precisam ser removidas do seu workspace antes que você possa alterar a função deste agente.`,
                 describeRuleTitle: 'Descreva a regra que seu agente de IA deve seguir',
                 describeRuleHeadline: 'Descreva sua regra',
                 disclaimer: 'Os agentes de IA podem cometer erros.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index db70220118f..e031eadd822 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7514,13 +7514,13 @@ ${reportName}`,
                 deleteRule: '删除规则',
                 deleteRuleConfirmation: '确定要删除此规则吗?',
                 unableToRemoveTitle: '无法移除',
-                unableToRemovePrompt: (rulesRoute: string) => `在移除此代理之前,需要先从工作区中移除由 RuleBot 执行的<a href="${rulesRoute}">代理规则</a>。`,
+                unableToRemovePrompt: (rulesRoute: string) => `在删除此代理之前,必须先从您的工作区中移除由 RuleBot 强制执行的<a href="${rulesRoute}">代理规则</a>。`,
                 unableToCloseAccountTitle: '无法关闭账户',
-                unableToCloseAccountPrompt: '在关闭此账户之前,需要先从工作区中移除由 RuleBot 执行的代理规则。',
+                unableToCloseAccountPrompt: '在您关闭此账户之前,需先从工作区中移除由 RuleBot 执行的代理规则。',
                 unableToDeleteAgentTitle: '无法删除代理',
-                unableToDeleteAgentPrompt: '在删除此代理之前,需要先从工作区中移除由 RuleBot 执行的代理规则。',
+                unableToDeleteAgentPrompt: '在删除此代理之前,必须先从您的工作区中移除由 RuleBot 强制执行的代理规则。',
                 unableToChangeRoleTitle: '无法更改角色',
-                unableToChangeRolePrompt: (rulesRoute: string) => `在更改此代理的角色之前,需要先从工作区中移除由 RuleBot 执行的<a href="${rulesRoute}">代理规则</a>。`,
+                unableToChangeRolePrompt: (rulesRoute: string) => `在更改此代理的角色之前,必须先从你的工作区中移除由 RuleBot 强制执行的<a href="${rulesRoute}">代理规则</a>。`,
                 describeRuleTitle: '描述你的 AI 代理需要遵循的规则',
                 describeRuleHeadline: '描述您的规则',
                 disclaimer: 'AI 智能体可能会犯错。',

Note

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

View workflow run

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

3 participants