Conversation
Shows local dev stack status (⚡ green=running, gray=stopped) and pending migration count (↑N) when idle. Auto-detects Supabase projects via supabase/config.toml. Configurable show_migrations and show_when_stopped options. https://claude.ai/code/session_01GC6HCBL4rVMGeffPXFQWin
- Add SupabaseGreen color (#3ECF8E) using 24-bit true color - Use supabase_green instead of emerald for the ⚡ icon - Add supabase to default second line alongside spotify https://claude.ai/code/session_01GC6HCBL4rVMGeffPXFQWin
Line 1 is the agent harness (dir, model, context, usage, git), line 2 is project tooling (supabase, vercel, android, etc), line 3 is auxiliary ambient info (spotify, etc). https://claude.ai/code/session_01GC6HCBL4rVMGeffPXFQWin
Summary of ChangesHello, 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 introduces a new Supabase plugin designed to enhance the status line by providing real-time insights into local Supabase development environments. It aims to improve developer productivity by making the status of the local stack and pending migrations immediately visible, allowing for quicker identification of issues or pending tasks without manual checks. 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 introduces a new Supabase plugin to display local development stack status and pending migrations in the status line. The implementation is well-structured, with good use of caching to optimize performance and thoughtful integration into the existing plugin framework. The changes also include necessary additions to colors, configuration defaults, and plugin registration. I have one high-severity suggestion for internal/plugins/supabase.go to improve the robustness and testability of the logic that checks the Supabase stack status. The accompanying tests are comprehensive for the parts of the code that don't rely on external command execution.
| // checkLocalStatus runs `supabase status --output json` to determine if the local stack is running | ||
| func (p *SupabasePlugin) checkLocalStatus(ctx context.Context, supabasePath, projectDir string) bool { | ||
| cmd := exec.CommandContext(ctx, supabasePath, "status", "--output", "json") | ||
| cmd.Dir = projectDir | ||
| var out bytes.Buffer | ||
| cmd.Stdout = &out | ||
| cmd.Stderr = &bytes.Buffer{} | ||
|
|
||
| if err := cmd.Run(); err != nil { | ||
| return false | ||
| } | ||
|
|
||
| // If the command succeeds and produces output, the stack is running | ||
| return out.Len() > 0 | ||
| } |
There was a problem hiding this comment.
The current implementation of checkLocalStatus has two areas for improvement:
- Robustness: Checking
out.Len() > 0is not a reliable way to determine if the service is running, especially when requesting JSON output. ThesupabaseCLI might returnnullor an empty JSON object ({}) when stopped, both of which have a length greater than 0 and would lead to an incorrect status. - Testability: The function mixes command execution with output parsing, making it difficult to unit test.
I recommend refactoring this to separate the parsing logic into its own function, similar to the pattern you've used for countPendingMigrations and parseMigrationOutput. This would allow you to add unit tests for the parsing logic to cover various outputs from the supabase CLI (e.g., empty string, null, valid JSON) and make the status detection more resilient.
Shows local dev stack status (⚡ green=running, gray=stopped) and
pending migration count (↑N) when idle. Auto-detects Supabase projects
via supabase/config.toml. Configurable show_migrations and
show_when_stopped options.
https://claude.ai/code/session_01GC6HCBL4rVMGeffPXFQWin