ci(medium): Implement Gemini Multimodal UI Review#9577
Conversation
This commit introduces the `@gemini-ui-review` bot command, which enables automated UX and accessibility feedback via Gemini's multimodal vision model. Key changes: - Created `scripts/ci/run-ui-review.ts`: A Playwright-based script that mocks authentication, captures application screenshots, and queries Gemini-1.5-Pro for analysis. - Created `.github/workflows/gemini-ui-review.yml`: A reusable GitHub Action workflow that sets up the environment and executes the analysis script. - Updated `.github/workflows/comment-ops.yml`: Added routing logic to trigger the UI review from PR comments and updated the help command. - Added `@octokit/rest` dependency to `package.json`. The review analysis focuses on: 1. Visual Regressions 2. WCAG Compliance 3. UX Hierarchy 4. Material-UI Best Practices Authentication is handled via session mocking to ensure fast and reliable execution in CI environments. Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
👋 Welcome to HRM!Thanks for your contribution. This repository uses Gemini AI for automated triage, code review, and generation. 🤖 Gemini Manual Trigger Quick Reference
For more details and GitHub CLI examples, see the Manual Trigger Guide. |
ℹ️ Gemini Review DisabledAutomatic review is currently disabled via Via Comment: Via GitHub Actions:
Via GitHub CLI: gh workflow run reusable-gemini-review.yml -f pr_number=9577🤖 Gemini Manual Trigger GuideTo re-enable: Set repository variable |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
- Ensured `owner` and `repo` are non-nullable in `scripts/ci/run-ui-review.ts`. - Fixed "possibly undefined" and property existence errors in `tests/playwright/lib/mocks.ts` by using `any` cast for the `window` object in `page.evaluate`. - Removed unused `@ts-expect-error` directives in `tests/playwright/lib/mocks.ts`. These changes resolve the CI failures in the Type Check and Build Check jobs. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
… errors - Restored `tests/**/*` to `exclude` in `tsconfig.type-check.json` to avoid pre-existing type errors in the test suite. - Added `eslint-disable-next-line` for `any` casts in `tests/playwright/lib/mocks.ts` to satisfy the linter while maintaining necessary runtime hacks for Playwright. - Ensured `scripts/ci/run-ui-review.ts` uses JSON schema for more reliable Gemini responses. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical AuditDeep Architectural Review: Gemini Multimodal UI ReviewSummaryThis PR introduces an automated UI review cycle using Gemini 1.5 Pro and Playwright. While the integration into Architectural Impact
File-by-File Analysis1.
2.
3.
ANTI-AI-SLOP DIRECTIVES
Review automatically published via RepoAuditor. |
- Refactored `scripts/ci/run-ui-review.ts` to remove `@octokit/rest` and use the native `gh` CLI for posting PR comments, reducing dependency bloat. - Replaced flaky `waitForTimeout` with robust element visibility checks for `[data-testid="main-content-layout"]`. - Optimized `.github/workflows/gemini-ui-review.yml` to skip the build process if a deployment URL can be detected from PR metadata. - Improved type safety in `tests/playwright/lib/mocks.ts` by defining a `TestWindow` interface instead of using `any` casts for `window.__TEST_CONTROLS__`. - Streamlined GHA routing and updated the command reference in `comment-ops.yml`. - Cleaned up verbose/redundant code and comments throughout the implementation. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical Audit🏗️ Architectural ImpactThis PR introduces an automated multimodal UI review pipeline using Gemini 1.5 Pro. It successfully integrates Playwright for screenshot capture and GH Actions for orchestration. However, there are significant security and efficiency concerns regarding the build process and local deployment triggers. 🔍 File-by-File Analysis
|
This commit delivers the full implementation of the `@gemini-ui-review` command, providing automated UX and accessibility audits using Gemini 1.5 Pro's multimodal capabilities. Key Features: - **Deployment Detection**: Workflow automatically detects preview URLs from GitHub deployments, skipping expensive local builds when possible. - **Robust Analysis**: `run-ui-review.ts` captures full-page screenshots and utilizes structured JSON output from Gemini for reliable feedback. - **Efficiency**: Removed `@octokit/rest` dependency in favor of the `gh` CLI, reducing CI environment setup time and package bloat. - **Type Safety**: Centralized `TestControls` and `TestWindow` definitions in `types/global.d.ts` and improved typing in Playwright mocks. - **Orchestration**: Seamlessly integrated into `comment-ops.yml` with updated bot help documentation. Feedback is posted directly to the PR with specific actionable improvements for Visual Regressions, WCAG Compliance, Hierarchy, and MUI Best Practices. Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
@gemini-ui-review |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
1 similar comment
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
bd3f28d to
a4157d4
Compare
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical AuditPR Review: Gemini Multimodal UI Review (#9577)SummaryThis PR introduces a multimodal UI review command ( Anti-AI-Slop Directives
File-by-File Analysis
|
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
6d4f995 to
bf973da
Compare
Addresses feedback from PR #9577: - Eliminates duplicate `is_command_triggered` echo statements in the `comment-ops` router logic and fixes the condition to properly read from `$GITHUB_OUTPUT`. - Removes over-engineered `GoogleGenerativeAI` JSON schema request in favor of returning a simple markdown string. - Resolves CI type check and build failures by removing heavy `mockLoggedInSession` test dependencies from `run-ui-review.ts`. - Removes redundant and globally polluting `TestWindow` type from `types/global.d.ts`. - Removes overly verbose and redundant regex comments from GitHub Actions workflows. Co-authored-by: arii <342438+arii@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
Description
Implemented the
@gemini-ui-reviewcommand to provide automated multimodal UI reviews for HRM. The implementation includes a Playwright script for screenshot capture, a Gemini API integration for analysis, and a GitHub Action workflow orchestrated by the central bot command router. Authentication is seamlessly handled through mocked sessions.Fixes #9576
Change Type: ✨ New feature (non-breaking change adding functionality)
Related Issues
Closes #9576
Original PR Body
Implemented the
@gemini-ui-reviewcommand to provide automated multimodal UI reviews for HRM. The implementation includes a Playwright script for screenshot capture, a Gemini API integration for analysis, and a GitHub Action workflow orchestrated by the central bot command router. Authentication is seamlessly handled through mocked sessions.Fixes #9576
PR created automatically by Jules for task 9167995831481264948 started by @arii