Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates PDF/PPTX table rendering to improve visual contrast and reliability, streamlines MCP GitHub server setup by leveraging GitHub CLI authentication, and clarifies module hash validation behavior.
Changes:
- Improve table header/row contrast behavior in PDF and PPTX table renderers (and update PDF golden images accordingly).
- Update MCP GitHub setup docs/recipe to optionally source
GITHUB_TOKENfromgh auth token. - Restrict module hash validation to system modules only, treating user modules as mutable.
Reviewed changes
Copilot reviewed 7 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
builtin-modules/src/pdf.ts |
Adjusts table header contrast vs page background and ensures every table row has an explicit fill. |
builtin-modules/src/pptx-tables.ts |
Adjusts header background selection for contrast and ensures all rows have explicit fills for reliable auto-contrast. |
src/code-validator/guest/runtime/src/validator.rs |
Changes hash validation to only check system-authored modules. |
Justfile |
Enhances mcp-setup-github to attempt gh auth token when GITHUB_TOKEN is unset. |
docs/MCP.md |
Updates setup instructions to use GitHub CLI auth for GITHUB_TOKEN. |
builtin-modules/pdf.json |
Updates sourceHash to match updated PDF module source. |
builtin-modules/pptx-tables.json |
Updates sourceHash to match updated PPTX tables module source. |
tests/golden/pdf/two-column.png |
Updates expected PDF rendering output (golden). |
tests/golden/pdf/title-page.png |
Updates expected PDF rendering output (golden). |
tests/golden/pdf/table-styles.png |
Updates expected PDF rendering output (golden). |
tests/golden/pdf/signature-line.png |
Updates expected PDF rendering output (golden). |
No need for users to create/paste PATs when they already have gh CLI authenticated. The setup recipe auto-detects gh auth token and falls back with a helpful message if unavailable. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
PDF tables: every row now gets an explicit fill (no transparent rows). Text color is always computed against the actual fill via autoTextColor. Both PDF and PPTX: when headerBg matches the page/slide background (contrast ratio < 1.5), swap to theme accent1 so the header stands out. Validator: skip hash checks for user modules — they're mutable by design. System message: prefer MCP browser tools when available, fall back to fetch. Updated golden baselines for PDF visual regression tests. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
e833199 to
5ba5e03
Compare
- Clone preset styles in resolveTableStyle to prevent mutation of shared TABLE_STYLES singletons across renders - Use local pageBg from doc.theme.bg instead of caching stale _pageBg on the style object; remove _pageBg from TableStyle interface - Use validated style.bodyFg for row text color with autoTextColor fallback, fixing dead code where bodyFg was corrected but never used - Enable PDF visual tests on Windows via WSL pdftoppm - Add install-pdf-deps Justfile recipe for Linux and Windows/WSL - Regenerate golden baselines to match bodyFg rendering change Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
- Extract pdf-visual into a dedicated job on ubuntu-22.04 hosted runner so goldens are reproducible and fork-accessible (self-hosted 1ES pools aren't available to forks). - Remove poppler install from lint-and-test and build-and-test KVM jobs; pdf-visual test self-skips when pdftoppm is absent. - Switch update-golden.yml to ubuntu-22.04 hosted runner so regenerated goldens match the validator image. - Upload diff PNGs as an artifact on pdf-visual failure for debugging. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the reliability and accessibility of table rendering in both PDF and PPTX modules, enhances the setup process for the MCP GitHub server by integrating GitHub CLI authentication, and clarifies module hash validation logic.