Skip to content

Comments

chore(): update links and images#7537

Merged
mhartington merged 4 commits intomainfrom
fix/lint-links-images
Feb 20, 2026
Merged

chore(): update links and images#7537
mhartington merged 4 commits intomainfrom
fix/lint-links-images

Conversation

@mhartington
Copy link
Member

@mhartington mhartington commented Feb 20, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed CI environment variable name for API key
    • Corrected formatting in the database-features table
  • Documentation

    • Updated many docs to use a centralized image directory
    • Fixed internal documentation links and anchors
    • Adjusted several doc cards' href targets
  • Chores

    • Added an image-reference linter to detect broken docs images
    • Standardized image handling for rendered docs images

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Feb 20, 2026 2:27am
docs Ready Ready Preview, Comment Feb 20, 2026 2:27am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Rewrites many MDX image paths from /docs/... to /img/..., adds an image lint script and npm script, updates MDX image component to rewrite image srcs, and renames the Upload Docs workflow env var from MIXEDBREAD_API_KEY to MXBAI_API_KEY.

Changes

Cohort / File(s) Summary
Workflow configuration
\.github/workflows/mxbai.yml
Renamed environment variable in the Upload Docs step from MIXEDBREAD_API_KEY to MXBAI_API_KEY.
Docs — bulk image path updates
apps/docs/content/docs.v6/.../*.mdx, apps/docs/content/docs/.../*.mdx
Replaced many embedded image references to use /img/... instead of /docs/... across numerous MDX files (diagram/illustration path changes only).
Docs — targeted docs (drivers, DBs, deployment, migrate, schema, observability)
apps/docs/content/docs.v6/orm/overview/..., .../databases/*, .../prisma-client/..., .../prisma-migrate/..., .../prisma-schema/..., .../observability-and-logging/...
Multiple MDX files updated to point images at the new /img base path; no textual or behavioral changes.
Docs — small content/link fixes
apps/docs/content/docs.v6/orm/reference/database-features.mdx, apps/docs/content/docs/(index)/index.mdx, apps/docs/content/docs/orm/prisma-schema/data-model/models.mdx
Fixed a stray Markdown table dash, adjusted two Card hrefs, and corrected anchor link targets.
Image linting & MDX image handling
apps/docs/package.json, apps/docs/scripts/lint-images.ts, apps/docs/src/mdx-components.tsx
Added lint:images npm script and lint-images.ts to validate local image references; introduced withDocsBasePathForImageSrc() and wired it into the MDX img component to rewrite image srcs at render time.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore(): update links and images' is vague and generic, using non-descriptive terms that don't convey specific information about what links or images were updated or why. Consider a more specific title such as 'chore: migrate image paths from /docs to /img and update internal documentation links' to better reflect the scope and intent of the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

🍈 Lychee Link Check Report

3659 links: ✅ 2982 OK | 🚫 11 errors | 🔀 0 redirects | 👻 664 excluded

❌ Errors

./apps/docs/content/docs.v6/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs.v6/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs.v6/guides/permit-io-access-control.mdx

./apps/docs/content/docs.v6/guides/vercel-app-deployment.mdx

./apps/docs/content/docs.v6/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs.v6/orm/prisma-client/setup-and-configuration/databases-connections/index.mdx

./apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs/guides/integrations/permit-io.mdx

./apps/docs/content/docs/guides/integrations/vercel-deployment.mdx

./apps/docs/content/docs/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

Full Statistics Table
Status Count
✅ Successful 2982
🔀 Redirected 0
👻 Excluded 664
🚫 Errors 11
⛔ Unsupported 2
⏳ Timeouts 0
❓ Unknown 0

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
-![Jaeger UI](/img/v6/orm/prisma-client/observability-and-logging/jaeger.png)
+![Screenshot of the Jaeger UI dashboard showing an example Prisma Client trace with nested spans.](/img/v6/orm/prisma-client/observability-and-logging/jaeger.png)
🤖 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 "![Jaeger
UI](/img/v6/orm/prisma-client/observability-and-logging/jaeger.png)") 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 redundant as any casts are unnecessary since props is already typed any.

On Lines 61–62, (props as any) is a no-op because props is declared as any on 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:images is 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 introduced lint:images specifically 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., ![alt](./foo.png)) 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 "![Jaeger
UI](/img/v6/orm/prisma-client/observability-and-logging/jaeger.png)") 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>
@mhartington mhartington merged commit f1c0d20 into main Feb 20, 2026
8 of 11 checks passed
@mhartington mhartington deleted the fix/lint-links-images branch February 20, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant