Update and fixes for Persona CRD - #3954
Conversation
Makes self-service sidebar tab toggle-able again Implement switch for CD and Plural AI sidebar tabs
Soffi AI SummaryThis PR extends the Persona CRD's sidebar configuration to support toggling the CD and Plural AI sidebar tabs — two tabs that were previously not controllable via persona settings. The motivation is to restore a broken self-service UX: admins using Persona-based access control could not hide or show the CD and AI sidebar tabs for their users. The fix propagates new
The second commit adds updated API documentation reflecting the review feedback on the new fields. Commits
Updated: 2026-08-03 20:14 UTC |
|
plural deploy to dev |
Greptile SummaryThis PR adds persona-controlled visibility for the Continuous Deployment, Self service, and Plural AI sidebar entries and propagates the new CD/AI fields through GraphQL and the Persona CRD. It also regenerates the associated frontend, Go client, persisted-query, CRD, and documentation artifacts.
Confidence Score: 4/5The backward-compatibility behavior for existing restricted personas should be fixed before merging because it can unexpectedly remove their CD and Plural AI navigation. The new sidebar predicates coerce absent CD and AI fields to false, while existing persisted persona embeds can predate those optional fields and previously received both navigation entries unconditionally. Files Needing Attention: assets/src/components/layout/Sidebar.tsx and lib/console/schema/persona.ex
|
| Filename | Overview |
|---|---|
| assets/src/components/layout/Sidebar.tsx | Adds the requested sidebar controls, but absent values on existing personas are interpreted as false and hide previously unconditional CD and AI entries. |
| lib/console/schema/persona.ex | Correctly adds nullable CD and AI fields to the persisted persona sidebar embed, but does not itself provide backward-compatible defaults. |
| lib/console/graphql/users.ex | Consistently exposes CD and AI on both PersonaSidebar GraphQL input and output types. |
| go/controller/api/v1alpha1/persona_types.go | Adds optional CRD fields and correctly maps both into Console API attributes. |
| assets/src/components/settings/usermanagement/personas/PersonaAttributesEdit.tsx | Supplies true defaults when loading persona configuration into the editor, but this form-level default does not protect existing users before a persona is saved. |
| go/client/client.go | Regenerated Persona client structures include the new sidebar fields consistently. |
| charts/controller/crds/deployments.plural.sh_personas.yaml | Regenerated chart CRD schema exposes the optional CD and AI sidebar properties. |
| go/controller/config/crd/bases/deployments.plural.sh_personas.yaml | Regenerated controller CRD schema exposes the optional CD and AI sidebar properties. |
Reviews (1): Last reviewed commit: "Update and fixes for Persona CRD" | Re-trigger Greptile
| path: cdPath, | ||
| pathRegexp: /^(\/cd)|(\/cd\/.*)$/, | ||
| ignoreRegexp: /^\/cd\/settings.*$/, | ||
| enabled: !!(personaConfig?.all || personaConfig?.sidebar?.cd), |
There was a problem hiding this comment.
Absent fields disable navigation
If existing restricted personas were persisted before sidebar.cd and sidebar.ai were introduced, these predicates coerce the absent values to false, causing users to lose the previously unconditional Continuous Deployment and Plural AI sidebar entries without an administrator changing their persona.
Knowledge Base Used: Schema and Repo: Console's Data Model
| // These settings allow personas to have customized navigation focused on their primary workflows | ||
| // while hiding irrelevant or restricted functionality from the user interface. | ||
| type PersonaSidebar struct { | ||
| // CD enables access to the continuous deployment navigation item when set to true. |
There was a problem hiding this comment.
This is a goofy comment, maybe something like CD enables access to the Plural Continuous Deployment tab (rest is fine)
Makes self-service sidebar tab toggle-able again
Implement switch for CD and Plural AI sidebar tabs
Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console