Skip to content

fix(docs): restore the Home hero mark and guard absolute asset paths - #12539

Merged
dagil-nvidia merged 9 commits into
mainfrom
claude/docs-logo-missing-74c6cc
Aug 3, 2026
Merged

fix(docs): restore the Home hero mark and guard absolute asset paths#12539
dagil-nvidia merged 9 commits into
mainfrom
claude/docs-logo-missing-74c6cc

Conversation

@dagil-nvidia

@dagil-nvidia dagil-nvidia commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Dynamo mark above the Home page heading renders as an empty tile in production. LandingStyles.tsx sourced it from /dynamo/assets/img/dynamo-logo.svg, a path Fern does not serve: Fern rewrites asset references only in MDX and docs.yml, never inside a <style> string, so the url() reached the browser verbatim and 404'd.

Introduced in #12373, which swapped a working absolute URL for a repo-relative one.

Fix. Render the mark as an <img> from the page MDX so Fern's asset pipeline rewrites the path, then pull it back over the heading with CSS; the header's top padding reserves its place. Tile chrome (92px box, 24px radius, green border, shadows, light/dark backgrounds) is unchanged.

Guard. check_asset_paths.py, wired as the check-asset-paths pre-commit hook, rejects site-absolute /.../assets/... references while leaving the two forms Fern does rewrite alone: ../../assets/... in MDX and ./assets/... in docs.yml.

