Skip to content

Notebooks: follow-ups to rich outputs (#5) - #7

Merged
join3r merged 1 commit into
masterfrom
fix/notebook-rich-output-followups
Oct 1, 2026
Merged

join3r merged 1 commit into
masterfrom
fix/notebook-rich-output-followups

Conversation

@join3r

@join3r join3r commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Fixes the issues raised in the review of #5.

  • IPython placeholders: display(HTML(...)), Markdown(...) and JSON(...) send text/plain as <IPython.core.display.X object>. When the plain text is only an object repr, it now yields to HTML, markdown or JSON, and is used only if nothing richer is present. Real plain text (pandas frames) still wins, as before.
  • CSS in kernel HTML: <style> and style attributes are stripped, so output can't restyle the app or cover it with position: fixed.
  • Theme: markdown outputs get the cell's effectiveTheme instead of a hardcoded "dark".
  • Attachments in code: attachment: references inside inline code and fenced blocks are left as written.

Test plan

  • New cases in tests/notebook-rich-output.test.tsx for each fix
  • Full suite, typecheck, lint

🤖 Generated with Claude Code

- An IPython display object's text/plain placeholder
  ("<IPython.core.display.HTML object>") no longer hides its HTML,
  markdown or JSON; real plain text still wins, as before.
- Kernel HTML is sanitized without <style> and style attributes so an
  output cannot restyle or cover the app.
- Markdown outputs get the real theme instead of a hardcoded "dark".
- attachment: references inside code spans and fenced blocks are left
  as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@join3r
join3r merged commit d6968d3 into master Oct 1, 2026
4 checks passed
@join3r
join3r deleted the fix/notebook-rich-output-followups branch October 1, 2026 10:23
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