Conversation
Summary of ChangesHello @mskorokhodov, 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 refactors the GraphQL Laboratory by extracting its core functionality into a dedicated, reusable library. This change improves code organization, enhances UI theming with semantic CSS variables, and introduces Shadow DOM encapsulation for better component isolation. It also includes updates to the Monaco Editor's theming and adds a new plugin for managing target-specific environment variables. Highlights
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 is a significant refactoring that extracts the 'laboratory' feature into its own reusable package, @hive/laboratory. This includes moving all related components, hooks, and utilities. A new design system based on shadcn/ui and Tailwind CSS has been adopted, resulting in widespread styling changes. The new package is also made embeddable by using a Shadow Root to isolate styles. Overall, this is a great enhancement for modularity and reusability. I've found a few issues related to configuration, dependencies, and theming that should be addressed.
| "components": "@/labaratory/components", | ||
| "utils": "@/labaratory/lib/utils", | ||
| "ui": "@/labaratory/components/ui", | ||
| "lib": "@/labaratory/lib", | ||
| "hooks": "@/labaratory/hooks" |
There was a problem hiding this comment.
There's a typo in the path aliases. "labaratory" should be "laboratory". This will likely cause issues with path resolution.
| "components": "@/labaratory/components", | |
| "utils": "@/labaratory/lib/utils", | |
| "ui": "@/labaratory/components/ui", | |
| "lib": "@/labaratory/lib", | |
| "hooks": "@/labaratory/hooks" | |
| "components": "@/laboratory/components", | |
| "utils": "@/laboratory/lib/utils", | |
| "ui": "@/laboratory/components/ui", | |
| "lib": "@/laboratory/lib", | |
| "hooks": "@/laboratory/hooks" |
| "peerDependencies": { | ||
| "@tanstack/react-form": "^1.23.8", | ||
| "date-fns": "^4.1.0", | ||
| "graphql-ws": "^6.0.6", | ||
| "lucide-react": "^0.548.0", | ||
| "lz-string": "^1.5.0", | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0", | ||
| "tslib": "^2.8.1", | ||
| "zod": "^4.1.12" | ||
| }, |
There was a problem hiding this comment.
There are version mismatches between peerDependencies and devDependencies for @tanstack/react-form and zod. While this might be intentional, it's generally better to keep these versions aligned to prevent potential compatibility issues for consumers of this library.
- @tanstack/react-form:
^1.23.8inpeerDependenciesvs^1.27.7indevDependencies. - zod:
^4.1.12inpeerDependenciesvs^4.3.6indevDependencies.
Please consider aligning these versions or ensuring that the specified ranges are compatible and intended.
| const PreflightPromptModal = (props: { | ||
| open: boolean; | ||
| onOpenChange: (open: boolean) => void; | ||
| title?: string; | ||
| description?: string; | ||
| placeholder?: string; | ||
| placeholder: string; | ||
| defaultValue?: string; | ||
| onSubmit?: (value: string | null) => void; | ||
| }) => { |
There was a problem hiding this comment.
The PreflightPromptModal component's props have been simplified, removing title and description. This reduces its flexibility as it can no longer show contextual information to the user when prompting for a value. This might be an oversight during refactoring. If this was not intentional, please consider re-adding these props to improve the user experience.
| const Toaster = ({ ...props }: ToasterProps) => { | ||
| const { theme } = useTheme(); | ||
|
|
||
| return ( | ||
| <Sonner | ||
| theme={theme as ToasterProps['theme']} | ||
| theme="dark" | ||
| className="group" |
There was a problem hiding this comment.
The Toaster component has a hardcoded theme="dark". The parent Laboratory component receives a theme prop that should be passed down to the Toaster to allow for dynamic theming (light/dark modes).
| const Toaster = ({ ...props }: ToasterProps) => { | |
| const { theme } = useTheme(); | |
| return ( | |
| <Sonner | |
| theme={theme as ToasterProps['theme']} | |
| theme="dark" | |
| className="group" | |
| const Toaster = ({ theme = 'dark', ...props }: ToasterProps & { theme?: string }) => { | |
| return ( | |
| <Sonner | |
| theme={theme as ToasterProps['theme']} | |
| className="group" |
4ecef83 to
4fb24d2
Compare
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/laboratory |
1.0.0-alpha-20260305200958-afcfaf36375b7bc91b5dcd41776ff6010c2052a2 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/render-laboratory |
1.0.0-alpha-20260305200958-afcfaf36375b7bc91b5dcd41776ff6010c2052a2 |
npm ↗︎ unpkg ↗︎ |
bab3581 to
92a02da
Compare
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
…nsole into enhancement/hive-lab-lib
7e43a91 to
db6c007
Compare
5cb8260 to
ae9c7d7
Compare
a731756 to
cc6cc19
Compare
cc6cc19 to
2b866a8
Compare
2b866a8 to
5a95ab5
Compare
5a95ab5 to
345ea00
Compare
345ea00 to
5ddbe8c
Compare
5ddbe8c to
473caec
Compare
4c2db02 to
afcfaf3
Compare

Background
Description
Checklist