Skip to main content

Documentation Format Unit Testing

Internal test page

This page exists only to exercise documentation formatting, styling, and Docusaurus behavior. It is intentionally not linked from the site navigation and should not be treated as user documentation.

This page is a visual regression sandbox for the docs site. If a theme, Markdown parser, code highlighter, or custom CSS change breaks something, this page should make it obvious.


Typography​

Normal paragraph text should be comfortable to read at desktop and mobile widths.

Bold text should be obvious without becoming visually heavy.

Italic text should remain readable.

Bold italic text should work.

Strikethrough text should render correctly.

Inline code such as org.yurie.kanvas, kanvasDoctor, and strictRenderer = true should remain visually distinct without breaking line height.

A deliberately long inline token for overflow testing:

dev.yurie.display.agent.ComposeCaptureHooks.frameStartLayerRecording(java.lang.Object,long,java.lang.Object)

Heading level 3​

Heading level 4​

Heading level 5​
Heading level 6​

Internal link: Kanvas

Technical link: Kanvas Technical Internals

External link: Kanvas on GitHub

Inline source link: KanvasPlugin.kt


Admonitions​

Note

A low-priority note used for supplemental information.

Information

An informational card for architecture context, implementation details, or useful background.

Tip

A recommendation that should help the reader complete a task faster or avoid unnecessary work.

Warning

A warning for compatibility concerns, pre-release behavior, or operations that may fail unexpectedly.

Danger

A high-severity callout for behavior that can break builds, crash the runtime, corrupt native state, or produce misleading renderer results.

Admonition with code​

Example configuration

Use a fenced block inside a callout:

build.gradle.kts
kanvas {
target = ":desktop"
backend = "auto"
strictRenderer = false
}

Inline code such as backend = "auto" should also remain readable inside the card.

Admonition with a list​

Multiple conditions

Check all of the following:

  • Java agent loaded
  • frame transformer installed
  • canvas transformer installed
  • native library available
  • GPU backend created
  • presentation succeeded

Code blocks​

Code block title syntax

Use the normal Docusaurus title="..." metadata on a fenced code block. The site theme automatically derives the language badge from the fence language.

\`\`\`kotlin title="build.gradle.kts"
plugins {
id("org.yurie.kanvas")
}
\`\`\`

Kotlin​

build.gradle.kts
plugins {
id("org.yurie.kanvas") version "0.1.0"
}

kanvas {
target = ":desktop"
backend = "auto"
strictRenderer = true
capture = true
takeover = true
}

Java​

RendererProbe.java
public final class RendererProbe {
public static boolean ready(boolean frame, boolean canvas) {
return frame && canvas;
}
}

C​

jni_display_bridge.c
kd_status present_frame(
kd_jvm_renderer *renderer,
const kd_draw_command *commands,
uint32_t count
) {
if (!renderer || !commands || count == 0) {
return KD_INVALID_ARGUMENT;
}

return kd_jvm_present_backend(renderer, commands, count);
}

Bash​

Terminal
./gradlew kanvasDoctor
./gradlew kanvasCompatibility
./gradlew kanvasRun

PowerShell​

PowerShell
./gradlew.bat kanvasDoctor
./gradlew.bat kanvasRun

Text / terminal output​

renderer-audit.log
[Kanvas] takeover armed
[Kanvas] TRANSFORMED_SKIKO_FRAME org.jetbrains.skiko.SkiaLayer mode=picture-replay
[Kanvas] TAKEOVER_PRESENTED commands=42

Long line / horizontal overflow​

overflow-test.txt
THIS_IS_A_PURPOSELY_LONG_SINGLE_LINE_TO_TEST_HORIZONTAL_CODE_BLOCK_SCROLLING_AND_ENSURE_THE_DOCUMENT_LAYOUT_DOES_NOT_EXPAND_PAST_THE_VIEWPORT_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789

Lists​

Unordered​

  • Renderer
  • Runtime
    • Java agent
    • JNI bridge
      • command arrays
      • texture resources
  • Native backend
    • Metal
    • Vulkan
    • OpenGL
    • Direct3D 9

Ordered​

  1. Apply plugin.
  2. Resolve target task.
  3. Provision runtime.
  4. Attach Java agent.
  5. Install transforms.
  6. Arm takeover.
  7. Present frame.

Task list​

  • Plugin loaded
  • Runtime built
  • Agent attached
  • Every renderer operation implemented
  • Every GPU/driver combination verified

Table​

LayerResponsibilityFailure exampleSeverity
GradleBuild/run integrationTarget task not foundError
Java agentBytecode interceptionFrame transform missingError
CaptureFrame loweringUnsupported paint behaviorWarning/Error
JNINative protocolInvalid array shapeError
BackendGPU presentationSwapchain out of dateRecoverable
PackagingRuntime embeddingNative library missingError

Wide table​

BackendmacOSWindowsLinuxGPUReference-onlyNotes
MetalYesNoNoYesNoPrimary Apple backend
VulkanLimited/stub depending on hostYesYesYesNoExplicit loader/runtime requirements
OpenGLNo current primary pathYesNo current primary pathYesNoWindows alternative
Direct3D 9NoYesNoYesNoLegacy Windows backend
GDINoYesNoNoYesSoftware/reference path

Blockquotes​

Renderer takeover is not proven merely because the application window is visible.

Nested quote:

Outer diagnostic statement.

Inner diagnostic statement used to test nested quote styling.


Horizontal rule​

Text above.


Text below.


Mixed formatting​

The kanvasCompatibility task is informational, while kanvasDoctor may report a blocking ERROR.

A released plugin may resolve a matching vX.Y.Z runtime source tag so that the Gradle plugin, Java agent, JNI protocol, and native runtime remain on the same release line.

Source-grounded example

Implementation reference: effectiveSourceRef.


Long prose wrapping​

Kanvas crosses multiple compatibility and ownership boundaries at runtime, including Gradle task resolution, JVM launch configuration, Java instrumentation, Skiko implementation details, Skia canvas interception, JNI data validation, native resource lifetime management, platform window attachment, graphics backend creation, swapchain behavior, texture upload semantics, frame presentation, and packaging. This intentionally long paragraph exists to verify line length, wrapping, readable measure, right-side table-of-contents spacing, and mobile behavior when technical prose contains many long compound terms.


Escaping and symbols​

Characters:

< > & " ' / \\ : ; , . ? ! @ # $ % ^ * ( ) [ ] { } + = _ -

Common renderer notation:

N × 4
width × height
Gradle → Agent → JNI → Native → GPU
Metal / Vulkan / OpenGL / D3D9

Definition-style formatting​

Frame boundary
The point at which Kanvas considers the frame sufficiently complete for capture and presentation.

Takeover
Kanvas owning the final presentation path rather than merely observing renderer calls.

Capture
The process of intercepting and lowering rendering operations into Kanvas state and commands.

Strict renderer mode
A verification mode that makes unsupported or ambiguous renderer ownership failures visible.


Intentional visual checklist​

When reviewing this page, verify:

  • admonitions have correct border colors and spacing
  • code blocks scroll horizontally instead of widening the page
  • inline code does not distort line height
  • nested lists remain readable
  • tables scroll on narrow screens
  • headings have consistent spacing
  • links are visibly distinct
  • dark mode preserves contrast
  • sidebar and right-side page TOC do not overlap content
  • long paragraphs maintain a readable line width
  • mobile layout does not overflow
  • external source links remain usable