-
Notifications
You must be signed in to change notification settings - Fork 0
Modernize Graph and Mind Map Workbench (Phase 6) #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
d-oit
merged 3 commits into
main
from
feat/graph-mindmap-modernization-9989539020139947263
May 2, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
3ab7a26
feat(graph): phase 6 - graph and mind map workbench modernization
google-labs-jules[bot] 22dbe29
Merge branch 'main' into feat/graph-mindmap-modernization-99895390201…
d-oit dfdebf0
feat(graph): phase 6 - modernization of graph and mind map
google-labs-jules[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| import React, { useMemo } from 'react'; | ||
| import { X, ExternalLink, Info, ShieldCheck } from 'lucide-react'; | ||
| import { Entity, Claim, Link } from '../../lib/validation'; | ||
|
|
||
| interface GraphInspectorProps { | ||
| entity: Entity; | ||
| claims: Claim[]; | ||
| links: Link[]; | ||
| entities: Entity[]; | ||
| onClose: () => void; | ||
| } | ||
|
|
||
| const GraphInspector: React.FC<GraphInspectorProps> = ({ | ||
| entity, | ||
| claims, | ||
| links, | ||
| entities, | ||
| onClose | ||
| }) => { | ||
| const outgoingLinks = useMemo(() => | ||
| links.filter(l => l.source_id === entity.id), | ||
| [links, entity.id] | ||
| ); | ||
|
|
||
| const incomingLinks = useMemo(() => | ||
| links.filter(l => l.target_id === entity.id), | ||
| [links, entity.id] | ||
| ); | ||
|
|
||
| const getEntityName = (id: string) => | ||
| entities.find(e => e.id === id)?.name || 'Unknown Entity'; | ||
|
|
||
| return ( | ||
| <aside className="inspector-panel" aria-label={`Details for ${entity.name}`}> | ||
| <div className="inspector-header"> | ||
| <h3>{entity.name}</h3> | ||
| <button className="close-button" onClick={onClose} aria-label="Close inspector"> | ||
| <X size={18} /> | ||
| </button> | ||
| </div> | ||
|
|
||
| <div className="inspector-content"> | ||
| <div className="inspector-section"> | ||
| <div className="result-type">{entity.type}</div> | ||
| {entity.description && ( | ||
| <p className="result-description">{entity.description}</p> | ||
| )} | ||
| </div> | ||
|
|
||
| {claims.length > 0 && ( | ||
| <div className="inspector-section"> | ||
| <h4><ShieldCheck size={14} /> Claims</h4> | ||
| <ul className="results-list"> | ||
| {claims.map(claim => ( | ||
| <li key={claim.id} className="search-result-item"> | ||
| <div className="msg-text" style={{ fontSize: '13px' }}>{claim.statement}</div> | ||
| {claim.evidence && ( | ||
| <div className="result-meta" style={{ marginTop: '4px' }}> | ||
| <span className="provenance-tag">Evidence: {claim.evidence}</span> | ||
| </div> | ||
| )} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| )} | ||
|
|
||
| {(outgoingLinks.length > 0 || incomingLinks.length > 0) && ( | ||
| <div className="inspector-section"> | ||
| <h4><ExternalLink size={14} /> Relationships</h4> | ||
| <ul className="results-list"> | ||
| {outgoingLinks.map(link => ( | ||
| <li key={link.id} className="search-result-item"> | ||
| <div style={{ fontSize: '13px' }}> | ||
| <strong>{link.relation}</strong> → {getEntityName(link.target_id)} | ||
| </div> | ||
| </li> | ||
| ))} | ||
| {incomingLinks.map(link => ( | ||
| <li key={link.id} className="search-result-item"> | ||
| <div style={{ fontSize: '13px' }}> | ||
| {getEntityName(link.source_id)} → <strong>{link.relation}</strong> | ||
| </div> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| )} | ||
|
|
||
| {claims.length === 0 && outgoingLinks.length === 0 && incomingLinks.length === 0 && ( | ||
| <div className="no-results-state" style={{ padding: 'var(--space-4)' }}> | ||
| <Info size={24} className="no-results-icon" /> | ||
| <p>No claims or links found for this entity.</p> | ||
| </div> | ||
| )} | ||
| </div> | ||
| </aside> | ||
| ); | ||
| }; | ||
|
|
||
| export default GraphInspector; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A function with high cyclomatic complexity can be hard to understand and
maintain. Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A higher cyclomatic complexity indicates
that the function has more decision points and is more complex.