---
id: 6fdfd93f-2635-4051-92d1-b567432b9f3d
title: 'Code tab: index, files/raw, clone chain, snapshots'
state: closed
labels:
- kind:build
assignees: []
milestone: m1-code-tab
created: 2026-09-10T03:52:24.205381157Z
updated: 2026-09-10T04:09:32.479069167Z
---
Context: First visible milestone. Depends on #2 scaffold + #3 gitx (+ R1 markdown for README).
Tasks:
- `index.html`: header (name, description, clone cmd w/ resolution flag>origin>none, branch+short sha, f0rge counts stub `0` until m3, CI verdict stub), file tree, README rendered to HTML. README chain (f0rge convention, READMEs live in wiki): root README.md>readme.md>README, else .forge/wiki/README.md>.forge/wiki/readme.md, else none.
- `/files/<path>.html`: dir listing + parent link; file view escaped `<pre>` + line numbers + raw link; markdown files rendered; binary/>256KB placeholder + download.
- `/raw/<path>` byte-identical copies; `repo.bundle` + `repo.tar.gz` linked with sizes.
- Counts (issues/prs) read as `0` with TODO marker wired to m3 readers (no dup logic later).
Success rubric (dod §Site code-tab lines):
- [ ] Dogfood build of this repo renders; `file://` + `python -m http.server` both fine, JS off.
- [ ] `<script>` in a fixture source file shows as text, not executed.
- [ ] `diff <(git show) <(raw copy)` clean on 10 sampled files; >256KB file shows placeholder.
- [ ] Clone chain verified: flag URL shown when passed; bundle clones; tarball extracts.
Swarm: Owl. Branch `m1/code-tab`. Supervisor spot-checks escaping.


Security (from R1 spike docs/deps-decision.md): pulldown-cmark passes raw HTML through — map Html/InlineHtml events to escaped output. Diffs/logs never go through markdown (escaped <pre> only).
