Skip to content

Add document system and improve graph visualization#2

Closed
avrabe wants to merge 7 commits intomainfrom
feat/documents-graph-ui
Closed

Add document system and improve graph visualization#2
avrabe wants to merge 7 commits intomainfrom
feat/documents-graph-ui

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 8, 2026

Summary

  • Document system: Markdown files with YAML frontmatter and [[ID]] wiki-link artifact references. Includes parser, validation, section hierarchy extraction, and dashboard routes (/documents, /documents/{id}) with rendered body, table of contents, glossary, and referenced artifacts table.
  • Graph improvements: Full-viewport container with zoom controls, clickable nodes, touch support, edge label pills, color legend, focus autocomplete, better node sizing.
  • Example: docs/srs.md — System Requirements Specification referencing all 16 REQ artifacts.

Test plan

  • 75 tests passing (9 new document tests)
  • cargo validate reports 1 document with 16 references, 0 broken
  • clippy clean, fmt clean
  • Manual: verify /documents list, /documents/SRS-001 rendered view
  • Manual: verify graph zoom/pan/click on desktop and touch devices

🤖 Generated with Claude Code

Documents:
- Markdown with YAML frontmatter and [[ID]] wiki-link references
- Document model, parser, reference extraction, section hierarchy
- DocumentStore, validate_documents() for broken ref detection
- /documents and /documents/{id} serve routes with rendered body,
  table of contents, glossary, and referenced artifacts table
- Example SRS document (docs/srs.md) with 16 artifact references
- rivet.yaml `docs:` config field

Graph improvements:
- Full-viewport graph container with zoom controls (+/-/fit)
- Clickable nodes navigating to artifact detail via HTMX
- Touch support (pinch zoom, drag pan)
- Edge labels with background pills for readability
- Color legend showing present artifact types
- Focus autocomplete with datalist
- Wider nodes (200px) and better spacing

75 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 69.65085% with 339 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rivet-core/src/document.rs 50.33% 298 Missing ⚠️
rivet-core/src/results.rs 92.92% 21 Missing ⚠️
rivet-core/src/validate.rs 0.00% 17 Missing ⚠️
rivet-core/src/coverage.rs 98.52% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

avrabe and others added 6 commits March 8, 2026 13:20
- Atkinson Hyperlegible for body text, JetBrains Mono for IDs/code
- CSS custom properties design system (colors, spacing, shadows)
- Dark sidebar (#0f0f13) with active nav state tracking
- HTMX loading bar animation and content swap transitions
- Refined tables (alternating rows, hover), cards (subtle shadows),
  badges (consistent palette), form controls (focus rings, styled selects)
- Stat boxes with hover lift, scrollbar styling, selection color
- Keyboard navigation focus-visible outlines throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lossary

The document body had a duplicate glossary as a markdown table that wasn't
being parsed. Added table rendering (header, separator, body rows) to the
lightweight markdown renderer and replaced the body table with a reference
to the frontmatter glossary panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… polish

- Coverage: rivet-core/src/coverage.rs module with compute_coverage(), CLI
  `rivet coverage` command (table/json output, --fail-under), /coverage
  dashboard route with progress bars and uncovered artifact lists
- Init: `rivet init` command creates rivet.yaml + artifacts/ + docs/ scaffold
  with --name, --schema, --dir options
- Search: Cmd+K command palette with debounced search across artifacts and
  documents, arrow key navigation, highlighted matches, grouped results
- ASPICE example: examples/aspice/ with full V-model braking system
  (STKH->SYSREQ->SWREQ->SWARCH->SWDD->UVER->SWINTVER->SWVER->SYSINTVER->SYSVER)
- UI: Atkinson Hyperlegible font, dark sidebar, loading bar, content
  transitions, refined tables/badges/forms, command palette styling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Stat boxes have colored top borders (blue/green/orange/red/amber/purple)
  matching their semantic meaning, with matching number colors
- Nav sidebar shows artifact count, error badge (red if >0), and doc count
- Nav divider separates primary views from analysis tools
- Artifact detail uses styled primary/secondary action buttons
- Footer shows "Powered by Rivet v{version}" from CARGO_PKG_VERSION
- CSS classes: stat-{color}, nav-badge, nav-badge-error, nav-divider,
  nav-label, btn, btn-primary, btn-secondary, detail-actions, footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace HTML entity icons with clean 16x16 inline SVG icons (Lucide-style
  stroke icons for Overview, Artifacts, Validation, Matrix, Coverage, Graph,
  Documents, Search)
- Per-type colored badges: badge_for_type() computes rgba(r,g,b,.12)
  background from type_color_map() hex colors, applied across all views
- Artifact list client-side search filter with inline SVG search icon
- Overview status distribution with horizontal progress bars showing
  approved/draft/unknown ratios
- Validation summary bar: green gradient for pass, red gradient for fail
- Sidebar active state with left blue accent border
- h2 headings with bottom border for visual separation
- Better heading hierarchy throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…g, project selector

- rivet-core: add results module (TestStatus, TestRun, ResultStore, load_results)
- rivet-core: add results field to ProjectConfig for test run YAML directory
- rivet-core: enhance markdown renderer with code blocks, ordered lists,
  blockquotes, inline code, and markdown links
- rivet-cli: add verification dashboard (/verification) showing req→verifier
  mapping with test steps, method badges, and latest result dots
- rivet-cli: add results dashboard (/results, /results/{run_id}) with run
  history, pass rate stats, and per-artifact result tables
- rivet-cli: add project overview with coverage summary, test results, and
  quick links on the landing page
- rivet-cli: add project selector with sibling discovery (examples/ and peers)
  shown as a dropdown in the context bar
- rivet-cli: add load_project_full() for serve command to load docs + results
- examples/aspice: add test result YAML files (run-001, run-002)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avrabe
Copy link
Copy Markdown
Contributor Author

avrabe commented Mar 8, 2026

Superseded by a new PR from feat/aadl-integration which includes all these changes plus live reload, source viewer, git diff, STPA dashboard, dogfood docs, and test mapping.

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