Skip to content

Surface package-bundled private gallery docs#397

Merged
PrzemyslawKlys merged 12 commits into
mainfrom
codex/private-gallery-pages
May 24, 2026
Merged

Surface package-bundled private gallery docs#397
PrzemyslawKlys merged 12 commits into
mainfrom
codex/private-gallery-pages

Conversation

@PrzemyslawKlys
Copy link
Copy Markdown
Member

Summary

  • retain bounded markdown/text content for package documentation assets discovered during private gallery package inspection
  • feed package-backed portal docs with that content so bundled README/docs/changelog/license files can render as module-related pages
  • expose maxDocumentContentBytes pipeline/schema configuration and update private gallery docs

Validation

  • dotnet test .\PowerForge.Tests\PowerForge.Tests.csproj -c Release --filter "PrivateGalleryEngineTests|PortalDocsIndexTests|PortalModulePagesTests" --no-restore
  • POWERFORGE_ROOT='C:\Support\GitHub\PSPublishModule-private-gallery-pages'; C:\Support\Github\PowerShellGalleryDemo\build.ps1 -Ci
  • Browser smoke: http://127.0.0.1:8094/modules/pspublishmodule/, /modules/pspublishmodule-pspublishmodule-package-readme/, /modules/pspublishmodule-private-galleries/ with zero console warnings/errors

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ddeae281eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{
var kind = string.IsNullOrWhiteSpace(asset.Kind) ? Classify(asset.Path, classify) : asset.Kind;
var doc = CreateDocument(source, normalizedSource, asset.Path, null, package.WebUrl, null, kind, docs.Count);
var doc = CreateDocument(source, normalizedSource, asset.Path, asset.Content, package.WebUrl, null, kind, docs.Count);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor includeContent/maxContentBytes for package sources

When portal-docs-index is run with includeContent: false (or a small maxContentBytes), package-backed docs still inject full asset.Content into docs.json because IndexPackageSource passes it straight to CreateDocument without checking WebPortalDocsOptions. This newly bypasses the content controls that local/GitHub/Azure DevOps sources respect, so users can still leak or bloat output with bundled package text even when they explicitly disabled/limited content in this step.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06a83492e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +301 to +304
if (entry.Length > maxBytes)
{
metadata.Warnings.Add($"Skipped document content for '{entry.FullName}' because it exceeds the private gallery document content size limit.");
return null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Truncate oversized package docs instead of dropping content

ReadDocumentContent currently returns null whenever a document is larger than maxDocumentContentBytes, which makes the limit an all-or-nothing filter rather than a byte cap. That means a README/docs file that is only slightly over the configured limit loses all captured content, and downstream portal-module-pages skips generating a document page because it only emits pages for docs with non-empty content. This is a functional regression for the new “bounded content” flow: users tuning the limit to reduce output size will silently lose pages instead of getting truncated content.

Useful? React with 👍 / 👎.

@PrzemyslawKlys PrzemyslawKlys merged commit 1a046c3 into main May 24, 2026
6 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/private-gallery-pages branch May 24, 2026 13:41
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