FE-566: Generic knowledge layer schema and sidebar projection#28
Conversation
FE-566 Generic knowledge layer schema and sidebar projection
Introduce the broader semantic layer ( Acceptance
|
3852b56 to
f6570c2
Compare
91d1d75 to
4a3af60
Compare
07e5bb4 to
5a204a6
Compare
🤖 Augment PR SummarySummary: This PR introduces a generic knowledge-item persistence seam and projects the expanded entity model into the workspace sidebar without regressing existing decision/assumption reads. Changes:
Technical Notes: Dependency edges are projected from legacy parent-link tables into a unified 🤖 Was this summary useful? React with 👍 or 👎 |
| .map((relationship) => | ||
| contentByEntity.get(entityKey(relationship.target.collection, relationship.target.id)), | ||
| ) | ||
| .filter((content): content is string => Boolean(content)); |
There was a problem hiding this comment.
filter((content) => Boolean(content)) will drop valid empty-string content, which could cause some dependency labels to silently disappear if an entity’s content is ''. If empty strings are possible here, filtering only null/undefined would avoid that edge case.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| <p className="text-xs font-medium text-muted-foreground">Depends on</p> | ||
| <ul className="mt-1 list-disc pl-4 text-xs text-muted-foreground"> | ||
| {dependencyLabels.map((label) => ( | ||
| <li key={label}>{label}</li> |
There was a problem hiding this comment.
Using the dependency label (entity content) as the React key can collide when multiple dependencies share the same text, which can lead to incorrect list reconciliation/rendering. A stable key derived from the relationship’s identity would avoid content-based collisions.
Other locations where this applies: src/client/components/EntitySidebar.tsx:191
Severity: medium
Other Locations
src/client/components/EntitySidebar.tsx:191
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| export function createKnowledgeItem( | ||
| db: DB, | ||
| projectId: number, | ||
| kind: KnowledgeKind, |
There was a problem hiding this comment.
createKnowledgeItem takes kind: KnowledgeKind, which currently includes legacy kinds like 'decision' and 'assumption'; that makes it easy to accidentally write those into knowledge_item while the migration plan keeps them in dedicated tables. Narrowing the accepted kinds for this API would reduce the risk of split-brain entity storage during the transition.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

feat: surface framing items through the generic knowledge seam
feat: project dependency relationships through the entity seam