Skip to content

fix(docs): prevent API reference title from inheriting child tag description overview page#14870

Merged
tdclarin258 merged 2 commits intomainfrom
devin/1775783619-fix-tag-description-pages-clickable-title
Apr 15, 2026
Merged

fix(docs): prevent API reference title from inheriting child tag description overview page#14870
tdclarin258 merged 2 commits intomainfrom
devin/1775783619-fix-tag-description-pages-clickable-title

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 10, 2026

Description

Refs: Related to fern-platform#9488

When tag-description-pages: true is set on an API reference, the top-level API reference title (e.g., "Salesforce Platform APIs") becomes clickable because it inherits the first child tag section's overviewPageId. This is undesirable — the tag description overview pages belong to the individual folder/tag sections, not the parent API reference.

Changes Made

  • Added a guard (!this.apiSection.tagDescriptionPages) to the overviewPageId inheritance logic in ApiReferenceNodeConverter.get(). When tag-description-pages is enabled, the parent API reference no longer inherits a child apiPackage's overviewPageId, keeping the top-level title as a non-clickable section header.
  • Added a unit test in tag-description-pages.test.ts that asserts overviewPageId is undefined on the ApiReferenceNode when tagDescriptionPages is enabled, and verifies child apiPackage nodes still retain their own overviewPageId values.

Testing

  • Existing unit tests pass (44/44 in @fern-api/docs-resolver)
  • Unit test added: "does not inherit child tag overviewPageId when tag-description-pages is enabled" — verifies node.overviewPageId is undefined at the API reference level while child apiPackage nodes still have overview pages
rec-fe3b396175c74cc5af878f7d163b4aca-edited.mp4

Human Review Checklist

  • Behavioral change for existing users: Any API reference with tag-description-pages: true will no longer have a clickable top-level title (unless an explicit summary/overview page is configured). Verify this is acceptable.
  • Flattened case: The old inheritance also applied when the API reference was flattened (comment mentioned DocsDefinitionResolver.toSectionNode() would inherit it). Confirm the flattened case doesn't need special handling.
  • No opt-out path: Users who want the old behavior (parent inherits first child's overview) while also using tag-description-pages would need to set an explicit summary on the API reference. Confirm this is reasonable.

Link to Devin session: https://app.devin.ai/sessions/1784b5d69de24f4fbaff5f83675e255e

…ription overview page

When tag-description-pages is enabled, child apiPackage nodes get
overviewPageIds from their tag descriptions. Previously, the parent
API reference node would inherit the first child's overviewPageId,
making the top-level API reference title clickable (navigating to a
folder's tag description page). This was undesirable — the folder
overview pages belong to the individual tag sections, not the parent.

Now the inheritance is skipped when tagDescriptionPages is enabled,
keeping the top-level API reference title as a non-clickable header.

Co-Authored-By: tristan.declarin <tristan.declarin@buildwithfern.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

…scription-pages

Co-Authored-By: tristan.declarin <tristan.declarin@buildwithfern.com>
@tdclarin258 tdclarin258 merged commit ddf8e53 into main Apr 15, 2026
57 checks passed
@tdclarin258 tdclarin258 deleted the devin/1775783619-fix-tag-description-pages-clickable-title branch April 15, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants