-
Notifications
You must be signed in to change notification settings - Fork 510
feat: add auto-login for dev mode and fix log box formatting #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add auto-login for dev mode and fix log box formatting #548
Conversation
Add AUTOMAKER_AUTO_LOGIN environment variable that, when set to 'true', automatically creates a session for web mode users without requiring them to enter the API key. Useful for development environments. Also fix formatting issues in console log boxes: - API Key box: add right border, show auto-login status and tips - Claude auth warning: add separator line, fix emoji spacing - Server info box: use consistent 71-char width, proper padding - Port conflict error: use same width, proper dynamic padding Environment variables: - AUTOMAKER_AUTO_LOGIN=true: Skip login prompt, auto-create session - AUTOMAKER_API_KEY: Use a fixed API key (existing) - AUTOMAKER_HIDE_API_KEY=true: Hide the API key banner (existing)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @stefandevo, 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 developer experience by streamlining the authentication process in development environments and improving the clarity of console output. The new auto-login feature reduces friction for web mode users, while the refined log box formatting makes critical server information and warnings easier to read and understand. Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this 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 helpful auto-login feature for development environments and improves the formatting of several console log messages for better readability. The implementation is straightforward. My feedback includes a suggestion to refactor the duplicated log box formatting logic into a reusable utility for better maintainability, and a note on a potential performance inefficiency in the auto-login flow that could be optimized.
Add data-testid with sanitized project name for E2E test assertions.
The testid format is 'project-switcher-project-{name}' where name is
the lowercased project name with spaces replaced by hyphens.
This fixes E2E tests that expect to find projects by name in the
project switcher.
Summary
AUTOMAKER_AUTO_LOGINenvironment variable that, when set totrue, automatically creates a session for web mode users without requiring them to enter the API keyChanges
Auto-login feature (
apps/server/src/routes/auth/index.ts)/api/auth/statusendpoint to automatically create a session cookie whenAUTOMAKER_AUTO_LOGIN=trueLog box formatting (
apps/server/src/lib/auth.ts,apps/server/src/index.ts)Environment Variables
AUTOMAKER_AUTO_LOGIN=trueAUTOMAKER_API_KEYAUTOMAKER_HIDE_API_KEY=trueTest Plan
AUTOMAKER_AUTO_LOGIN=trueand verify no login prompt appears