Skip to content

📖🔧:drop the backslashes from generic API titles - #1922

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
claude/full-audit-0e491i-sdk-titles
Oct 19, 2026
Merged

openinf-commit-queue[bot] merged 1 commit into
livefrom
claude/full-audit-0e491i-sdk-titles

Conversation

@DerekNonGeneric

@DerekNonGeneric DerekNonGeneric commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Requested by DerekNonGeneric · project thread

Before: with the SDK's real TypeDoc output imported, 17 API pages got titles such as Type Alias: Guard\<T\> and Interface: MapLike\<T\>, and the backslashes showed in the page heading. The <title> was printed unescaped, and the HTML minifier read <T> there as a tag, so the tab title came out as Type Alias: Guard\<T \>&middot; OpenINF</T>.

After: those pages are titled Type Alias: Guard<T>, and the <title> renders as Type Alias: Guard&lt;T&gt; &middot; OpenINF.

How: stripTypeDocChrome removes CommonMark backslash escapes (ASCII punctuation only) from the heading it takes as the title. head.liquid escapes the title with escape_once, so a hand-written title that already contains an entity renders as before. A new test covers a generic type's title, and it fails without the fix. Over the 463 pages TypeDoc generates for the SDK, exactly those 17 titles change. In a full site build with that corpus, exactly those 17 pages differ, and every other page is byte-identical. nps test passes, apart from three checks that need network access the sandbox does not have (verify-dockerfile, verify-toml and verify-valid-for-ec).

Summary by CodeRabbit

  • Bug Fixes
    • Page titles now safely display characters such as < while preserving existing HTML entities.
    • Generic type titles in generated documentation display without escaped Markdown punctuation; the documentation content remains unchanged.
  • Tests
    • Added coverage for generic type titles and their Markdown content.

TypeDoc escapes Markdown punctuation in its page headings, so the
seventeen generic API pages took titles such as `Guard\<T\>` and
showed the backslashes in their h1 and <title>. The <title> was also
printed unescaped, and the minifier read `<T>` there as a tag, which
left a stray </T> in every such page's tab title.

Unescape CommonMark backslash escapes when reading the title, and
escape the <title> with escape_once so hand-written titles that
already carry an entity render as before. A generic type is now
covered by the stripTypeDocChrome tests.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit bb670ce
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6ad5ca25c8f40a52617a32dd
😎 Deploy Preview https://deploy-preview-1922--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 801870f4-4889-49b8-a1b0-d5839a759045
📥 Commits

Reviewing files that changed from the base of the PR and between 993ed90 and bb670ce.

📒 Files selected for processing: 3
  • _includes/head.liquid
  • build/shared/sdk-docs.mts
  • build/shared/sdk-docs.test.mts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

The changes escape non-homepage titles in Liquid and remove backslashes before escaped punctuation in Markdown heading titles extracted by the SDK documentation build. A test covers generic type alias title and content handling.

Changes: Liquid page titles

Layer / File(s) Summary
Escape non-homepage titles
_includes/head.liquid
The non-homepage title uses escape_once before the unchanged site-title suffix. A comment describes the escaping behavior.

SDK documentation heading titles

Layer / File(s) Summary
Normalize Markdown heading titles
build/shared/sdk-docs.mts, build/shared/sdk-docs.test.mts
stripTypeDocChrome removes backslashes that escape punctuation in Markdown heading titles. The test checks the generic type alias title and verifies that the content retains escaped markup.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to bb670

Generic-type titles retain their intended brackets in the page title and visible heading. No actionable merge-blocking risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: removing backslashes from generic API titles. The emojis add minor noise but do not make the title unclear or unrelated.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@DerekNonGeneric DerekNonGeneric self-assigned this Oct 19, 2026
@DerekNonGeneric DerekNonGeneric added the 🚀 Status: Commit Queue Land this pull request when its checks pass label Oct 19, 2026 — with Claude
@openinf-commit-queue
openinf-commit-queue Bot merged commit 758e83f into live Oct 19, 2026
19 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 🚀 Status: Commit Queue Land this pull request when its checks pass label Oct 19, 2026
@openinf-commit-queue
openinf-commit-queue Bot deleted the claude/full-audit-0e491i-sdk-titles branch October 19, 2026 12:34
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