Skip to content

fix(docs): stop recording source line numbers in generated API docs - #1805

Merged
murdore merged 1 commit into
releasefrom
fix/typedoc-no-source-lines
Sep 26, 2026
Merged

murdore merged 1 commit into
releasefrom
fix/typedoc-no-source-lines

Conversation

@murdore

@murdore murdore commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What

typedoc.json gains one line: "disableSources": true. The generated docs/api pages stop ending in Defined in: file.ts:LINE. The regeneration here only removes that line from every page: 3,674 files, 37,881 lines deleted, 5 added (the setting plus a CI comment).

To check the diff is mechanical, run git show --stat HEAD: the only non-docs/api files are typedoc.json and a comment in .github/workflows/ci.yml.

Why

A source line number on every page means that adding lines near the top of a large type file rewrites every later page. Two open PRs editing the same type file then conflict on all of those pages, whatever they actually changed.

probe: 3 comment-only lines added near the top of src/lib/types/providers.ts pages changed
before 143
after 0

On 2026-09-26, most of the conflicting PRs in the open queue conflicted only on generated docs/api pages. For example, #1800 conflicts with release on 110 of them and on no code. The line numbers also bloat diffs: #1800 is 162 files for about 12 real changes. That's probably why the review bot twice exited without posting a review there, though I haven't confirmed that.

This is the docs/api counterpart of #1794, which did the same for docs-site/static/search-index.json.

Checks

  • CI's docs/api drift gate (docs:api + prettier + git status --porcelain docs/api) is clean on this commit.
  • docs-site build: search-index.json is unchanged (docs/api is excluded from the site and the index).
  • format:check passes.

Trade-off

Generated pages lose their link to the source line. docs/api is excluded from the docs site (docusaurus.config.ts docs.exclude: ["**/api/**"]), so this only affects reading the markdown on GitHub.

Summary by CodeRabbit

  • Documentation
    • Clarified that generated API documentation omits source links, preventing source line numbers from triggering unrelated page updates.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ Single Commit Policy - COMPLIANT

Status: Policy requirements met • 1 commit • Valid format • Ready for merge

📊 View validation details

📝 Commit Details

  • Hash: 22c0cf4f9f793afd32d52b58adaea48ebd7debdc
  • Message: fix(docs): stop recording source line numbers in generated API docs
  • Author: Sachin Sharma

✅ Validation Results

  • Single commit requirement met
  • No merge commits in branch
  • Semantic commit message format verified
  • Ready for squash merge to release branch

🤖 Automated validation by NeuroLink Single Commit Enforcement

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The CI workflow comment now states that typedoc.json disables source links. This prevents source line numbers from causing unrelated generated API pages to be rewritten.

Changes

Generated API docs drift check

Layer / File(s) Summary
Document source-link setting
.github/workflows/ci.yml
The comment now states that disableSources removes source line numbers from generated pages.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: pdogra1299

Merge Risk: ⚪ Minimal · up to 22c0c

The change documents why generated API pages omit source links. That trade-off is intentional, and no actionable merge risk is evident from the supplied context.

Architecture Summary

Architecture risk: 🔵 Low · up to 22c0c

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/ci.yml: The comment now records that disableSources removes source line numbers from generated pages; previously, it only noted that reverting the pinned revision/version settings would break the drift check.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing source line numbers from generated API documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Validation Results

🚀 Documentation validation passed!

Check Status Result
Frontmatter Validation ✅ Passed
TypeScript Check ✅ Passed
Build ✅ Passed
Link Validation ✅ Passed

📦 Build artifact uploaded successfully. Ready for deployment preview.

Commit: a4063448d8d7f33cdf638768ac94d61486b36999 | Workflow: View logs

Every docs/api page ended with "Defined in: file.ts:LINE", so a PR that
added lines near the top of a large type file rewrote every later page.
Three comment-only lines added to src/lib/types/providers.ts changed 143
generated pages without touching any API. Two open PRs that edit the same
type file then conflicted on all of those pages, whatever they changed.
On 2026-09-26 that was nearly every conflict in the open queue: #1800 hit
110 conflicting docs/api pages and no code conflict. It also inflated
diffs: #1800 is 162 files for about 12 real changes.

typedoc.json now sets disableSources. The same three-line probe changes
0 pages, so docs/api changes only when a documented API changes, and the
CI drift gate keeps working. The regeneration here removes the
"Defined in" line from all 3,662 pages and changes nothing else (37,832
deleted lines, one added).

Trade-off: the generated pages lose their link to the source line.
docs/api is excluded from the docs site (docusaurus docs.exclude
"**/api/**"), so this only affects reading the markdown on GitHub.
@murdore
murdore force-pushed the fix/typedoc-no-source-lines branch from 851713b to 22c0cf4 Compare September 26, 2026 17:40

@Tara-ag Tara-ag 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.

APPROVE — clean, well-justified docs churn reduction: typedoc.json sets disableSources: true and the docs are regenerated to match, so docs/api only changes when a documented API actually changes.

@Tara-ag

Tara-ag commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

APPROVE ✅

Clean, well-justified docs-churn reduction. typedoc.json gains "disableSources": true and the ~3,674 committed docs/api/*.md files are regenerated to drop the Defined in: file.ts:LINE lines, so an unrelated one-line change in src/ no longer rewrites ~143 doc pages. This is exactly what the CI drift gate (pnpm run docs:api, test-shards → validate group) enforces.

Findings

Severity File:line Description
— — No findings.

What was checked — all clean

  • typedoc.json: setting "disableSources": true is the correct, canonical typedoc option for suppressing source-location lines. It only affects output rendering — no effect on src/typecheck, emit, or plugin behavior. Complements the existing gitRevision/includeVersion pins that keep the drift gate stable.
  • .github/workflows/ci.yml: the added comment block (lines ~240-246) accurately documents why disableSources exists and states the real trade-off (losing in-page source links). Comment-only, no functional change to the gate.
  • docs/api/** (3,674 files, −37,832/+1): mechanical regeneration produced by pnpm run docs:api. These files are excluded from the site (docusaurus build), so no published-docs impact; the CI drift gate validates they are current, so no drift introduced.
  • No runtime / SDK surface touched — src/lib/** is unchanged, so rule 5 (backward compat) is unaffected.
  • Security: no credentials, secrets, or injection surface involved.

Review state

Formal approving review submitted separately on this PR, matching the verdict.

Checked: diff, existing comments (3 bot comments — no author replies that would require a response), full typedoc.json and the changed ci.yml block. Blast-radius/flow analysis not needed — no src/ code paths changed by this PR.

@murdore
murdore merged commit 47c4d1c into release Sep 26, 2026
30 checks passed
@murdore
murdore deleted the fix/typedoc-no-source-lines branch September 26, 2026 18:55
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 12.28.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants