Conversation
Remove the admin UI and all code that only existed to support it: adminauth package, admin handlers, admin template, admin config, admin validation, user tracking (UpsertUser and backing storage), and unused emailutil.Normalize.
Summary of ChangesHello @dgellow, 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 undertakes a significant refactoring by entirely removing the administrative subsystem. This includes the admin user interface, all related authorization logic, and the underlying user management capabilities within the storage layer. The change aims to simplify the application's architecture, reduce its feature set, and decrease the complexity associated with maintaining administrative roles and user tracking. 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. Changelog
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.
Code Review
This pull request effectively removes the admin functionality from the application. The changes are comprehensive, covering the removal of the admin UI, API handlers, configuration, and the underlying user tracking and management system in the storage layer. The related adminauth package and its dependencies have been cleanly excised. The removal of user tracking simplifies the storage interface and its implementations considerably. The tests have been updated appropriately to reflect these changes, including refactoring tests that depended on removed functions. Overall, this is a clean and well-executed removal of a major feature, resulting in a simpler codebase.
Delete unused GetGrantTypes/GetResponseTypes on storage.Client. Remove double-fetch and dead fallback path in getUserTokenIfAvailable. Extract streamSSEResponse helper to deduplicate identical read-flush loops in sse_proxy and streamable_proxy. Fix stale CLAUDE.md references to removed packages and replaced fosite library.
Fix response header loss: WriteHeader was called before copying backend response headers, silently dropping them. Swap order in both forwardMessageToBackend and forwardStreamablePostToBackend. Fix incomplete hop-by-hop stripping: add Keep-Alive, Transfer-Encoding, TE, Trailer, Proxy-Authorization, Proxy-Authenticate per RFC 9110. Fix inline server env vars: parent env was appended after custom env (overwriting custom), and timeout re-created cmd losing all env vars. Now sets parent env first, custom second, and creates cmd after timeout. Fix session registration bypassing token refresh: was calling storage.GetUserToken directly instead of getUserToken which handles OAuth refresh, token rotation, and formatting. Remove dead code: CSRF cookie functions, ValidateScopes, GenerateClientSecret, ParseTokenResponse, json.Write, ProtectedResourceMetadataURI, WithUser, Options.PanicIfInvalid. Collapse NewServiceAuthMiddleware one-liner wrapper into the real function. Unexport SessionCookie (only used within package).
No description provided.