Add Constellation view for visualizing memos as an interactive graph#5725
Add Constellation view for visualizing memos as an interactive graph#5725ksaltnes wants to merge 1 commit intousememos:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39b221c0ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
web/src/pages/Constellation.tsx
Outdated
| useEffect(() => { | ||
| if (!currentUser) return; |
There was a problem hiding this comment.
Handle missing current user before leaving loading state
When /constellation is opened without an authenticated user (e.g., public instances where disallowPublicVisibility is false and the route is entered directly), the effect exits early and never updates loading, so the page stays on the spinner forever instead of showing empty state or redirecting. This is a user-visible dead-end introduced by the new route and should explicitly handle the unauthenticated case.
Useful? React with 👍 / 👎.
Applied security fixes to the latest upstream (usememos/memos):
- Remove hardcoded JWT secret ("usememos") in demo mode; always use instance secret key
- Enforce DisallowPasswordAuth for all roles including admins (was only blocking regular users)
- Add minimum password length validation (8 chars) on CreateUser and UpdateUser password change
- Restrict CORS to same-origin in production (was allowing all origins on both gateway and connect)
- Add HTTP client timeout (10s) to OAuth2 identity provider
- Remove PII logging of OAuth2 user info claims
https://claude.ai/code/session_018iYDVMmBxJLWBvqugc6tNe
39b221c to
d88a116
Compare
Summary
This PR introduces a new "Constellation" view that visualizes memos as an interactive force-directed graph, where each memo is represented as a glowing star and connections between memos are shown as constellation lines. This provides a novel way to explore and understand relationships between memos.
Key Changes
New Components
ConstellationView: Main component that renders the force-directed graph using react-force-graph-2d
ConstellationControls: Control panel for the visualization
Constellation page: Full-screen view for the constellation visualization with memo loading
Utilities
buildConstellationGraph(): Constructs nodes and links from memos with tag-based filteringcomputeStarSize(): Calculates node size based on content length, reactions, and pinned statuscomputeStarBrightness(): Determines brightness based on memo recency (exponential decay)tagToColor(): Deterministic color assignment from tag names using hash functiongetUniqueTags(): Extracts and counts unique tags across memoshexToRgb(): Color conversion utilityStyling
Integration
Security & Quality Improvements
Implementation Details
https://claude.ai/code/session_018iYDVMmBxJLWBvqugc6tNe