Skip to content

Conversation

@kapetr
Copy link
Contributor

@kapetr kapetr commented Jan 22, 2026

Summary

This PR adds a custom Keycloak theme for AgentStack using Keycloakify to generate theme artifacts. The login page uses Carbon components and supports dark mode with theme persistence across the main application. Keycloakify has been integrated into the build pipeline to compile the React-based theme into Keycloak-compatible resources, which are packaged as a JAR file and deployed via Helm charts.

Linked Issues

Closes #1860

Documentation

  • No Docs Needed: included README for dev purposes, that should suffice for now

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.

@kapetr kapetr marked this pull request as draft January 22, 2026 17:43
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 22, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kapetr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user authentication experience for AgentStack by introducing a custom Keycloak theme. The new theme provides a modern, branded login interface, leveraging React and Carbon components for a responsive and accessible design. A key feature is the seamless dark mode support, which persists across the application. The changes also streamline the theme's lifecycle, from development and compilation using Keycloakify to its deployment within the existing infrastructure via Helm, offering flexibility for both production and development environments.

Highlights

  • Custom Keycloak Theme: Introduced a new custom Keycloak theme for AgentStack, built using Keycloakify to generate theme artifacts.
  • Carbon Components Integration: The login page now utilizes Carbon components for a consistent UI/UX, including support for dark mode with theme persistence.
  • Build Pipeline Integration: Keycloakify has been integrated into the build pipeline to compile the React-based theme into Keycloak-compatible resources, packaged as a JAR file.
  • Helm Chart Deployment: The custom theme is deployed via Helm charts, with options to use a custom Docker image with the built-in theme or mount theme files via ConfigMap for development/testing.
  • Development Environment Setup: Added new mise tasks for local development, building, and Storybook integration for the Keycloak theme, along with necessary tool dependencies (Java, Maven).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a custom Keycloak theme for AgentStack using Keycloakify, integrating it into the build pipeline and deployment process. The changes include adding a new keycloak-theme application with its own dependencies, scripts, and configurations for development and deployment. The theme uses Carbon components and supports dark mode. The Helm charts have been updated to conditionally deploy the custom theme either as a built-in Docker image or via ConfigMap. Overall, the implementation is well-structured and follows good practices for integrating a custom Keycloak theme.

@kapetr kapetr force-pushed the feat/1860-add-custom-keycloak-theme branch from f54d57f to 1785d5b Compare January 26, 2026 13:44
@kapetr kapetr changed the base branch from add-keycloak-poc to main January 26, 2026 13:46
@kapetr kapetr marked this pull request as ready for review January 27, 2026 08:00
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jan 27, 2026
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Copy link
Contributor

@PetrBulanek PetrBulanek left a comment

Choose a reason for hiding this comment

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

The error message is not correctly styled in dark theme.

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

We already have this code copy-pasted in three places. It's definitely not the scope of this PR, but maybe we could think about how to centralize it. Perhaps into a separate app, similar to linting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, for sure. I would have done it already here, but I didnt want a separate app for that (that's quite a minor piece of code for a separate app) and agentstack-ui can't be dependency here. But we can at least do that for web and ui, and maybe just include it here via relative path, not via module, or leave it as is here.

href="/favicon-dark.svg"
media="(prefers-color-scheme: dark)"
/>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we actually use this file, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's vite entrypoint file, we do need it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant the favicon file favicon-32x32.png. Sorry for not making myself clearer. :-)

Signed-off-by: Petr Kadlec <petr@puradesign.cz>

feat(ui): add keycloak pages - register, terms, login reset

Signed-off-by: Petr Kadlec <petr@puradesign.cz>

feat(ui): keycloak theme final updates, deployment setup

Signed-off-by: Petr Kadlec <petr@puradesign.cz>

Signed-off-by: Petr Kadlec <petr@puradesign.cz>

Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
@kapetr kapetr force-pushed the feat/1860-add-custom-keycloak-theme branch from 63dab26 to a2d3c71 Compare January 27, 2026 11:50
@kapetr kapetr requested a review from PetrBulanek January 27, 2026 11:50
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Comment on lines +166 to +173
<Warning>
**Email Verification Required:** Agent Stack requires the `email_verified` claim to be `true` in JWT tokens. When configuring external identity providers in Keycloak, ensure that:
- Users verify their email addresses before authenticating
- The `email_verified` claim is mapped to the token (this is included by default in the `email` scope)
- External providers pass the email verification status correctly

Without verified emails, authentication will fail with "Verified email not found" error.
</Warning>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jezekra1 Please review

Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 27, 2026
@JanPokorny JanPokorny changed the title [DRAFT] feat(ui): add keycloak theme feat(ui): add keycloak theme Jan 27, 2026
@kapetr kapetr requested a review from JanPokorny January 27, 2026 12:20
@jezekra1 jezekra1 merged commit a508fbe into main Jan 27, 2026
10 checks passed
@jezekra1 jezekra1 deleted the feat/1860-add-custom-keycloak-theme branch January 27, 2026 12:29
jezekra1 pushed a commit that referenced this pull request Jan 27, 2026
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Style Keycloak login screen

4 participants