-
Notifications
You must be signed in to change notification settings - Fork 1
feat(rr): separate job title from responsibility, group unanchored affiliations #403
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
Closed
seonghobae
wants to merge
1
commit into
docs/customer-master-scope-adr
from
fix/knowledge-graph-black-nodes-20260822
Closed
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| import type { Meta, StoryObj } from "@storybook/react-vite"; | ||
| import { KnowledgeGraphView } from "./KnowledgeGraph"; | ||
| import type { KnowledgeGraph } from "./api"; | ||
|
|
||
| // Regression fixture for the 2026-08-22 black-node bug: "evidence" nodes | ||
| // (source-grounded but not yet catalog-linked) must render with visible | ||
| // text on a visible background, not solid black. Covers all three visual | ||
| // states -- focus (the post itself), catalog (an already-cataloged | ||
| // entity), and evidence -- in one graph so a broken token shows immediately. | ||
| const mixedStateGraph: KnowledgeGraph = { | ||
| post_id: "post-1", | ||
| nodes: [ | ||
| { | ||
| id: "post-1", | ||
| node_type_code: "node_post", | ||
| node_id: "post-1", | ||
| label: "Case Introduction Meeting", | ||
| is_focus: true, | ||
| }, | ||
| { | ||
| id: "team-1", | ||
| node_type_code: "node_team", | ||
| node_id: "team-1", | ||
| label: "Case Design Team", | ||
| ontology_label: "Team", | ||
| is_focus: false, | ||
| is_evidence_text_node: false, | ||
| }, | ||
| { | ||
| id: "org-observed", | ||
| node_type_code: "node_corporate_entity", | ||
| node_id: "org-observed", | ||
| label: "Case Main Contractor", | ||
| ontology_label: "organization", | ||
| is_focus: false, | ||
| is_evidence_text_node: true, | ||
| }, | ||
| { | ||
| id: "project-observed", | ||
| node_type_code: "node_project", | ||
| node_id: "project-observed", | ||
| label: "Case Grid Project", | ||
| ontology_label: "project", | ||
| is_focus: false, | ||
| is_evidence_text_node: true, | ||
| }, | ||
| ], | ||
| edges: [ | ||
| { | ||
| source: "post-1", | ||
| target: "team-1", | ||
| edge_type_code: "edge_mention", | ||
| ontology_label: "mentioned in post", | ||
| confidence: 0.9, | ||
| evidence_post_ids: ["post-1"], | ||
| }, | ||
| { | ||
| source: "org-observed", | ||
| target: "project-observed", | ||
| edge_type_code: "edge_responsible_for", | ||
| ontology_label: "Responsible for", | ||
| confidence: 0.82, | ||
| evidence_text: "Main Contract - Case Main Contractor", | ||
| evidence_post_ids: ["post-1"], | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| const meta = { | ||
| title: "Evidence/KnowledgeGraph", | ||
| component: KnowledgeGraphView, | ||
| parameters: { layout: "padded" }, | ||
| } satisfies Meta<typeof KnowledgeGraphView>; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const MixedNodeStates: Story = { | ||
| args: { | ||
| graph: mixedStateGraph, | ||
| onSelectPost: () => undefined, | ||
| }, | ||
| }; | ||
|
|
||
| export const EmptyState: Story = { | ||
| args: { | ||
| graph: { post_id: "post-1", nodes: [], edges: [] }, | ||
| onSelectPost: () => undefined, | ||
| }, | ||
| }; |
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,24 @@ | ||
| /// <reference types="node" /> | ||
| import { readFileSync } from "node:fs"; | ||
| import { dirname, join } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| const here = dirname(fileURLToPath(import.meta.url)); | ||
| const css = readFileSync(join(here, "KnowledgeGraph.css"), "utf-8"); | ||
|
|
||
| describe("Knowledge Graph CSS contract", () => { | ||
| it("never reintroduces the undefined --ink/--muted/--line/--line-strong/--warning custom properties", () => { | ||
| // 2026-08-22 bug: these names were used throughout but never defined | ||
| // anywhere in the app. An invalid var()/color-mix() falls back to | ||
| // fill's own initial value (SVG: black), so "evidence" nodes rendered | ||
| // as solid black boxes with black-on-black (invisible) text. | ||
| for (const undefinedToken of ["--ink", "--muted", "--line-strong", "--line)", "--warning"]) { | ||
| expect(css).not.toContain(`var(${undefinedToken}`); | ||
| } | ||
| }); | ||
|
|
||
| it("evidence nodes use a real, globally-defined color token", () => { | ||
| expect(css).toContain("var(--color-accent-orange)"); | ||
| }); | ||
| }); | ||
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.
📝 Info: CSS regression guard only matches exact var() form
The guard in knowledgeGraphCss.test.ts uses a substring check on
var(--ink,var(--muted, etc. It catches the plainvar(--x)form but not a reintroduction with a fallback such asvar(--warning, red). Effective for current usage; not airtight.Was this helpful? React with 👍 or 👎 to provide feedback.