Skip to content

fix: read documentation content from asset payloads [BIT-8747] - #27

Merged
sl merged 1 commit into
mainfrom
sam/bit-8747-payload-content
Oct 15, 2026
Merged

sl merged 1 commit into
mainfrom
sam/bit-8747-payload-content

Conversation

@sl

@sl sl commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Return page content from documentation assets built for Xcode 27, which moved it out of the content attribute.

Problem

With the Xcode 27 documentation asset installed, Client.entry(for:) and search(omitContent: false) return entries with no content at all. The asset leaves the content attribute empty for every entry and stores each page's text in its JSON payload instead.

The asset also splits every page into page#section entries typed like the page itself (article, symbol, tutorial, …), keeping only the overview on the page. Only topic sections were appended before, so even with content restored, an article came back as just its overview.

Proposed Fix

  • When the content attribute is empty, decode content from the asset's payload. Older assets that still fill the attribute are unaffected.
  • Append every section of a page, not only topic groups, and fold all of them out of search results when their page is present.
  • Find sections by the pages' frameworks rather than listing every topic identifier in the asset. Every section in the Xcode 27 asset shares its page's framework, and this makes entry(for:) faster than before.

Testing

  • Live integration tests now cover symbol and article section content and run against the Xcode 27 asset. Fixtures were updated for its renames: the Swift Testing framework is now Testing, and TechnologyOverviews/liquid-glass is gone. Before this change, 13 live assertions failed against this asset; now the whole suite passes.
  • xcdocs get returns full content for the pages from the bug report, including /documentation/SwiftUI/Color and /documentation/HealthKit/HKSourceQueryDescriptor.

Documentation assets built for Xcode 27 leave the `content` attribute
empty and store each page's text in its JSON payload. They also split
every page into `page#section` entries typed like the page itself,
not just topic groups, and keep only the overview on the page.

Take `content` from the payload when the attribute is empty, and append
every section to its page, not only topics. Look sections up by the
pages' framework rather than listing every topic in the asset.

Update the live fixtures for the Xcode 27 asset, which renames the
Swift Testing framework to Testing and drops the TechnologyOverviews
Liquid Glass article.
@sl
sl force-pushed the sam/bit-8747-payload-content branch from 3083170 to 9c54c04 Compare October 15, 2026 01:11
@sl
sl merged commit 1857220 into main Oct 15, 2026
2 checks passed
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.

2 participants