feat(wiki-viewer): single-file HTML viewer for any wiki#55
Conversation
Inspired by Thariq Shihipar's "Unreasonable Effectiveness of HTML" (https://x.com/trq212/status/2034017024445244382): markdown is limiting once outputs cross a hundred lines, so render the wiki as a self-contained HTML artifact instead. skills/wiki-viewer/scripts/render.js: - Reads ~/.pro-workflow/data.db for the target slug. - Pulls pages, sources (db + sources.md table parse), seed queue, wiki-scoped learnings, and embedding count. - Emits a single .html file with no CDN refs, no external fonts, no <script src=>. Uploadable to S3 as-is. - Sidebar = page list grouped by type with a chip filter and a text filter that runs against title+summary+content tokens. - Main pane = page detail rendered from a small inline markdown parser (headings, lists, code blocks, tables, blockquotes, footnote citations [^src-id]). - Citation links resolve to source rows in the Sources pane and flash on jump. - Seeds pane lists the queue grouped by status; pending rows have a "Copy as command" button (Thariq's playground / two-way pattern) that yields the exact research-loop seed command. - Link graph pane is a precomputed circular-layout SVG of cross-page citations; click a node to render that page. - Theme: dark by default, --theme light supported. - XSS guards: every db-sourced string runs through escapeHtml; inline JSON has </script and <!-- escaped before serialization. commands/wiki.md: - /wiki view <slug> [--out path] [--theme dark|light]. README.md, docs/infographic.html: - 60-second tour gains a "Browse the wiki visually" step. - v3.3 skill table + section 10 list + components grid show 34 skills (was 33). - Skill rows for wiki-viewer added in both surfaces.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request introduces the wiki-viewer skill, a new feature that generates a single self-contained HTML viewer for wiki data. The implementation includes CLI command routing, markdown-to-HTML rendering, interactive client-side filtering across multiple panels (Overview, Pages, Sources, Seeds, Link Graph, Learnings), and a link graph visualization. Documentation and version counts are updated to reflect the new skill. ChangesWiki Viewer Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds a sixth knowledge-plane skill:
wiki-viewer. Renders any pro-workflow wiki as a self-contained HTML artifact — pages, sources, seed queue, link graph, in-browser search, "copy as seed" CTAs — in one file with no CDN refs and no external dependencies.Why
Thariq Shihipar's "Unreasonable Effectiveness of HTML" argues that markdown stops scaling once outputs grow past ~100 lines. Auto-research wikis hit that wall fast — after a 5-page run with 30 cited claims, navigating raw
wiki/markdown is painful. HTML gives information density, visual clarity, and shareability.Concrete value:
What changed
skills/wiki-viewer/(new)SKILL.md— when to use, layout, design principles, limits.scripts/render.js— single-pass renderer. Reads~/.pro-workflow/data.db, emits<wiki-root>/derived/viewer.html.commands/wiki.md/wiki view <slug> [--out path] [--theme dark|light].README.md+docs/infographic.htmlWhat's in the rendered HTML
sources.mdrows)learnings_wikirowsSelf-contained: inline CSS, inline JSON, inline SVG, inline JS only. No CDN, no
<script src=>, no external fonts.Security
escapeHtml.<\/scriptand<\!--escapes to defeat tag-break attacks via wiki content.derived/folder.Test plan
--theme lightworks.<script>open/close pairs balance after JSON injection.@media printcollapses aside, content prints clean.Out of scope (follow-ups)
--include-councilto bundle linked council transcripts inline.--include-surveyto bundle generated surveys.contestedclaims.--against <prev.html>to highlight new claims.Summary by CodeRabbit
/wiki viewcommand generates interactive HTML viewer with customizable theme and output options