Comment corrections. Three stale claims in the LandingStyles.tsx header comment: the landing rules do not live in main.css (#12330 moved them out, so there is no fallback baseline), CustomFooter's SITE_CSS does reach these pages, and the placement filenames predate the docs restructure.

Validation

Check Result
Final CSS + markup prototyped against the live production DOM, light theme Mark renders; tile and heading land on the same pixels as today's broken build
Same, dark theme #0c0d0b tile, green mark, correct border and shadow
check_asset_paths.py, default scope 370 files, no hits
Same, against the two unfixed files on main Both caught, including the exact line that broke the logo
Reintroduce url("/dynamo/assets/...") in LandingStyles.tsx Caught at the right line
Reintroduce the TerminalDemo.tsx path Caught (exit 1)
pre-commit run on the change set All hooks pass, DCO included
Fern rewrite mechanism Confirmed on the live Recipes page: <img className=... src="../../../assets/img/..."> resolves to hashed fdr-prod-docs-files-public.s3... URLs

Local fern docs dev was not run (no Fern CLI in this environment). The rendering evidence above is from the published site with the final CSS injected, not a local build.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

Generated with Claude Code


Open in Devin Review

Summary by CodeRabbit

  • New Features

    • Added the Dynamo logo to the documentation home page.
    • Improved hero-logo styling and positioning.
  • Documentation

    • Updated landing-style guidance and documented page paths.
    • Corrected the terminal demo asset reference.
  • Chores

    • Added automated validation to detect invalid documentation asset paths before changes are committed.

The Dynamo mark above the Home page heading rendered as an empty tile.
LandingStyles.tsx sourced it from `/dynamo/assets/img/dynamo-logo.svg`, a
path Fern does not serve: it rewrites asset references only in MDX and
docs.yml, never inside a `<style>` string, so the `url()` reached the
browser verbatim and 404'd. #12373 introduced it by swapping a working
absolute URL for a repo-relative one.

Render the mark as an `<img>` from the page MDX so Fern's asset pipeline
rewrites the path, and pull it back over the heading with CSS; the header
top padding reserves its place. Tile chrome is unchanged in both themes.

Add check_asset_paths.py, wired as the `check-asset-paths` pre-commit
hook, so a site-absolute asset path cannot reach the site again. It
rejects `/.../assets/...` while leaving the two forms Fern does rewrite
alone: `../../assets/...` in MDX and `./assets/...` in docs.yml.

Also correct three stale claims in the LandingStyles.tsx header comment:
the landing rules do not live in main.css (#12330 moved them out, so there
is no fallback baseline), CustomFooter's SITE_CSS does reach these pages,
and the placement filenames predate the docs restructure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@dagil-nvidia
dagil-nvidia requested review from a team as code owners August 2, 2026 05:24
@github-actions github-actions Bot added documentation Improvements or additions to documentation fix labels Aug 2, 2026
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 25f23f6

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread docs/fern/components/LandingStyles.tsx
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR adds a Fern asset-path checker and pre-commit hook. It updates landing styles, MDX placement paths, the home-page logo, and the terminal demo asset reference.

Changes

Fern asset path validation

Layer / File(s) Summary
Asset path checker and pre-commit hook
docs/fern/scripts/check_asset_paths.py, .pre-commit-config.yaml
The checker detects site-absolute asset references and returns validation status. The pre-commit hook runs it for relevant Fern files.
Fern asset references and landing mark
docs/fern/components/LandingStyles.tsx, docs/fern/pages/home/index.mdx, docs/fern/components/TerminalDemo.tsx
Landing styles now use the MDX-rendered logo image and current page paths. The home page adds the logo image. The terminal demo uses a relative cast asset path.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix and validation, but it omits the required Related Issues section and the reviewer starting point. Add the required Related Issues entry and identify the files or sections where the reviewer should start.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main changes: restoring the Home hero mark and guarding against absolute asset paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.pre-commit-config.yaml:
- Line 93: Update the pre-commit hook’s `files` regex to match both `.md` and
`.mdx` files under `docs/fern/pages`, changing the page suffix pattern to
`\.mdx?` while preserving the existing component, asset, and script matches.

In `@docs/fern/components/LandingStyles.tsx`:
- Around line 109-138: Update the max-width: 640px responsive rules to target
.dynamo-welcome__mark instead of header::before, sizing and positioning the 92px
mark appropriately for mobile. Increase the mobile header padding to reserve the
mark’s height and prevent the heading from overlapping it, while preserving the
existing desktop behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1a6e56e3-a0be-4c18-8e83-7d8d29e7ac1c

📥 Commits

Reviewing files that changed from the base of the PR and between 9cddb34 and 25f23f6.

📒 Files selected for processing (5)
  • .pre-commit-config.yaml
  • docs/fern/components/LandingStyles.tsx
  • docs/fern/components/TerminalDemo.tsx
  • docs/fern/pages/home/index.mdx
  • docs/fern/scripts/check_asset_paths.py

Comment thread .pre-commit-config.yaml Outdated
Comment thread docs/fern/components/LandingStyles.tsx
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Comment thread docs/fern/components/LandingStyles.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25f23f60f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .pre-commit-config.yaml Outdated
Comment thread docs/fern/scripts/check_asset_paths.py Outdated
Comment thread docs/fern/components/LandingStyles.tsx
dagil-nvidia and others added 2 commits August 2, 2026 02:50
The mobile breakpoint still reset the hero header padding to 2.75rem and
sized the `header::before` this PR removed, so the 92px mark stayed put and
the heading ran over it -- 89px of overlap measured at 375px. Point those
rules at `.dynamo-welcome__mark` and reserve its height in the padding.

Widen the guard: `translations/**` carries the zh-CN pages, which publish
through the locale in docs.yml and 404 the same way, but matched neither
the hook filter nor DEFAULT_GLOBS. Add the backtick as an opening delimiter
too -- these files hold CSS in template literals, so a bare assignment was
reachable and unmatched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
The floating notification rail linked to Slack and the events calendar,
both of which the hero CTA buttons already cover, so it repeated two links
a few hundred pixels apart.

Remove CommunityRail and the now-dead SlackIcon, CalendarAppIcon and
UPCOMING_EVENTS import with it, plus the .dynamo-welcome__community,
__notification and __calendar-app rules across the base styles and three
breakpoints. SLACK_URL and CALENDAR_URL stay -- the CTAs use them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 91b3f8b

Comment thread .pre-commit-config.yaml Outdated
docs.yml carries the logo, favicon and font path entries. Fern rewrites the
./assets/... form there, but a site-absolute one ships verbatim and 404s,
and the hook skipped the file entirely. Same gap as translations/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test a409877

Comment thread docs/fern/scripts/check_asset_paths.py Outdated

@harryskim harryskim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@dagil-nvidia
dagil-nvidia enabled auto-merge (squash) August 3, 2026 02:05
docs.yml writes its logo, favicon and font paths as bare YAML scalars, so a
pattern anchored on a quote, backtick or `(` read the file and found nothing.
Adding docs.yml to the hook scope was therefore inert. Accept `key: /...` and
`- /...` as openers too.

The earlier verification passed only because it quoted the injected value,
which is not the form the file uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 59b6142

The pattern's holes were found three times in review -- backtick, docs.yml
scope, then unquoted YAML scalars -- and each fix was checked by hand and
thrown away. Pin all twelve cases, positive and negative, and wire them as
check-asset-paths-selftest, mirroring check_published_styles.py --test.

Drop the script from the main hook's files: it was inert there, since the
scanner skips its own docstring. The self-test hook covers that trigger now.
Collapse the two overlapping opener comments left by the earlier patches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 6e71ea2

Scope lives in two files: DEFAULT_GLOBS for a bare run, the hook's files:
for the commit path. Both had to be widened for translations/ and again for
docs.yml, and each time only one was obvious. A files: narrower than the
globs is the silent case -- changed files skip the hook and only a full
manual run catches them.

--test now derives a flat and a nested sample from every glob and asserts
the hook pattern matches. Verified it fails closed: dropping translations
from files: turns four cases red.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@pull-request-size pull-request-size Bot removed the size/L label Aug 3, 2026
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 914a450

The hook's files: enumerated the same file types DEFAULT_GLOBS already
listed, so every scope change meant editing both. The previous commit
answered that by generating cases to prove the two agreed, which polished
the duplication instead of removing it.

Make files: a coarse ^docs/fern/ trigger with pass_filenames: false and let
DEFAULT_GLOBS decide what to scan. Drift is now impossible rather than
detected, and the drift machinery goes with it: 209 lines down to 163.

Coverage widens as a side effect. index.yml sits under docs/fern but matched
no branch of the old pattern, so editing it triggered nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Gil <dagil@nvidia.com>
@pull-request-size pull-request-size Bot added size/L and removed size/XL labels Aug 3, 2026
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test ad0ed4a

Restoring the hero mark also dropped CommunityRail and its 23 style
rules, which took the Slack and calendar links off the right of the
Home page. Two secondary buttons had been added beside Get started to
stand in for them, so the same two destinations appeared twice in the
middle of the hero and nowhere on the right.

The rail comes back and the stand-ins come out. Get started keeps the
actions row to itself.

Signed-off-by: Dan Gil <dagil@nvidia.com>
@pull-request-size pull-request-size Bot added size/XL and removed size/L labels Aug 3, 2026
@dagil-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test 234f63e

@dagil-nvidia
dagil-nvidia merged commit 58d289a into main Aug 3, 2026
94 checks passed
@dagil-nvidia
dagil-nvidia deleted the claude/docs-logo-missing-74c6cc branch August 3, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation fix size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants