Repository navigation
feat(mentor): safety tab becomes a thin wrapper over the SDK - #550
Open
conradmugabe wants to merge 3 commits into
Open
conradmugabe wants to merge 3 commits into
conradmugabe wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New journey 79 (safety-01..12): the four cards, moderation and safety switches persisting, prompt edit and validation, copy, tooltips, flagged-prompts empty/populated/pagination/search/filter/delete, and non-admin gating. Passed against main before the swap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tab renders AgentSafetyTab inside AgentSettingsProvider and injects the OS pieces: the flagged-prompts modal, the view_moderation_logs permission, the free-trial gate, and markdown prompt rendering. Delete the local tab, its tests, the SafetyPrompt type, and the i18n keys the SDK now owns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Safety tab in the Edit Agent modal is now a thin wrapper over the SDK's
AgentSafetyTab. It is part of the SDK-as-source-of-truth migration; Skills is #549.What changed
edit-mentor-modal/safety-tab.tsxrendersAgentSafetyTabinsideAgentSettingsProvider(tenant, agent id, username, RBAC,executeGatedActionset to the OS free-trial check). It passes in the OS pieces the SDK accepts as props:showFlaggedPrompts, from the same#view_moderation_logspermission check;Markdown+parsePrompt);FreeTrialDialog.tabs/safety-tab.tsx(525 lines) and its 1,419-line test;SafetyPrompttype, with its fixtures and tests inedit-prompt-modal;tabsSafetyTabkeys per locale (en, es, fr, zh).main. It covers:Verification
PLAYWRIGHT_HTML_OPEN=never pnpm exec playwright test --config e2e/playwright.config.ts e2e/journeys/79-mentor-safety-tab.spec.ts --project=mentor-desktop-chrome --workers=1 --retries=0against a production build of this branch: 16 passed. No spec was edited after the swap, and no test was re-run.Behaviour differences
Follow-ups (not in this PR)
onContactUseris never rendered.ViolationCategoriesimport inflagged-prompts/index.tsx.test.fixme.🤖 Generated with Claude Code