-
Notifications
You must be signed in to change notification settings - Fork 5
feat: SoA tree view channel plugin #555
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
Open
data-bot-coasys
wants to merge
6
commits into
dev
Choose a base branch
from
feature/soa-tree-view
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+651
β1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ed37d16
feat: add SoA tree view channel plugin
data-bot-coasys 5adb3a1
fix: address CodeRabbit review comments on SoA tree view
data-bot-coasys 1c0bb64
feat: Register SoA Tree View plugin and address code review
data-bot-coasys 78626a6
fix(soa-tree-view): use public export for AgentClient import
data-bot-coasys e6af3e1
Add SoA tree view to offline flux apps
lucksus c55b086
fix: remove unused agent prop from SoA tree view App component
data-bot-coasys 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
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,51 @@ | ||
| { | ||
| "name": "@coasys/flux-soa-tree-view", | ||
| "version": "0.11.0", | ||
| "description": "SoA Tree View for Flux", | ||
| "author": "Coasys <[email protected]>", | ||
| "license": "ISC", | ||
| "type": "module", | ||
| "scripts": { | ||
| "start": "vite", | ||
| "dev": "vite", | ||
| "build": "vite build", | ||
| "test": "echo \"Tests to be implemented in follow-up PR\" && exit 0" | ||
| }, | ||
| "main": "./dist/main.umd.cjs", | ||
| "module": "./dist/main.js", | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/main.js", | ||
| "require": "./dist/main.umd.cjs" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "keywords": [ | ||
| "flux-plugin", | ||
| "ad4m-view" | ||
| ], | ||
| "dependencies": { | ||
| "@coasys/ad4m": "0.11.1", | ||
| "@coasys/ad4m-react-hooks": "0.11.1", | ||
| "@coasys/flux-react-web": "0.11.0", | ||
| "@coasys/flux-api": "0.11.0", | ||
| "preact": "^10.13.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/plugin-proposal-class-properties": "^7.18.6", | ||
| "@babel/plugin-proposal-decorators": "^7.21.0", | ||
| "@preact/preset-vite": "^2.5.0", | ||
| "vite": "^4.3.5", | ||
| "vite-plugin-css-injected-by-js": "^3.1.0" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "fluxapp": { | ||
| "name": "SoA Tree", | ||
| "description": "View State of Affairs nodes as a collapsible tree", | ||
| "icon": "diagram-3" | ||
| } | ||
| } |
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,11 @@ | ||
| .appContainer { | ||
| margin: 0 auto; | ||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
|
|
||
| .error { | ||
| padding: 2rem; | ||
| text-align: center; | ||
| color: var(--j-color-danger-500, #e53e3e); | ||
| } |
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,26 @@ | ||
| import styles from './App.module.css'; | ||
| import { PerspectiveProxy } from '@coasys/ad4m'; | ||
| import SoATreeView from './components/SoATreeView'; | ||
| import '@coasys/flux-ui/dist/main.css'; | ||
|
|
||
| type Props = { | ||
| perspective: PerspectiveProxy; | ||
| source: string; | ||
| }; | ||
|
|
||
| export default function App({ perspective, source }: Props) { | ||
| if (!perspective?.uuid || !source) { | ||
| return ( | ||
| <div className={styles.appContainer}> | ||
| <div className={styles.error}> | ||
| No perspective or source available | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| return ( | ||
| <div className={styles.appContainer}> | ||
| <SoATreeView perspective={perspective} source={source} /> | ||
| </div> | ||
| ); | ||
| } | ||
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,149 @@ | ||
| .nodeWrapper { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .nodeHeader { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 6px; | ||
| padding: 4px 8px; | ||
| border-radius: 4px; | ||
| cursor: pointer; | ||
| user-select: none; | ||
| transition: background-color 0.15s; | ||
| } | ||
|
|
||
| .nodeHeader:hover { | ||
| background-color: var(--j-color-ui-100, #f1f5f9); | ||
| } | ||
|
|
||
| .nodeHeader.expanded { | ||
| background-color: var(--j-color-ui-50, #f8fafc); | ||
| } | ||
|
|
||
| .toggle { | ||
| font-size: 12px; | ||
| width: 14px; | ||
| flex-shrink: 0; | ||
| color: var(--j-color-ui-400, #94a3b8); | ||
| } | ||
|
|
||
| .icon { | ||
| font-size: 16px; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .title { | ||
| font-size: 14px; | ||
| font-weight: 500; | ||
| color: var(--j-color-ui-800, #1e293b); | ||
| flex: 1; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .statusBadge { | ||
| font-size: 11px; | ||
| padding: 1px 6px; | ||
| border-radius: 10px; | ||
| color: #fff; | ||
| font-weight: 500; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .priorityBadge { | ||
| font-size: 11px; | ||
| padding: 1px 6px; | ||
| border-radius: 10px; | ||
| background-color: var(--j-color-ui-200, #e2e8f0); | ||
| color: var(--j-color-ui-600, #475569); | ||
| font-weight: 500; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .relCount { | ||
| font-size: 11px; | ||
| color: var(--j-color-ui-400, #94a3b8); | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .details { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 6px; | ||
| padding: 4px 0 8px; | ||
| } | ||
|
|
||
| .property { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 8px; | ||
| font-size: 13px; | ||
| } | ||
|
|
||
| .propLabel { | ||
| font-size: 12px; | ||
| color: var(--j-color-ui-400, #94a3b8); | ||
| font-weight: 500; | ||
| flex-shrink: 0; | ||
| min-width: 70px; | ||
| } | ||
|
|
||
| .confidenceBar { | ||
| width: 80px; | ||
| height: 6px; | ||
| background-color: var(--j-color-ui-200, #e2e8f0); | ||
| border-radius: 3px; | ||
| overflow: hidden; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .confidenceFill { | ||
| height: 100%; | ||
| background-color: var(--j-color-primary-500, #3b82f6); | ||
| border-radius: 3px; | ||
| transition: width 0.2s; | ||
| } | ||
|
|
||
| .confidenceValue { | ||
| font-size: 12px; | ||
| color: var(--j-color-ui-500, #64748b); | ||
| } | ||
|
|
||
| .tagList { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 4px; | ||
| } | ||
|
|
||
| .tag { | ||
| font-size: 11px; | ||
| padding: 1px 8px; | ||
| border-radius: 10px; | ||
| background-color: var(--j-color-ui-100, #f1f5f9); | ||
| color: var(--j-color-ui-600, #475569); | ||
| } | ||
|
|
||
| .relationships { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| align-items: center; | ||
| gap: 4px; | ||
| } | ||
|
|
||
| .relBadge { | ||
| font-size: 11px; | ||
| padding: 2px 8px; | ||
| border-radius: 10px; | ||
| background-color: var(--j-color-ui-100, #f1f5f9); | ||
| color: var(--j-color-ui-600, #475569); | ||
| border: 1px solid var(--j-color-ui-200, #e2e8f0); | ||
| } | ||
|
|
||
| .children { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 2px; | ||
| } |
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.
π§© Analysis chain
π Script executed:
Repository: coasys/flux
Length of output: 7127
Remove the unnecessary
agentguard, or make it optional if agent may be required later.SoATreeViewdeclares onlyperspectiveandsourcein its Props type and never referencesagent. The guard at line 14 (if (!perspective?.uuid || !agent)) blocks rendering even thoughagentis not used. For a read-only tree view that depends solely onperspectiveandsource, either remove theagentcheck or make it optional (e.g.,agent?: AgentClient) if agent is reserved for future use by child components.Also applies to: lines 8, 18
π€ Prompt for AI Agents