Skip to content

enh: issue-767 UI component update#1041

Merged
tedhabeck merged 40 commits into
mainfrom
issue-767-ui-only
Aug 21, 2025
Merged

enh: issue-767 UI component update#1041
tedhabeck merged 40 commits into
mainfrom
issue-767-ui-only

Conversation

@tedhabeck
Copy link
Copy Markdown
Contributor

Enable w3id authentication in the UI.

@tedhabeck tedhabeck marked this pull request as ready for review August 13, 2025 21:34
Copy link
Copy Markdown
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.

Summary of Changes

Hello @tedhabeck, 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 BeeAI UI by implementing w3id authentication. The primary goal is to enable secure user access through OpenID Connect (OIDC), leveraging the next-auth library. This change introduces a new authentication flow, including a dedicated sign-in page, and updates the application's build and deployment configurations to support OIDC providers. The overall impact is a more secure and enterprise-ready user interface.

Highlights

  • W3ID Authentication: The UI now supports w3id authentication, enhancing security and access control for the application.
  • Next-Auth Integration: The next-auth library has been integrated into the UI, providing a robust and flexible authentication solution.
  • New Sign-In Page: A dedicated sign-in page has been added to handle user authentication, offering a clear entry point for users.
  • Documentation Updates: The CONTRIBUTING.md documentation has been updated with detailed instructions on how to enable and configure OIDC for local development and deployment.
  • Helm Chart Enhancements: New Helm chart templates and values.yaml configurations have been introduced to manage OIDC providers and secrets for Kubernetes deployments.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@tedhabeck
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
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 w3id authentication to the UI using next-auth, which is a significant enhancement. The changes are extensive, including documentation updates, new dependencies, UI components for sign-in, and Helm chart configurations. My review has identified several issues, including typos in documentation and configuration files, a potential bug in the landing page logic, and a critical lack of error handling for file operations that could crash the application. I've also noted the use of a beta version for next-auth, which might pose a risk in production environments.

Comment thread apps/beeai-ui/src/auth.ts Outdated
Comment thread apps/beeai-ui/providers/providers.template.json Outdated
Comment thread apps/beeai-ui/src/app/auth/providers/ibm.ts
Comment thread apps/beeai-ui/src/app/page.tsx Outdated
Comment thread helm/templates/ui/providers.yaml Outdated
Comment thread helm/values.yaml Outdated
Comment thread helm/values.yaml Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread apps/beeai-ui/src/app/signin/page.tsx Outdated
@tedhabeck tedhabeck added the enhancement New feature or request label Aug 14, 2025
@tedhabeck tedhabeck requested a review from kapetr August 14, 2025 15:38
tedhabeck and others added 23 commits August 14, 2025 13:34
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
…1040)

Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Radek Ježek <radek.jezek@ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Petr Kadlec <petr@puradesign.cz>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
@tedhabeck tedhabeck requested a review from PetrBulanek August 15, 2025 20:31
Copy link
Copy Markdown
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.

When I start the build using mise beeai-platform:start and then go to the UI, which runs by default at http://localhost:8334/, I am redirected to the sign-in page with a login button, but when I open the agent menu from the header, I can easily navigate to another route. Is this the correct behavior? I would expect the sign-in page to have a different layout (the list of agents would not be visible until I log in) and any navigation elsewhere would be blocked with a redirect back to the sign-in page.

Comment thread apps/beeai-ui/src/app/auth/providers/providerlist.ts
Comment thread apps/beeai-ui/src/app/auth/providers/providerlist.ts Outdated
Comment thread apps/beeai-ui/src/app/signin/page.tsx Outdated
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.

For most CSS properties, we use rem units (padding, margin, width, height, etc.). You can use the helper function rem(16px) or use variables from Carbon (e.g., $spacing-05).

I'm also getting a few Stylelint errors here. Prettier should be able to fix all of that automatically.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm using visual studio code (latest) and have the stylelint plugin installed. I do not see those CSS warnings. Is there something I need to configure in settings?

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.

You are right. The stylelint rules were not working properly, the #1068 is fixing that.

Comment thread apps/beeai-ui/src/index.ts Outdated
Copy link
Copy Markdown
Contributor

@kapetr kapetr left a comment

Choose a reason for hiding this comment

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

@tedhabeck Would it be possible to share a configuration so we can test w3id locally?

I assume the visual design of the login page is subject to change and not part of this PR?
Screenshot 2025-08-18 at 10 26 58

Comment thread apps/beeai-ui/src/auth.ts Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
@tedhabeck
Copy link
Copy Markdown
Contributor Author

tedhabeck commented Aug 19, 2025

When I start the build using mise beeai-platform:start and then go to the UI, which runs by default at http://localhost:8334/, I am redirected to the sign-in page with a login button, but when I open the agent menu from the header, I can easily navigate to another route. Is this the correct behavior? I would expect the sign-in page to have a different layout (the list of agents would not be visible until I log in) and any navigation elsewhere would be blocked with a redirect back to the sign-in page.

Good catch!

  • I failed to commit the middleware.ts (so redirect's for unauthenticated requests were not happening)
  • I've added route grouping so that both signin and the app itself have their own root layouts.

…nt in utils/constants.ts

Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
@tedhabeck tedhabeck requested a review from kapetr August 19, 2025 18:14
Signed-off-by: habeck <habeck@us.ibm.com>
Signed-off-by: habeck <habeck@us.ibm.com>
…lows/

Signed-off-by: habeck <habeck@us.ibm.com>
Comment thread CONTRIBUTING.md
Comment on lines +168 to +189
Output:
```bash
⚠ Self-signed certificates are currently an experimental feature, use with caution.
Downloading mkcert package...
Download response was successful, writing to disk
Attempting to generate self signed certificate. This may prompt for your password
Sudo password:
Sorry, try again.
Sudo password:
CA Root certificate created in /Users/habeck/Library/Application Support/mkcert
Certificates created in /Users/habeck/beeai-istio-helm/beeai-platform/apps/beeai-ui/certificates
Adding certificates to .gitignore
▲ Next.js 15.3.4
- Local: https://localhost:3000
- Network: https://192.168.1.92:3000
- Environments: .env
- Experiments (use with caution):
⨯ cssChunking

✓ Starting...
✓ Ready in 1705ms
⚠ ./src/auth.ts
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.

Does it make sense to keep this console output here?

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.

There's quite a bit of duplicated code. We could move the common parts to the parent layout and only keep the differences between (main) and (signin) layouts here. We can refactor this later.

@tedhabeck tedhabeck requested a review from PetrBulanek August 21, 2025 13:07
@tedhabeck tedhabeck dismissed PetrBulanek’s stale review August 21, 2025 14:59

Petr is out on vacation. The PR has been reviewed by Petr Kadlec

@tedhabeck tedhabeck merged commit 101f3db into main Aug 21, 2025
8 checks passed
@tedhabeck tedhabeck deleted the issue-767-ui-only branch August 21, 2025 15:00
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.

6 participants