Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughRewrites many MDX image paths from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🍈 Lychee Link Check Report3659 links: ❌ Errors
Full Statistics Table
|
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (4)
apps/docs/content/docs.v6/orm/prisma-client/observability-and-logging/opentelemetry-tracing.mdx (1)
242-242: Consider improving the alt text for accessibility.
"Jaeger UI"names the tool but doesn't describe what the screenshot actually shows. A reader relying on a screen reader gets no meaningful context — e.g., they can't tell it's an example trace visualization with spans. The alt text on line 32 is a great model to follow.✏️ Suggested alt text improvement
- +🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs.v6/orm/prisma-client/observability-and-logging/opentelemetry-tracing.mdx` at line 242, Update the image alt text for the Jaeger screenshot (the markdown line containing "") to a more descriptive, accessible string that explains what the screenshot shows (e.g., "Jaeger trace visualization showing a service timeline with spans and span durations for a sample request, including operation names and timestamps") so screen-reader users get meaningful context; replace the short tool name with a concise description of the visualization, its key elements (spans, service names, durations), and the purpose of the screenshot.apps/docs/src/mdx-components.tsx (1)
59-64: The redundantas anycasts are unnecessary sincepropsis already typedany.On Lines 61–62,
(props as any)is a no-op becausepropsis declared asanyon Line 59. This doesn't break anything, but it adds visual noise. A small cleanup opportunity:Suggested simplification
- img: (props: any) => ( - <ImageZoom - {...(props as any)} - src={withDocsBasePathForImageSrc((props as any).src)} - /> - ), + img: (props: any) => ( + <ImageZoom + {...props} + src={withDocsBasePathForImageSrc(props.src)} + /> + ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/src/mdx-components.tsx` around lines 59 - 64, Remove the redundant "as any" casts in the img renderer: in the img property function (the props parameter and usage inside the JSX for ImageZoom and withDocsBasePathForImageSrc), simply use props and props.src directly since props is already typed as any; update the img arrow function that returns <ImageZoom ...> to stop casting (references: img renderer, ImageZoom, withDocsBasePathForImageSrc, props).apps/docs/package.json (1)
15-15:lint:imagesis not wired into any CI step.The script exists and is correct, but it won't prevent regressions unless it's actually run in CI. The other
lint:*siblings (lint:links,lint:code) appear to have the same gap, but since this PR introducedlint:imagesspecifically to enforce the new/img/path convention, it's worth hooking it up now rather than later.Consider adding it to the CI workflow (e.g., alongside
lint:links) so broken image references block merges. You can also add it to a pre-build step:- "build": "pnpm run fetch-openapi && next build", + "build": "pnpm run lint:images && pnpm run fetch-openapi && next build",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/package.json` at line 15, The CI is not running the new "lint:images" npm script so image-path regressions won't fail builds; update the CI workflow and any pre-build steps to invoke "npm run lint:images" (or the project's package-manager equivalent) alongside existing lint tasks such as "lint:links" and "lint:code" so it runs on PRs; ensure the workflow job that runs linters installs dependencies before executing the script and add it to the same step that runs other lint scripts to block merges on failures.apps/docs/scripts/lint-images.ts (1)
52-55: Tilde-fenced code blocks (~~~) are not stripped — potential false positives.MDX supports both backtick and tilde fence variants. A
~~~block containing a Markdown image example (e.g.,) will not be stripped, and the linter will flag it as a broken local reference.🛡️ Proposed fix to also strip tilde-fenced blocks
function stripCodeBlocks(content: string): string { - return content.replace(/```[\s\S]*?```/g, (match) => + return content.replace(/(?:```|~~~)[\s\S]*?(?:```|~~~)/g, (match) => "\n".repeat((match.match(/\n/g) ?? []).length), ); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/scripts/lint-images.ts` around lines 52 - 55, stripCodeBlocks currently only removes backtick-fenced blocks and misses tilde-fenced ones, causing false positives; update the stripCodeBlocks function to match both backtick and tilde fences (i.e., blocks that start and end with either ``` or ~~~) and replace each matched block with the same number of newline characters to preserve line positions; implement this by using String.replace with a callback that counts newlines in the matched block and returns an equal-length newline string so both types of fenced code blocks are neutralized without altering line offsets.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/mxbai.yml:
- Line 37: There's a typo in the workflow env var name: the secret is assigned
to MXBAI_API_KEYY (extra "Y") which prevents the `@mixedbread/cli` from reading
the API key; update the environment variable name from MXBAI_API_KEYY to
MXBAI_API_KEY so the CLI can access the secret (refer to the env key
MXBAI_API_KEYY in the workflow and replace it with MXBAI_API_KEY).
In `@apps/docs/content/docs.v6/orm/more/internals/engines.mdx`:
- Line 57: The intro image uses the detailed 11-step diagram
typical-flow-query-engine-at-runtime.png but has a generic alt text "Prisma
engine" and is duplicated later; either replace the intro image with a true
high-level overview (if you have one) or swap it to the other available image
query-engine-node-js-at-runtime.png, and in any case update the alt text to
accurately describe the image (e.g., "Prisma query engine runtime flow — 11-step
detailed diagram" if keeping typical-flow-query-engine-at-runtime.png); ensure
the duplicate at the later section remains the detailed flow or is deduplicated
so the intro shows a higher-level figure and the detailed diagram keeps precise
alt text.
In `@apps/docs/content/docs/orm/prisma-schema/data-model/models.mdx`:
- Around line 319-320: The `?` modifier link currently points to
/orm/reference/prisma-schema-reference (missing the anchor) so it lands at the
top of the page; update the link for the `?` modifier (the markdown entry
starting with [`?`]) to include the anchor fragment `#-modifier-1` so it becomes
/orm/reference/prisma-schema-reference#-modifier-1, mirroring the v6 file's
correct anchor for the `?` modifier.
In `@apps/docs/scripts/lint-images.ts`:
- Around line 52-55: stripCodeBlocks currently strips fenced code blocks
entirely, removing newlines and causing downstream calculations (e.g.,
lineNumberAt and uses of match.index) to report incorrect line numbers; modify
stripCodeBlocks to replace each fenced block with the same number of newline
characters as were in the block (e.g., compute match.match(/\n/g)?.length and
return "\n".repeat(count)) so positions in the stripped text stay aligned with
the original file; update any other similar replacements near lineNumberAt and
match.index to use the same newline-preserving approach.
---
Nitpick comments:
In
`@apps/docs/content/docs.v6/orm/prisma-client/observability-and-logging/opentelemetry-tracing.mdx`:
- Line 242: Update the image alt text for the Jaeger screenshot (the markdown
line containing "") to a more
descriptive, accessible string that explains what the screenshot shows (e.g.,
"Jaeger trace visualization showing a service timeline with spans and span
durations for a sample request, including operation names and timestamps") so
screen-reader users get meaningful context; replace the short tool name with a
concise description of the visualization, its key elements (spans, service
names, durations), and the purpose of the screenshot.
In `@apps/docs/package.json`:
- Line 15: The CI is not running the new "lint:images" npm script so image-path
regressions won't fail builds; update the CI workflow and any pre-build steps to
invoke "npm run lint:images" (or the project's package-manager equivalent)
alongside existing lint tasks such as "lint:links" and "lint:code" so it runs on
PRs; ensure the workflow job that runs linters installs dependencies before
executing the script and add it to the same step that runs other lint scripts to
block merges on failures.
In `@apps/docs/scripts/lint-images.ts`:
- Around line 52-55: stripCodeBlocks currently only removes backtick-fenced
blocks and misses tilde-fenced ones, causing false positives; update the
stripCodeBlocks function to match both backtick and tilde fences (i.e., blocks
that start and end with either ``` or ~~~) and replace each matched block with
the same number of newline characters to preserve line positions; implement this
by using String.replace with a callback that counts newlines in the matched
block and returns an equal-length newline string so both types of fenced code
blocks are neutralized without altering line offsets.
In `@apps/docs/src/mdx-components.tsx`:
- Around line 59-64: Remove the redundant "as any" casts in the img renderer: in
the img property function (the props parameter and usage inside the JSX for
ImageZoom and withDocsBasePathForImageSrc), simply use props and props.src
directly since props is already typed as any; update the img arrow function that
returns <ImageZoom ...> to stop casting (references: img renderer, ImageZoom,
withDocsBasePathForImageSrc, props).
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Bug Fixes
Documentation
Chores