Skip to content

fix(llms-txt): skip empty headings#931

Open
avivkeller wants to merge 1 commit into
mainfrom
llms-txt-skip-empty-headings
Open

fix(llms-txt): skip empty headings#931
avivkeller wants to merge 1 commit into
mainfrom
llms-txt-skip-empty-headings

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings July 22, 2026 05:08
@avivkeller
avivkeller requested a review from a team as a code owner July 22, 2026 05:08
@cursor

cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Narrow output-filter change for llms.txt with no auth, data, or runtime behavior impact.

Overview
llms.txt generation now drops depth-1 API doc entries whose heading has no text, so the link list no longer includes blank or malformed heading rows.

The generate filter adds entry.heading.data.text as a truthy check alongside entry.heading.depth === 1 before buildApiDocLink runs.

Reviewed by Cursor Bugbot for commit d08df7f. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview, Comment Jul 22, 2026 5:09am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nodejs-doc-kit Ignored Ignored Jul 22, 2026 5:09am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

api-links Generator

Performance

Metric Base Head Diff
Elapsed time 1.53 s 830.00 ms -700.00 ms (-45.75%)
User CPU time 2.82 s 1.84 s -980.00 ms (-34.75%)
System CPU time 350.00 ms 200.00 ms -150.00 ms (-42.86%)
Peak resident memory 347.15 MB 359.52 MB +12.37 MB (+3.56%)

legacy-html Generator

Performance

Metric Base Head Diff
Elapsed time 18.06 s 19.48 s +1.42 s (+7.86%)
User CPU time 59.20 s 63.84 s +4.64 s (+7.84%)
System CPU time 2.71 s 2.28 s -430.00 ms (-15.87%)
Peak resident memory 2.32 GB 2.11 GB -212.53 MB (-8.94%)

legacy-json Generator

Performance

Metric Base Head Diff
Elapsed time 9.04 s 8.74 s -300.00 ms (-3.32%)
User CPU time 27.57 s 27.78 s +210.00 ms (+0.76%)
System CPU time 1.93 s 1.89 s -40.00 ms (-2.07%)
Peak resident memory 1.64 GB 1.61 GB -33.56 MB (-1.99%)

llms-txt Generator

Performance

Metric Base Head Diff
Elapsed time 8.21 s 8.22 s +10.00 ms (+0.12%)
User CPU time 24.97 s 25.67 s +700.00 ms (+2.80%)
System CPU time 1.74 s 1.91 s +170.00 ms (+9.77%)
Peak resident memory 1.58 GB 1.63 GB +50.34 MB (+3.11%)

orama-db Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| orama-db.json | 8.90 MB | 8.90 MB | +1.34 KB (+0.01%) |

Performance

Metric Base Head Diff
Elapsed time 8.66 s 8.58 s -80.00 ms (-0.92%)
User CPU time 25.41 s 25.88 s +470.00 ms (+1.85%)
System CPU time 1.83 s 1.84 s +10.00 ms (+0.55%)
Peak resident memory 1.64 GB 1.63 GB -3.75 MB (-0.22%)

web Generator

Output size

| File | Base | Head | Diff |

|-|-|-|-|

| all.html | 21.24 MB | 21.24 MB | +202.00 B (+0.00%) |

Performance

Metric Base Head Diff
Elapsed time 77.41 s 64.24 s -13.17 s (-17.01%)
User CPU time 166.46 s 132.56 s -33.90 s (-20.37%)
System CPU time 4.75 s 4.15 s -600.00 ms (-12.63%)
Peak resident memory 5.69 GB 5.39 GB -313.56 MB (-5.38%)

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.89%. Comparing base (6a217f0) to head (d08df7f).

Files with missing lines Patch % Lines
src/generators/llms-txt/generate.mjs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #931   +/-   ##
=======================================
  Coverage   84.89%   84.89%           
=======================================
  Files         193      193           
  Lines       17512    17512           
  Branches     1551     1551           
=======================================
  Hits        14867    14867           
  Misses       2639     2639           
  Partials        6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmuenzenmeyer bmuenzenmeyer 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.

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.

3 participants