Skip to content

Migrate show_output_when_hidden from PlutoRunner.embed_display to AbstractPlutoDingetjes.@embed - #56

Merged
disberd merged 11 commits into
masterfrom
copilot/fix-plutoextras-embedded-output
Jun 26, 2026
Merged

disberd merged 11 commits into
masterfrom
copilot/fix-plutoextras-embedded-output

Conversation

Copilot AI commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

show_output_when_hidden depended on PlutoRunner.embed_display, which was deprecated and removed in Pluto 1.0, breaking hidden-cell output embedding. This change updates the embedding path to the supported AbstractPlutoDingetjes API while preserving current behavior contracts.

  • Embedding path update

    • Replace legacy PlutoRunner.embed_display usage with AbstractPlutoDingetjes.Display.@embed for non-HTML values passed to show_output_when_hidden.
  • Runtime guard alignment

    • Keep explicit outside-Pluto failure semantics, now gated by is_inside_pluto() instead of Main.PlutoRunner checks.
  • Documentation sync

    • Update the show_output_when_hidden docstring note to reflect the new embedding mechanism.
using AbstractPlutoDingetjes.Display: @embed
using AbstractPlutoDingetjes: is_inside_pluto

show_output_when_hidden(x) = is_inside_pluto() ?
    show_output_when_hidden(@htl("$(@embed(x))")) :
    error("You can't call this function outside Pluto")

Copilot AI changed the title Fix show_output_when_hidden for Pluto 1.0 by using @embed Migrate show_output_when_hidden from PlutoRunner.embed_display to AbstractPlutoDingetjes.@embed Jun 25, 2026
Copilot AI requested a review from disberd June 25, 2026 15:47
disberd added 3 commits June 26, 2026 13:34
Test notebooks regenerate their environment in a fresh notebook on open, so the
embedded project/manifest is pure churn in git history. Strip it from the four
test notebooks and add a git clean filter (.gitattributes +
.githooks/strip-pluto-env) that keeps the committed blob stripped while leaving
the working copy untouched, so Pluto still loads the local env.

A new check-notebook-env CI job fails (with a hint pointing at the filter) if any
test notebook re-embeds a project/manifest. Also drop the redundant lts entry
from the test matrix.
@disberd

disberd commented Jun 26, 2026 •

Copy link
Copy Markdown
Owner

On top of the @embed migration in this PR, I added the following:

  • Migrated the package to Julia 1.12 Pkg workspaces — root [workspace] projects = ["test", "docs"] plus [sources] entries pointing back to the parent in test/ and docs/, so a single root Manifest.toml reliably covers the package, its tests and its docs.
  • Bumped the minimum AbstractPlutoDingetjes compat to 1.4 — the version that introduced the @embed macro this PR relies on. Without it an older 1.x could resolve and hit UndefVarError: @embed at runtime.
  • Stripped the embedded Pluto project/manifest from the test notebooks. They regenerate their environment in a fresh notebook on open, so the embedded env was only causing git churn — and on Julia 1.12 / Pluto 1.0 the stale pins failed to precompile (@embed not defined in PlutoUI.TerminalNotebook), which was breaking the notebook-based tests. With fresh envs they pass again.
  • Added a git clean filter (.gitattributes + .githooks/strip-pluto-env) that keeps the committed notebooks stripped while leaving the working copy untouched, so Pluto still loads the local env. Enable per clone with git config filter.pluto-env-strip.clean .githooks/strip-pluto-env.
  • Added a check-notebook-env CI job that fails (with a hint pointing at the filter) if a test notebook ever re-embeds a project/manifest.
  • Updated the GitHub Actions workflows. CI: checkout v4→v7, setup-julia v2→v3, cache v2→v3, codecov-action v4→v7. Docs: checkout v2→v7, setup-julia v1→v3, added cache@v3, and switched the build to julia-actions/julia-docdeploy@v1 with install-package: false (the docs workspace already sources the package via [sources]).
  • Bumped the version to 0.7.19 and updated the changelog.

Verified the full suite passes on Julia 1.12 (notebook items 66/66, Show methods 54/54, Aqua green).

@codecov

codecov Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.57%. Comparing base (e9818d9) to head (508789f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
- Coverage   98.98%   97.57%   -1.42%     
==========================================
  Files          16       15       -1     
  Lines         791      782       -9     
==========================================
- Hits          783      763      -20     
- Misses          8       19      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

disberd added 3 commits June 26, 2026 16:36
CI: checkout v4->v7, setup-julia v2->v3, cache v2->v3, codecov-action v4->v7.
Docs: checkout v2->v7, setup-julia v1->v3, add cache v3.

The Julia helper actions (buildpkg, runtest, processcoverage) already track the
current v1 major tag.
@disberd
disberd marked this pull request as ready for review June 26, 2026 14:50

@disberd disberd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed — changes build on the @embed migration as described above and the full suite passes on Julia 1.12. Good to merge.

@disberd
disberd merged commit 78fcdac into master Jun 26, 2026
6 of 7 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