Skip to content

fix(devnotes): include Figure component in Fern dev-notes publish alllowlist#722

Closed
3mei wants to merge 1 commit into
mainfrom
yev/fix/fern-figure-component-allowlist
Closed

fix(devnotes): include Figure component in Fern dev-notes publish alllowlist#722
3mei wants to merge 1 commit into
mainfrom
yev/fix/fern-figure-component-allowlist

Conversation

@3mei
Copy link
Copy Markdown
Contributor

@3mei 3mei commented Jun 1, 2026

📋 Summary

The Fern dev-notes publish workflow patches only an explicit allowlist of component files into the docs-website deploy branch. The new <Figure> component shipped by the Nemotron-Personas dev note (#611) wasn't on that allowlist, so the deployed site fails to resolve the import and renders an MDX compile error (Could not resolve "../../../../../components/Figure") in place of the post. This PR adds fern/components/Figure.tsx to both the workflow trigger paths and the FERN_DEVNOTE_SUPPORT_PATHS list used by the patch-devnotes script.

🔗 Related Issue

Follow-up to #611 — without this fix, the Nemotron-Personas dev note renders as a compile error on the deployed Fern site.

🔄 Changes

  • Add fern/components/Figure.tsx to .github/workflows/publish-fern-devnotes.yml trigger paths, so future edits to the component re-trigger a republish.
  • Add fern/components/Figure.tsx to FERN_DEVNOTE_SUPPORT_PATHS in fern/scripts/fern-published-branch.py, so the file is actually copied into the docs-website deploy branch alongside the other dev-note kit components.

🧪 Testing

  • fern check passes locally with the existing dev-note pages.
  • Verified fern/components/Figure.tsx is committed at HEAD and resolves locally; the gap was only on the deploy-branch copy step.
  • make test passes — N/A (docs-only fix, no Python changes).
  • Unit tests added/updated — N/A.
  • E2E tests added/updated — N/A.

✅ Checklist

  • Follows commit message conventions (fix(devnotes): ...).
  • Commits are signed off (DCO).
  • Architecture docs updated — N/A (mechanical allowlist addition, follows the existing pattern documented in the script comments).

…owlist

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
@3mei 3mei requested a review from a team as a code owner June 1, 2026 17:50
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR fixes a broken deploy for the Nemotron-Personas dev note by adding fern/components/Figure.tsx to the explicit allowlist used when patching dev notes into the docs-website deploy branch.

  • publish-fern-devnotes.yml: fern/components/Figure.tsx is added to the workflow push trigger paths, matching the pattern for all other allowlisted component files.
  • fern-published-branch.py: fern/components/Figure.tsx is inserted into FERN_DEVNOTE_SUPPORT_PATHS in alphabetical order (between BlogCard.tsx and MetricsTable.tsx), so patch_devnotes copies it into the deploy branch alongside the rest of the dev-note kit.

Confidence Score: 5/5

Straightforward allowlist addition that mirrors the existing pattern exactly; no logic changes, no new code paths.

Both changes are additive list entries that follow the established pattern character-for-character. Figure.tsx is confirmed to exist in the repo and is imported by two dev note MDX pages (nemotron-personas.mdx and data-designer-got-skills.mdx). No other components in fern/components/ that are used exclusively by dev notes appear to be missing from the list.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/publish-fern-devnotes.yml Adds fern/components/Figure.tsx to the workflow trigger paths so future edits to the component re-trigger a republish — consistent with all other component entries.
fern/scripts/fern-published-branch.py Adds fern/components/Figure.tsx to FERN_DEVNOTE_SUPPORT_PATHS so it is copied into the deploy branch during patch-devnotes; the file exists at HEAD and is imported by two dev note MDX pages.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Push to main] -->|paths trigger| B{publish-fern-devnotes workflow}
    B --> C[Checkout source, workflow, website branches]
    C --> D[patch-devnotes script]
    D --> E[sync_fern_root_config]
    D --> F[Copy FERN_DEVNOTE_SUPPORT_PATHS]
    F --> F1[fern/assets]
    F --> F2[Authors.tsx]
    F --> F3[BlogCard.tsx]
    F --> F4[Figure.tsx ✅ added]
    F --> F5[MetricsTable.tsx]
    F --> F6[TrajectoryViewer.tsx]
    F --> F7[fern/components/devnotes]
    D --> G[extract + rewrite devnotes nav block]
    G --> H[Commit & push to docs-website branch]
    H --> I[fern generate --docs]
Loading

Reviews (1): Last reviewed commit: "fix(devnotes): include Figure component ..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

MkDocs preview: https://5ad2a88e.dd-docs-preview.pages.dev

Fern preview: https://nvidia-preview-pr-722.docs.buildwithfern.com/nemo/datadesigner

Fern previews include the docs-website version archive with PR changes synced into latest. Notebook tutorials are rendered without execution outputs in previews.

@3mei
Copy link
Copy Markdown
Contributor Author

3mei commented Jun 1, 2026

Closing in favor of #721

@3mei 3mei closed this Jun 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Review of PR #722

Title: fix(devnotes): include Figure component in Fern dev-notes publish allowlist
Status: CLOSED (merged as 7bd7d39)
Size: +2 / -0 across 2 files

Summary

Small, targeted fix that adds fern/components/Figure.tsx to two allowlists used by the Fern dev-notes publish pipeline:

  1. The paths: filter in .github/workflows/publish-fern-devnotes.yml (so future edits to Figure.tsx re-trigger a republish).
  2. The FERN_DEVNOTE_SUPPORT_PATHS list in fern/scripts/fern-published-branch.py (so the file is actually copied into the docs-website deploy branch).

The Nemotron-Personas dev note from #611 imports Figure, but the component was missing from both allowlists, causing an MDX compile error (Could not resolve "../../../../../components/Figure") on the deployed site.

Findings

Correctness — ✅

  • Both edits insert Figure.tsx in the correct alphabetical slot (between BlogCard.tsx and MetricsTable.tsx), matching the surrounding ordering convention in both files.
  • The two allowlists are kept in sync — both must include the file for the publish pipeline to work end-to-end (the workflow won't fire without the path filter, and the script won't copy the file without the support-paths entry).
  • The component file (fern/components/Figure.tsx) does exist at HEAD, landed in docs(devnotes): add Nemotron-Personas dev note #611, so the allowlist entries are not pointing at phantom paths.
  • No CSS file is added, which is consistent with the comment at fern/scripts/fern-published-branch.py:41-43: dev-note kit components inject their own CSS via <style> tags, so no stylesheet entry is needed for Figure.

Style / conventions — ✅

  • Follows the existing pattern documented in the script comments — purely additive, no surrounding refactor.
  • Commit message follows the conventional fix(devnotes): ... style.

Test coverage — ⚠️ (pre-existing, not in this PR's scope)

  • There is no automated guard that the workflow paths: filter and FERN_DEVNOTE_SUPPORT_PATHS stay in sync, or that every component imported by a dev note appears in both lists. This bug is precisely the kind that such a check would catch. Worth filing as a follow-up — not a blocker for this hotfix.

Risk — minimal

  • Allowlist-only change, no logic changes, no Python or runtime behavior changes.
  • Affects only the dev-notes publish workflow; no impact on the data_designer packages or any user-facing API.
  • Fully reversible.

Suggestions (non-blocking, follow-up)

  1. Sync check. Add a tiny CI step (or a unit test next to fern-published-branch.py) that asserts the workflow paths: filter and FERN_DEVNOTE_SUPPORT_PATHS cover the same set of component files. Could be as simple as parsing both with PyYAML/AST and diffing the sets.
  2. Lint for missing deploy components. A pre-publish check that scans dev-note MDX for import ... from ".../components/<Foo>" and confirms <Foo>.tsx is in FERN_DEVNOTE_SUPPORT_PATHS would catch this class of issue at PR time rather than after merge.

Verdict

Approve. Mechanical, correct, and minimal hotfix that restores the Nemotron-Personas dev note on the deployed site. The PR is already merged; no further action required on this PR. Consider the sync-check follow-up to prevent recurrence.

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