Skip to content

feat(docs): share copyable code examples - #190

Merged
drewstone merged 2 commits into
mainfrom
fix/docs-code-display-20261001
Oct 2, 2026
Merged

drewstone merged 2 commits into
mainfrom
fix/docs-code-display-20261001

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Summary of changes

Jobs source excerpts and Sandbox examples now share line numbers, syntax highlighting, and a Copy button. Copy returns the raw code, preserves indentation, and reports clipboard failures. The Jobs excerpts link to the exact source revision and correct line ranges.

All 17 existing Sandbox snippets remain byte-identical, including 12 standalone TypeScript examples. Source headers use filenames or language names.

Validation: TypeScript, Next lint, harness-copy guard, formatting, and the full 289-page production build passed. Chromium checked Jobs, Quickstart, and SDK Reference at 1440px and 390px in light and dark mode. All 19 shared blocks copied without line numbers; denied clipboard access showed an error; every checked page stayed within the viewport.

Before captures: https://docs.tangle.tools, main c6d445d8. After captures: GTR production build served on the owned local preview port. Live deployment verification follows merge.

Before After
Jobs desktop before Jobs desktop after
Jobs phone dark before Jobs phone dark after

Copy interaction video, 4× playback: Jobs → Quickstart → SDK Reference. The uncut recording and complete state receipts remain in /tmp/docs-code-display-evidence-20261001/ on GTR.

tangletools
tangletools previously approved these changes Oct 2, 2026

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Auto-approved PR — fdbe9b55

Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-02T02:02:06Z

@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tangle-docs ready!

Name Link
🔨 Latest commit 3f2debf
🔍 Latest deploy log https://app.netlify.com/projects/tangle-docs/deploys/6abf11ae8cd32500085ac884
😎 Deploy Preview https://deploy-preview-190--tangle-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Auto-approved PR — 3f2debf2

Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-02T02:07:05Z

@drewstone
drewstone merged commit 315adbb into main Oct 2, 2026
11 checks passed
@drewstone

Copy link
Copy Markdown
Contributor Author

Production verified after merge 315adbbd72ffb24f0f39a5fc8212ddf40a9aaf4a.

On docs.tangle.tools, Jobs, Sandbox Quickstart and SDK Reference passed desktop (1440px) and phone (390px), light and dark. The actual clipboard round trip matched the first code block on all 12 page states. All 19 displayed blocks also matched their source with an instrumented clipboard sink; the 17 Sandbox examples are byte-identical to their original complete snippets. Copy errors remained visible. Source links retain exact GitHub line ranges. No JavaScript errors or page overflow appeared.

The source module retains readable examples without escaping newlines into URLs in the documentation link scanner. Build, link, lint, format, copy and endpoint checks passed on the final head.

Before/after images and the interaction recording remain in the PR's evidence links. Screenshots were opened and inspected. The recording was captured, but viewer playback could not be checked because browser URL policy rejected the local media URL.

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