Skip to content

Update and fixes for Persona CRD - #3954

Merged
JohnBlackwell merged 2 commits into
masterfrom
persona-updates-self-service-cd-and-ai
Aug 3, 2026
Merged

Update and fixes for Persona CRD#3954
JohnBlackwell merged 2 commits into
masterfrom
persona-updates-self-service-cd-and-ai

Conversation

@JohnBlackwell

@JohnBlackwell JohnBlackwell commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

Makes self-service sidebar tab toggle-able again
Implement switch for CD and Plural AI sidebar tabs
@soffi-ai

soffi-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Soffi AI Summary

This 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 cd and ai boolean fields through the entire stack:

  1. GraphQL schemaPersonaSidebarConfiguration gains cd and ai fields, allowing them to be set in persona mutations and returned in persona queries.
  2. Elixir server — the PersonaSidebarConfiguration schema/type is updated to expose the two new fields in the API.
  3. Go generated client (go/client/) — PersonaFragment_Configuration_PersonaConfigurationFragment_Sidebar and all query-specific variants (GetPersona, CreatePersona, UpdatePersona) are regenerated to include Ai and Cd fields with corresponding nil-safe getters.
  4. Go controller CRD (go/controller/api/v1alpha1/persona_types.go) — the PersonaSidebarConfiguration struct gains AI and CD optional bool fields; deepcopy and CRD YAML manifests are regenerated accordingly.
  5. Helm chart CRDs — the deployments.plural.sh_personas.yaml CRD manifest is updated to reflect the new fields.
  6. Frontend — the Sidebar.tsx layout and the persona edit/create forms are wired to honor the new cd and ai flags, making the toggle functional again in the UI.

The second commit adds updated API documentation reflecting the review feedback on the new fields.

Commits

Commit Summary
9188322 Adds cd and ai boolean fields to the Persona sidebar configuration across the full stack: GraphQL schema, Elixir resolver, Go client (regenerated), Go controller CRD type + generated manifests, Helm chart CRDs, and the React frontend sidebar/persona edit components. This restores the ability for admins to toggle the CD and Plural AI sidebar tabs via persona-based access control.
8bf02f5 Updates the Go controller API docs (go/controller/docs/api.md) to document the newly added ai and cd fields on the PersonaSidebarConfiguration type, incorporating review feedback.

Deploy in Soffi


Updated: 2026-08-03 20:14 UTC

@JohnBlackwell JohnBlackwell added the enhancement New feature or request label Aug 3, 2026
@JohnBlackwell

Copy link
Copy Markdown
Contributor Author

plural deploy to dev

@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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.

  • Adds cd and ai to persona sidebar input/output models.
  • Applies persona sidebar values when rendering navigation.
  • Propagates the fields through the controller’s Persona CRD and Console client.

Confidence Score: 4/5

The 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

Important Files Changed

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),

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.

P1 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a goofy comment, maybe something like CD enables access to the Plural Continuous Deployment tab (rest is fine)

@JohnBlackwell
JohnBlackwell merged commit 8f6f5c2 into master Aug 3, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants