mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
fix: comprehensive QA audit — light mode, accessibility, error handling, code quality
- Fix light mode: theme-aware graph node labels, remove prose-invert for theme-safe markdown, add brand/semantic color overrides for light backgrounds - Add 404 catch-all route redirecting unknown paths to /chat - FalkorDB: add .catch() to connectPromise, add ensureConnected() to all store methods (createLiteral, relateNode, relateLiteral, deleteCollection) - Accessibility: dialog role/aria-modal, toast aria-live, dismiss/zoom/search button aria-labels, close panel aria-label - Lazy-load ForceGraph2D (splits 189KB into separate chunk, main bundle -26%) - Cap conversation localStorage at 200 messages to prevent quota overflow - Fix pnpm test: add --passWithNoTests to cli/mcp packages - Add upload error notification instead of silent catch - Remove unused class-variance-authority dep and dead tabs.tsx component - Add @types/node to flow package devDependencies - Remove stale FIXME comment in messages.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9ef9ef854f
commit
5e3929a883
17 changed files with 73 additions and 74 deletions
|
|
@ -46,6 +46,9 @@ export class FalkorDBTriplesQuery {
|
|||
this.graph = new Graph(client, database);
|
||||
this.connectPromise = client.connect().then(() => {
|
||||
console.log(`[FalkorDBTriplesQuery] Connected to ${url}, graph: ${database}`);
|
||||
}).catch((err) => {
|
||||
console.error(`[FalkorDBTriplesQuery] Connection failed:`, err);
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ export class FalkorDBTriplesStore {
|
|||
this.graph = new Graph(client, database);
|
||||
this.connectPromise = client.connect().then(() => {
|
||||
console.log(`[FalkorDBTriplesStore] Connected to ${url}, graph: ${database}`);
|
||||
}).catch((err) => {
|
||||
console.error(`[FalkorDBTriplesStore] Connection failed:`, err);
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +59,7 @@ export class FalkorDBTriplesStore {
|
|||
}
|
||||
|
||||
async createLiteral(value: string, user: string, collection: string): Promise<void> {
|
||||
await this.ensureConnected();
|
||||
await this.graph.query(
|
||||
"MERGE (n:Literal {value: $value, user: $user, collection: $collection})",
|
||||
{ params: { value, user, collection } },
|
||||
|
|
@ -66,6 +70,7 @@ export class FalkorDBTriplesStore {
|
|||
src: string, uri: string, dest: string,
|
||||
user: string, collection: string,
|
||||
): Promise<void> {
|
||||
await this.ensureConnected();
|
||||
await this.graph.query(
|
||||
"MATCH (src:Node {uri: $src, user: $user, collection: $collection}) " +
|
||||
"MATCH (dest:Node {uri: $dest, user: $user, collection: $collection}) " +
|
||||
|
|
@ -78,6 +83,7 @@ export class FalkorDBTriplesStore {
|
|||
src: string, uri: string, dest: string,
|
||||
user: string, collection: string,
|
||||
): Promise<void> {
|
||||
await this.ensureConnected();
|
||||
await this.graph.query(
|
||||
"MATCH (src:Node {uri: $src, user: $user, collection: $collection}) " +
|
||||
"MATCH (dest:Literal {value: $dest, user: $user, collection: $collection}) " +
|
||||
|
|
@ -109,6 +115,7 @@ export class FalkorDBTriplesStore {
|
|||
}
|
||||
|
||||
async deleteCollection(user: string, collection: string): Promise<void> {
|
||||
await this.ensureConnected();
|
||||
await this.graph.query(
|
||||
"MATCH (n:Node {user: $user, collection: $collection}) DETACH DELETE n",
|
||||
{ params: { user, collection } },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue