Skip to content

Fixes#59

Merged
simongdavies merged 5 commits intohyperlight-dev:mainfrom
simongdavies:fixes
Apr 23, 2026
Merged

Fixes#59
simongdavies merged 5 commits intohyperlight-dev:mainfrom
simongdavies:fixes

Conversation

@simongdavies
Copy link
Copy Markdown
Member

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.

@simongdavies simongdavies added the bug Something isn't working label Apr 16, 2026
Copilot AI review requested due to automatic review settings April 16, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_TOKEN from gh 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).

Comment thread builtin-modules/src/pdf.ts
Comment thread builtin-modules/src/pdf.ts Outdated
Comment thread builtin-modules/src/pdf.ts
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>
@simongdavies simongdavies force-pushed the fixes branch 3 times, most recently from e833199 to 5ba5e03 Compare April 23, 2026 09:43
- 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>
@simongdavies simongdavies merged commit 616df06 into hyperlight-dev:main Apr 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants