Skip to content

Fix Deno display_data to use tagged template literal#6

Merged
rgbkrk merged 3 commits into
mainfrom
paris-v6
Feb 25, 2026
Merged

Fix Deno display_data to use tagged template literal#6
rgbkrk merged 3 commits into
mainfrom
paris-v6

Conversation

@rgbkrk

@rgbkrk rgbkrk commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary

This PR improves rich output testing for multiple kernels by fixing display_data snippets and adding update_display_data support.

Changes

Deno (TypeScript)

  • Fixed display_data_code to use tagged template literal syntax:
    Deno.jupyter.html`<b>bold</b>`
  • Added update_display_data_code using Deno.jupyter.broadcast("display_data", ...) and Deno.jupyter.broadcast("update_display_data", ...) with display_id

evcxr (Rust)

  • Added display_data_code using evcxr's native protocol:
    println!("EVCXR_BEGIN_CONTENT text/html\n<b>bold</b>\nEVCXR_END_CONTENT")
  • Note: evcxr does not support update_display_data (no display_id support in their protocol)

Python (ipykernel)

  • Added update_display_data_code using IPython.display.update_display() with display_id

New Test

  • Added update_display_data test (Tier 3) that verifies:
    1. Kernel sends initial display_data with a display_id
    2. Kernel sends update_display_data to modify the existing display

Research Notes

  • evcxr: Uses EVCXR_BEGIN_CONTENT/EVCXR_END_CONTENT markers for rich output. Can use evcxr_runtime::mime_type() helper if dependency is added, but raw println! works without deps.
  • Deno: Deno.jupyter.html is a tagged template literal, not a function. For dynamic display updates, use Deno.jupyter.broadcast().

Test plan

  • Deno display_data test passes (was incorrectly skipped before)
  • evcxr display_data test passes (was incorrectly skipped before)
  • Python update_display_data test passes
  • Deno update_display_data test passes

Deno.jupyter.html is a tagged template literal, not a function.
Using function call syntax caused display_data test to fail.
Uses Deno.jupyter.broadcast API for TypeScript and IPython.display
update_display for Python. Tests that kernels can send initial
display_data with display_id, then send update_display_data to modify it.
evcxr uses println!("EVCXR_BEGIN_CONTENT mime/type\n...\nEVCXR_END_CONTENT")
for rich output. Also fixed R and Julia comments to use # syntax.
@github-actions

Copy link
Copy Markdown

Kernel Conformance Matrix

Kernel Tier 1 Tier 2 Tier 3 Tier 4 Total
deno 8/9 6/7 1/2 3/5 18/23
evcxr 9/9 3/7 1/2 3/5 16/23
ipykernel 9/9 7/7 2/2 5/5 23/23

deno (Deno kernel) - 3 failures, 2 skipped

Language: typescript | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
interrupt_request interrupt_request unknown Timeout waiting for control reply
shutdown_reply shutdown_request unknown Timeout waiting for control reply

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel
evcxr (evcxr_jupyter) - 5 failures, 2 skipped

Language: Rust | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
inspect_request inspect_request unknown Timeout waiting for shell reply
history_request history_request unknown Timeout waiting for shell reply
comm_info_request comm_info_request unknown Timeout waiting for shell reply
interrupt_request interrupt_request unknown Protocol error: Error deserializing content for msg_type interrupt_reply: missing field status

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel

Test Results by Message Type

Test Message Type deno evcxr ipykernel
comm_info_request comm_info_request
comms_lifecycle comm_open
complete_request complete_request
display_data display_data ⏭️ ⏭️
error_handling execute_request
execute_input_broadcast execute_input
execute_reply_ok execute_request
execute_result execute_result
execute_stdout execute_request
execution_count_increments execute_request
heartbeat_responds heartbeat
history_request history_request
inspect_request inspect_request
interrupt_request interrupt_request
is_complete_complete is_complete_request
is_complete_incomplete is_complete_request ⚠️ ⚠️
kernel_info_has_language_info kernel_info_request
kernel_info_has_protocol_version kernel_info_request
kernel_info_reply_valid kernel_info_request
parent_header_correlation parent_header
shutdown_reply shutdown_request
status_busy_idle_lifecycle status
stdin_input_request input_request ⏭️ ⏭️

