Repository navigation
fix(ui): fix the UI issue with the knowledge graph rendering - #9
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe graph UI now supports mobile viewport sizing, responsive panels, touch-friendly controls, landscape layouts, and reduced-motion preferences. The source template and generated knowledge graph receive matching CSS updates. ChangesResponsive graph interface
Estimated code review effort: 2 (Simple) | ~15 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Comment |
✅ All automated checks passedThe following checks completed successfully:
Your contribution is ready for review. 🎉 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/build_knowledge_graph.py`:
- Around line 516-530: The landscape responsive CSS in
scripts/build_knowledge_graph.py lines 516-530 allows `#header` and `#info-card` to
overlap on narrow viewports; constrain both panel widths to the available half
viewport, such as using a min(320px, calc(50vw - 20px)) width. Regenerate
docs/index.html lines 339-353 from the updated template so the generated output
contains the same fix.
- Around line 541-548: Update scripts/build_knowledge_graph.py lines 541-548 to
use matchMedia('(prefers-reduced-motion: reduce)') when configuring directional
particles and Graph.cameraPosition, setting both values to 0 when reduced motion
is active; then regenerate docs/index.html lines 364-371 so the generated output
matches the template.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d98a2e63-bc96-40ab-8798-2cb5296aa04f
📒 Files selected for processing (2)
docs/index.htmlscripts/build_knowledge_graph.py
Description
updated the UI for rendering on mobile devices
Type of Change
Topic
Checklist
See CONTRIBUTING.md for the full format.
topic-slug/question-slug.md- no numeric prefix, and the slug matches the title.title, a uniqueid,categorymatching the topic title, adifficultyof Beginner/Intermediate/Advanced, and the required tags.# <title>and matches the frontmatter exactly.scripts/topic_meta.jsonwith anorder,description, andstudy_notes.python3 scripts/generate_indexes.pyandpython3 scripts/build_knowledge_graph.py(indexes and graph HTML are generated - do not hand-edit topic READMEs, graph HTML, or the root TOC).python3 scripts/validate_content.pyand it passed.