# Markdown Reading Room

A static, read-only viewer for Markdown files on your device. Open `index.html`
through an HTTP host, or choose **LIBRARY → Markdown Reading Room** in Webtools.

The hosted Ballad documentation collection was removed at Jim's request on
2026-10-06. No documentation snapshot, catalogue, or refresh script is bundled.

## Reading

- **Open a Markdown file** reads a local file no larger than 2 MB. Its contents
  stay in this tab's memory: no upload, document fetch, autosave, or shareable
  document URL. Reopen the file after a reload or after closing the tab.
- **On this page** and heading links navigate the current file. A heading URL
  cannot supply the local document to another visitor.
- **Source text** shows the original Markdown; **Download .md** saves those exact
  contents as a duplicate. This tool does not edit the original file.
- **Hide sidebar / Show sidebar** remains reachable while scrolling. Portrait or
  narrow viewports start closed; an explicit choice survives orientation changes.
- Theme and sidebar preferences are the only values stored in localStorage.
- Wide tables scroll horizontally rather than breaking words into fragments.

Headings, emphasis, lists, checklists, links, tables, quotes, and fenced code render
locally. TeX math renders through vendored KaTeX as native MathML. Paired,
attribute-free `<sup>…</sup>` spans render as superscript, including Markdown links
inside citations. Other raw HTML stays inert; comments remain in Source text.
Code fences, including Mermaid and XML, remain literal code.

Images are descriptive links, never embedded or fetched. Explicit HTTP(S) and
email links are available when you click them. Relative links become readable
text because the tool has no access to neighbouring files; open those files
manually. Same-document anchors remain usable. The page's Content Security Policy
blocks fetch/upload connections and image requests.

Old `?doc=` links show a removal notice and never request the former snapshot.
A `noindex` meta tag discourages search indexing of the viewer page; it is not an
access control. The local documents are absent from the deployment itself.

## Development

Read [PRIVACY_CHANGE.md](PRIVACY_CHANGE.md) for the current plan and
[_activity.md](_activity.md) for status and the hosting handoff. [PLAN.md](PLAN.md)
is the original historical plan. Jim requires a written plan before development
and continuing notes that another developer can follow.

```sh
node --check Web/markdown/app.js
node --check Web/markdown/renderer.js
npm install --prefix Web/markdown/tools --ignore-scripts
npm test --prefix Web/markdown/tools
python -m http.server 8000 --directory Web
```

The checks use synthetic Markdown and jsdom; they require no Ballad checkout or
copy. Browser renderer dependencies and licences remain under `vendor/`.
No npm installation or build step is needed to run the hosted viewer.

## Deployment boundary

Deleting the snapshot from the new tree removes it from subsequent deployments
once merged and deployed. It does not alter older deployment URLs, private Git
history, or copies already fetched by visitors. Retire/protect older deployments
and verify direct snapshot paths return an unavailable response on every public
alias. Do not roll back to a build that republishes the documentation.

The current activity records the Vercel team-scope access failure; historical
hosting cleanup has not been completed by this implementation.

## Current limits

One local file at a time; no document collection, search, editing, arbitrary URL
fetching, authentication service, or directory access. No full HTML, Mermaid
rendering, syntax highlighting, image/PDF viewer, or automatic reference numbering.
Native MathML layout varies by browser. Automated DOM checks do not establish
visual quality, native downloads, or keyboard/layout behaviour on every device.
