Skip to content

Add compare pages to stock Keycloak in dev server - #39

Merged
wborn merged 3 commits into
mainfrom
28-migrate-kc-themes-to-vaadin-part-4
Oct 28, 2026
Merged

wborn merged 3 commits into
mainfrom
28-migrate-kc-themes-to-vaadin-part-4

Conversation

@Ekhorn

@Ekhorn Ekhorn commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

"What does Keycloak do here?" came up constantly while deciding which pages to implement. These changes add a compare pane to render the stock Keycloak theme directly in the dev-server next to ours. It also allows us to view those pages we haven't yet implemented.

Changelog

  • A compare pane that renders Keycloak's own FreeMarker templates from the same mock data the theme renders from, so the realm settings in the dev menu apply to both sides.
  • The same renderer stands in for pages this theme does not implement, instead of a placeholder.
  • ./gradlew installDist downloads Keycloak's own themes and the FreeMarker to render them into theme/ui/.keycloak. Nothing of it reaches the jar, and the image build skips the download so a release cannot fail because Maven Central was unreachable.
  • The Keycloak check from PR 2 reuses that download when it is current, and gains a second job that does the download and renders one of Keycloak's own templates through the renderer. theme/ui/dev-server/check-stock-renderer.sh is that check, runnable by hand.

Workflow

Show stock Keycloak in the dev menu splits the window. It needs ./gradlew installDist once, for the templates, and a JDK on the PATH.

Drift risk

dev-server/StockRenderer.java reproduces the small part of Keycloak's FreeMarker provider that its templates need, which is the one place here that can fall behind Keycloak without anything noticing. It is dev-only: nothing it does reaches the image, and a rule is only ever added for a template that fails to render.

@Ekhorn
Ekhorn added this pull request to stack #41 October 2, 2026 13:24
@Ekhorn
Ekhorn force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from d41f84e to 8294c50 Compare October 2, 2026 14:01
@Ekhorn Ekhorn self-assigned this Oct 2, 2026
@Ekhorn
Ekhorn force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from 8294c50 to c123a88 Compare October 9, 2026 16:12
@Ekhorn
Ekhorn marked this pull request as ready for review October 9, 2026 16:24
@Ekhorn
Ekhorn requested a review from a team October 9, 2026 16:24
@Ekhorn

Ekhorn commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

If the changes here are deemed too much to be maintaining it. We can drop them and simply compare using https://storybook.keycloakify.dev.

@Ekhorn

Ekhorn commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

If the changes here are deemed too much to be maintaining it. We can drop them and simply compare using https://storybook.keycloakify.dev.

But if we go this route we still need to keep the feature toggles in.

@Ekhorn Ekhorn linked an issue Oct 13, 2026 that may be closed by this pull request
13 tasks

@wborn wborn left a comment

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 an initial AI-assisted review.

The side-by-side comparison functionality is a useful addition to the theme development workflow. Rendering Keycloak's actual FreeMarker templates instead of maintaining separate reference pages reduces duplication and makes differences easier to investigate.

The implementation appropriately separates the development server functionality from the production theme bundle. The stock renderer uses the Keycloak version pinned by the Dockerfile, and the build downloads the upstream themes and relevant dependencies for local development.

One validation gap remains: the CI workflow deliberately skips downloadStockKeycloak, so its successful build does not establish that the new download and rendering workflow operates correctly.

Before merging, the complete development workflow should be exercised with a clean checkout, including the stock renderer and comparison pane. This is particularly relevant because the new functionality spans Gradle dependency resolution, Java, FreeMarker, Node, and browser-side code.

The current GitHub PR also reports a non-mergeable state, which should be reassessed after synchronizing the stacked branches.

The existing CI/CD and Keycloak checks pass, but the new stock-renderer functionality has not been independently executed as part of this review.

Comment thread .github/workflows/keycloak.yml Resolved
@Ekhorn
Ekhorn force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from c123a88 to 08768a3 Compare October 13, 2026 17:44
@Ekhorn
Ekhorn force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from 08768a3 to 0447e38 Compare October 14, 2026 10:27
@Ekhorn
Ekhorn requested a review from a team October 14, 2026 15:23
@richturner
richturner force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from 0447e38 to be13acc Compare October 15, 2026 08:54
@richturner
richturner requested review from richturner and removed request for a team October 19, 2026 12:05
@richturner richturner self-assigned this Oct 19, 2026
richturner
richturner previously approved these changes Oct 19, 2026

@richturner richturner left a comment

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 seems to work

Base automatically changed from 28-migrate-kc-themes-to-vaadin-part-3 to main October 28, 2026 10:18
@Ekhorn
Ekhorn force-pushed the 28-migrate-kc-themes-to-vaadin-part-4 branch from be13acc to 9fc797d Compare October 28, 2026 11:12
@Ekhorn
Ekhorn requested a review from richturner October 28, 2026 11:25

@wborn wborn left a comment

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.

The new stock-renderer CI check addresses the validation concern raised in the previous review, and the PR is now mergeable.

One issue remains in the iframe switching logic: rapid navigation can trigger multiple swap handlers and leave both frames hidden. This should be addressed before merging.

No other blocking issues were identified in the current changes.

This review was AI-assisted.

Comment thread theme/ui/src/dev/frame-pair.ts Resolved
richturner
richturner previously approved these changes Oct 28, 2026
@richturner
richturner self-requested a review October 28, 2026 12:53
@wborn
wborn merged commit e557d43 into main Oct 28, 2026
5 checks passed
@wborn
wborn deleted the 28-migrate-kc-themes-to-vaadin-part-4 branch October 28, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Keycloak OpenRemote templates to Vaadin

3 participants