Mocks: Backport mock user switcher from v19 #24487
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 183 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.312
Real PR Conversation Timeline
1 comments
"Review active on #24487"
general
weight: 0.35
claude[bot]
Description
Backports the mock user switcher from
v19/dev, so it isn't lost whenv17/devis merged up to v18 and v19.In the mocked backoffice, the current user was always the first user of the mock data set. A mock set can now opt in to
userSwitcher, and when it does, a User button appears in the header next to the mock set switcher. Pick a user from it and the backoffice reloads as that user, with their own permissions, sections and start nodes. The choice is remembered, and it falls back to the first user if the remembered one isn't in the current set.It's turned on for the
defaultandkitchenSinksets, which are the two v17 sets with several users. The v19-only sets that use it (blocksReusableContentandlanguagePermissions) don't exist on v17.How to test?
1. Run
npm run devinsrc/Umbraco.Web.UI.Clientand open the backoffice with the mocked API.2. With the Default mock set, click the User button in the header and pick a different user. The page reloads and the user button, the current user's name in the user menu and the visible sections should match the user you picked.
3. Switch to the Kitchen Sink set from the Mock button and repeat step 2.
4. Switch to the Documents set. The User button should not be shown, and the current user is the first user of the set.