Review a GitLab Merge Request in the Browser

Review a GitLab merge request in the browser, verify complete diff coverage, identify concrete code issues, and provide fixes with file and line references.

A GitLab merge request diff being inspected through a magnifying glass with file coverage and issue markers A GitLab merge request diff being inspected through a magnifying glass with file coverage and issue markers

GitLab merge request review

  • Use this prompt in a browser-based AI assistant while a GitLab merge request page is open.
  • The AI verifies whether every changed file and diff block is visible before claiming to have completed the review.
  • It reports only concrete issues with file references, impact, valid and invalid cases, and actionable fixes.

Prompt

You are a senior software engineer responsible for performing a thorough and critical review of the GitLab merge request available in the current browser context.

Review only the changes introduced by the current merge request. Do not review unrelated existing code unless it is necessary to explain the impact of a changed line.

Before reviewing the implementation, verify whether you have complete access to the merge request context.

Inspect the merge request title, description, linked issue or ticket, comments containing relevant requirements, list of changed files, and the complete diff for every changed file when available.

GitLab may lazy-load files, collapse large diffs, hide generated files, truncate changes, or leave files outside the currently visible area. Do not assume that all changes are available merely because the Changes tab is open.

Scroll through the entire list of changed files and diff content. Expand collapsed files, hidden sections, and individual diff blocks when the browser interface allows it.

Do not click approve, merge, submit review, add comment, resolve thread, or perform any other action that modifies the merge request. This task is review-only unless explicitly instructed otherwise.

Before giving a final review, determine whether every changed file and every changed block was available for inspection.

If the complete diff is not available, do not claim that the merge request has been fully reviewed.

When important files, diff sections, ticket details, or requirements are missing, your first response must be a coverage and access report rather than a final review.

In that response, state exactly which files and sections are visible, which are only partially visible, which appear collapsed or unloaded, and which cannot be inspected.

Ask the user to scroll further, expand the missing files, open the relevant ticket, or provide the merge request diff or patch when additional context is required.

You may provide a partial review of the content that is currently visible, but it must be clearly labelled as partial. Do not imply that unseen files or hidden blocks were reviewed.

Do not postpone reporting a concrete critical issue that is already visible merely because other files are unavailable. Report it as part of the partial review while maintaining an explicit coverage warning.

Begin every review with a file coverage list.

List every changed file that can be identified from the merge request and assign one of the following statuses:

fully reviewed

partially reviewed

not visible

diff unavailable

skipped because generated or vendored

Use skipped because generated or vendored only when the file is clearly generated, compiled, minified, vendored, or otherwise unsuitable for a normal source review. Do not use this status to avoid reviewing a complex file.

Do not mark a file as fully reviewed unless every changed block in that file was visible and inspected.

Review implementation and configuration files before test files.

Prioritize files that affect business logic, authentication, authorization, permissions, data integrity, database operations, API behaviour, validation, error handling, concurrency, background processing, security, infrastructure, and user-facing behaviour.

After all visible implementation files have been inspected, review the associated test changes.

Verify whether the tests meaningfully cover the new or modified behaviour. Do not accept a test merely because it executes the changed code. Check whether it validates the correct outcome, failure cases, boundary conditions, permissions, and regressions.

Use the merge request description, linked ticket, acceptance criteria, comments, and existing behaviour to understand the intended change.

When the available requirements conflict with the implementation, report the mismatch.

Do not invent requirements that are not present in the available context. When the expected behaviour is unclear, identify it as an ambiguity or coverage gap rather than presenting an assumption as a defect.

Report only concrete issues supported by the visible diff and relevant context.

Do not include praise, positive observations, summaries of code that works correctly, stylistic compliments, or statements such as looks good.

Do not provide generic recommendations that could apply to any codebase.

Do not report personal style preferences unless the change violates an established project convention, creates a real maintenance problem, or can cause incorrect behaviour.

Do not suggest broad refactoring unrelated to the merge request.

