Skip to content

initial flashtrace public + documentation website - #1

Merged
MentorFilou merged 22 commits into
mainfrom
initial
Jul 12, 2026
Merged

initial flashtrace public + documentation website#1
MentorFilou merged 22 commits into
mainfrom
initial

Conversation

@MentorFilou

Copy link
Copy Markdown
Member

Summary

Builds the complete flashtrace website from scratch: a landing page plus documentation rendered from the tool repository's docs/, served by GitHub Pages at the org root https://flashtrace.github.io/. Follows flashtrace's ethos — no runtime framework, plain static HTML/CSS/JS, and exactly one build-time dependency (marked, zero transitive deps).

What's inside

  • build.mjs — the static site generator (plain Node ESM). Locates the tool repo's docs (FLASHTRACE_DOCS./flashtrace/docs CI checkout → ../flashtrace/docs sibling), derives the sidebar order from docs/index.md (single source of truth), renders every page through marked with slugged heading anchors and a per-page TOC, rewrites both link forms (docs/<name>.md and bare <name>.md, anchors preserved) to clean URLs, and points other repo-relative links (LICENSE, CONTRIBUTING.md) at github.com. A tiny build-time highlighter colors flashtrace's own tokens (req:...#1, [impl:...], [>>...], -->) — no highlight.js.
  • Landing page (src/landing.mjs) — hero with a hand-built CSS IDE mock (spec pane + code pane joined by a trace connector, terminal below), how-it-works steps, feature grid, curated interactive examples, install snippets with copy buttons, footer showing the docs version.
  • Faithful outputs — the hero terminal and all example outputs (src/examples.mjs) were captured from real flashtrace v0.7.0 runs (clean deep-covered trace, an uncovered/unwanted defect with revision-mismatch hint, and a --> forwarding chain), then colored to match src/report.mjs semantics.
  • Docs shell — top bar, left sidebar (current page highlighted), right-rail "On this page" TOC with scrollspy; hamburger + slide-in sidebar on mobile; light/dark theme via prefers-color-scheme plus a persisted toggle; semantic landmarks, skip-link, prefers-reduced-motion respected.
  • deploy.yml — builds and deploys via actions/deploy-pages on push to main, workflow_dispatch, and repository_dispatch type flashtrace-release (fired by the tool repo after every release). Docs are always checked out at the release tag from client_payload.tag, falling back to the latest release. All actions pinned to commit SHAs, matching the tool repo's convention.
  • serve.mjs — stdlib-only dev server with watch + rebuild (pnpm dev).

Verification done locally

  • pnpm build renders 11 pages from flashtrace v0.7.0 docs.
  • Automated check: every internal href/src in dist/ resolves to an emitted file; both .md link forms rewritten (zero .md hrefs remain except github.com ones); revisions/#wildcard-revisions anchor exists and is targeted correctly; no file:///localhost URLs.
  • Headless-browser screenshots verified: landing + docs in dark and light themes, and a 390 px viewport (panes stack, no horizontal page scroll, code blocks scroll inside their own containers).

⚠️ Before this can go live (repo owner action)

Settings → Pages → Build and deployment → Source → "GitHub Actions". The repo currently serves via the legacy "Deploy from a branch" path; actions/deploy-pages requires the source to be "GitHub Actions" — deploys will fail until this is flipped.

After the first green deploy, the tool-repo companion PR (flashtrace/flashtrace#32) can be merged so future releases redeploy the site automatically.

🤖 Generated with Claude Code

Static site generated by a plain Node script (build.mjs) with marked as
the only dependency, in line with flashtrace's zero-dependency ethos:

- Landing page with a CSS-built IDE hero mock, how-it-works steps,
  feature grid, curated examples captured from real flashtrace runs,
  and install snippets.
- Docs rendered from the tool repo's docs/ at its latest release tag;
  nav order derived from docs/index.md, inter-doc links rewritten to
  clean URLs, right-rail TOC with scrollspy, light/dark theme.
- deploy.yml publishes to GitHub Pages on push, manual dispatch, and
  the repository_dispatch (flashtrace-release) fired by the tool repo.
- serve.mjs: stdlib-only dev server with watch + rebuild.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MentorFilou MentorFilou changed the title feat: build the flashtrace marketing + documentation website feat: build the flashtrace presence + documentation website Jul 11, 2026
@MentorFilou

Copy link
Copy Markdown
Member Author

⚠️ Before this can go live (repo owner action)

Settings → Pages → Build and deployment → Source → "GitHub Actions". The repo currently serves via the legacy "Deploy from a branch" path; actions/deploy-pages requires the source to be "GitHub Actions" — deploys will fail until this is flipped.

Configured to "GitHub Actions".

@MentorFilou MentorFilou self-assigned this Jul 12, 2026
MentorFilou and others added 3 commits July 12, 2026 11:13
The blob URL opened GitHub's HTML viewer instead of the file, and was
the only tool-repo link hardcoded to main while the rest of the site
pins to the release ref.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The terminal is a docked panel inside the IDE mock, not its own
window, so it should not carry close/minimize/zoom buttons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MentorFilou MentorFilou changed the title feat: build the flashtrace presence + documentation website initial flashtrace public + documentation website Jul 12, 2026
MentorFilou and others added 18 commits July 12, 2026 13:35
The dashed accent line between the spec.md and login.ts panes read as
noise rather than a link - the shared highlight on req:auth/login#1 and
[impl:auth/login#1] already conveys the trace. The panes now sit flush
with a gray divider, which also removes the misaligned border seam the
connector column created next to the tabs.

Also highlight the Needs reference impl:auth/login#1 in the spec pane
the same way as the other traced IDs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The static [data-copy] buttons called navigator.clipboard.writeText
unguarded, throwing on click in non-secure contexts. Guard once in
wireCopy and hide the control, covering both button paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirrors deploy.yml's build job (release-tag resolution, pinned action
versions, Pages artifact packaging) so a green PR check means the
subsequent deploy build runs identically on the same inputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The status-line pass already wraps a leading ✔; the global pass then
nested a second identical span around it. Mirror the lookbehind the
✘ pass already uses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An empty tag made the tool-repo checkout silently fall back to its
default branch - the opposite of building from released docs. The
resolve step now errors out instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pageShell takes the page's site-absolute path and renders
<link rel="canonical"> against https://flashtrace.github.io, so
trailing-slash and index.html variants resolve to one URL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plain <url><loc> entries for the landing page and every docs page,
using the same canonical URLs pageShell emits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Inline ${{ github.event.client_payload.tag }} inside a run: block is
template-substituted before the shell parses it, so a crafted tag could
execute as script. Exposing it as an env var makes it plain data.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ci.yml promises to mirror the deploy build job, but missed the guard
added in 1779196: with an empty resolved tag the flashtrace checkout
silently falls back to the default branch instead of a release, making
a green CI check meaningless for the deploy. Fail loudly instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The reveal-on-hover treatment left the button at opacity 0 with no way
to discover it on devices without a hover state. Gate it behind
@media (hover: hover) so touch users always see it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Without FLASHTRACE_REF and without a version in the tool clone's
package.json, the empty string rendered an empty header badge (a link
with no accessible name) and 'Docs built from flashtrace .' in the
footer. Label that case 'dev'; repo links keep their separate 'main'
fallback since 'dev' is not a real ref.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9aaf8d9 made the display version always truthy ('dev' fallback), which
silently defeated the 'version || main' ref fallback in the landing
page's raw-script URL - in the no-ref case the download link pointed at
the nonexistent 'dev' ref. Thread gitRef (release tag or 'main')
through renderLanding to installSection, keeping the display label and
the git ref as the separate concepts they already are in build.mjs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a fully static /impressum/ page rendered through the shared page
shell, a footer link so it is reachable from every page (required under
§5 DDG), and its sitemap entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MentorFilou
MentorFilou merged commit c81b09d into main Jul 12, 2026
1 check passed
@MentorFilou
MentorFilou deleted the initial branch July 12, 2026 16:18
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