@github-actions

Copy link
Copy Markdown

Kernel Conformance Matrix

Kernel Tier 1 Tier 2 Tier 3 Tier 4 Total
deno 8/9 6/7 2/3 3/5 19/24
evcxr 9/9 3/7 1/3 3/5 16/24
ipykernel 9/9 7/7 3/3 5/5 24/24

deno (Deno kernel) - 3 failures, 2 skipped

Language: typescript | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
interrupt_request interrupt_request unknown Timeout waiting for control reply
shutdown_reply shutdown_request unknown Timeout waiting for control reply

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel
evcxr (evcxr_jupyter) - 5 failures, 3 skipped

Language: Rust | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
inspect_request inspect_request unknown Timeout waiting for shell reply
history_request history_request unknown Timeout waiting for shell reply
comm_info_request comm_info_request unknown Timeout waiting for shell reply
interrupt_request interrupt_request unknown Protocol error: Error deserializing content for msg_type interrupt_reply: missing field status

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • update_display_data: Kernel can update existing displays via update_display_data
  • stdin_input_request: Kernel can request input from frontend via stdin channel

Test Results by Message Type

Test Message Type deno evcxr ipykernel
comm_info_request comm_info_request
comms_lifecycle comm_open
complete_request complete_request
display_data display_data ⏭️ ⏭️
error_handling execute_request
execute_input_broadcast execute_input
execute_reply_ok execute_request
execute_result execute_result
execute_stdout execute_request
execution_count_increments execute_request
heartbeat_responds heartbeat
history_request history_request
inspect_request inspect_request
interrupt_request interrupt_request
is_complete_complete is_complete_request
is_complete_incomplete is_complete_request ⚠️ ⚠️
kernel_info_has_language_info kernel_info_request
kernel_info_has_protocol_version kernel_info_request
kernel_info_reply_valid kernel_info_request
parent_header_correlation parent_header
shutdown_reply shutdown_request
status_busy_idle_lifecycle status
stdin_input_request input_request ⏭️ ⏭️
update_display_data update_display_data ⏭️

1 similar comment
@github-actions

Copy link
Copy Markdown

Kernel Conformance Matrix

Kernel Tier 1 Tier 2 Tier 3 Tier 4 Total
deno 8/9 6/7 2/3 3/5 19/24
evcxr 9/9 3/7 1/3 3/5 16/24
ipykernel 9/9 7/7 3/3 5/5 24/24

deno (Deno kernel) - 3 failures, 2 skipped

Language: typescript | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
interrupt_request interrupt_request unknown Timeout waiting for control reply
shutdown_reply shutdown_request unknown Timeout waiting for control reply

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel
evcxr (evcxr_jupyter) - 5 failures, 3 skipped

Language: Rust | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
inspect_request inspect_request unknown Timeout waiting for shell reply
history_request history_request unknown Timeout waiting for shell reply
comm_info_request comm_info_request unknown Timeout waiting for shell reply
interrupt_request interrupt_request unknown Protocol error: Error deserializing content for msg_type interrupt_reply: missing field status

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • update_display_data: Kernel can update existing displays via update_display_data
  • stdin_input_request: Kernel can request input from frontend via stdin channel

Test Results by Message Type

Test Message Type deno evcxr ipykernel
comm_info_request comm_info_request
comms_lifecycle comm_open
complete_request complete_request
display_data display_data ⏭️ ⏭️
error_handling execute_request
execute_input_broadcast execute_input
execute_reply_ok execute_request
execute_result execute_result
execute_stdout execute_request
execution_count_increments execute_request
heartbeat_responds heartbeat
history_request history_request
inspect_request inspect_request
interrupt_request interrupt_request
is_complete_complete is_complete_request
is_complete_incomplete is_complete_request ⚠️ ⚠️
kernel_info_has_language_info kernel_info_request
kernel_info_has_protocol_version kernel_info_request
kernel_info_reply_valid kernel_info_request
parent_header_correlation parent_header
shutdown_reply shutdown_request
status_busy_idle_lifecycle status
stdin_input_request input_request ⏭️ ⏭️
update_display_data update_display_data ⏭️

@rgbkrk
rgbkrk merged commit 87ccfaa into main Feb 25, 2026
4 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.

1 participant