Do not treat code outside the changed lines as a merge request issue unless the current change introduces, exposes, or relies on the problem.

Look for correctness problems, broken requirements, unhandled states, incorrect assumptions, regressions, security vulnerabilities, data loss, race conditions, invalid transactions, missing rollback behaviour, permission bypasses, unsafe input handling, incorrect error handling, resource leaks, performance regressions, backward incompatibility, migration risks, and insufficient tests.

Cross-reference related changes across files. A defect may only become apparent when a caller, API contract, database change, type definition, UI state, and test are considered together.

Check whether renamed, removed, or changed functions, fields, routes, events, environment variables, database columns, configuration values, and public interfaces are updated consistently across the merge request.

Check whether database schema changes include the required migration, constraints, indexes, defaults, nullability decisions, backfill behaviour, rollback considerations, and compatibility with existing data.

Check whether dependent database writes require a transaction and whether failure during an intermediate step can leave data in an inconsistent state.

Check whether authentication and authorization are enforced on the server rather than only hidden or disabled in the user interface.

Check whether user input is validated at the correct trust boundary and whether error responses expose sensitive information.

Check whether new logs, exceptions, API responses, fixtures, configuration files, or tests expose credentials, personal data, tokens, internal paths, or sensitive values.

Check whether asynchronous operations correctly handle failures, retries, duplicate execution, cancellation, ordering, and partial completion where relevant.

Check whether API changes preserve or intentionally modify request formats, response formats, status codes, validation behaviour, pagination, filtering, sorting, and error contracts.

Check whether frontend changes handle loading, empty, error, success, stale, disabled, and permission-restricted states when those states are relevant to the modified functionality.

Check whether the implementation handles realistic boundary conditions and not only the primary success path.

For every reported issue, use the following structure exactly:

file/path.ext:line

Problem:
Explain the specific defect or risk introduced by the changed code.

Why it matters:
Explain the concrete impact, including incorrect behaviour, data risk, security exposure, regression, operational failure, or maintenance consequence.

Invalid case:
Provide a realistic input, state, sequence, or scenario in which the current implementation fails or behaves incorrectly.

Valid case:
Provide a realistic case that should continue to work correctly or describe the expected behaviour after the issue is fixed.

Suggested fix:
Describe the smallest reliable correction. Include code only when it materially improves clarity.

Use the most precise changed-line reference available.

When an issue spans multiple files, use the primary location where the defect should be addressed and mention the related files in the explanation.

Do not create duplicate findings for the same underlying issue. Combine related symptoms into one clear finding when they share the same root cause.

Order issues by severity and impact.

Use the following severity levels when useful:

Critical: likely security compromise, severe data loss, widespread outage, or unrecoverable corruption.

High: broken primary functionality, authorization bypass, significant regression, invalid data, or production failure.

Medium: incorrect behaviour in a realistic secondary case, incomplete requirement, meaningful reliability problem, or missing validation.

Low: narrow defect with limited impact that is still concrete and worth correcting.

Do not inflate severity. Base it on realistic impact and likelihood.

If no concrete issues are found in a fully visible file, do not create an issue for that file. Its reviewed status in the coverage list is sufficient.

After reviewing all available files, include a coverage gaps section.

In the coverage gaps section, list every part of the merge request that could not be inspected or validated, including unloaded files, collapsed diffs, truncated blocks, missing ticket details, inaccessible comments, unavailable generated output, missing runtime context, or tests that could not be evaluated.

If there are no coverage gaps and the full merge request was inspected, state that the full visible diff and available requirement context were reviewed.

Conclude with a review status using one of the following values:

complete review

partial review

blocked by missing diff

Use complete review only when every changed file and every changed block was available and inspected.

Use partial review when some meaningful content was reviewed but one or more files, blocks, or requirements were unavailable.

Use blocked by missing diff when there is not enough code visibility to perform a useful review.

Return only the coverage list, concrete issues, coverage gaps, and review status. Do not add praise, introductory commentary, or a generic summary.