Skip to content

0.4.13

Choose a tag to compare

@spfcraze spfcraze released this 24 Apr 04:52
· 58 commits to main since this release

New Features

Brain 3D — Delete Node
- Backend: NodeRepo.Delete now runs in a transaction that cleanly removes all connected data:
  - Soft-deletes the node (valid_to = now())
  - Hard-deletes all edges referencing the node
  - Clears predecessor_id references pointing to the node
  - Hard-deletes embedding row, session associations, and collection associations
- Frontend: Red [Delete Node] button added to the Brain 3D right panel detail view
  - Confirm dialog with node label
  - Instant removal from canvas without full refresh
  - Toast notification on success



Bug Fixes

Backend Limit Caps (Silent Data Truncation)
Four backend functions were silently capping results, causing frontend features to receive partial data:

| File | Function | Before | After |
|---|---|---|---|
| internal/repository/node.go | List() | > 100 | > 1000 |
| internal/repository/edge.go | GetByType() | > 100 | > 1000 |
| internal/repository/search.go | FullTextSearch() | > 50 | > 100 |
| internal/repository/search.go | VectorSearch() | > 50 | > 100 |
| internal/repository/search.go | HybridSearch() | > 50 | > 100 |
| internal/handler/edge.go | List(count=true) | ignored type filter | uses CountByType() |

Data Quality Analyzer (DQA)
- Data source: Changed from /nodes?limit=500 + /edges to /graph?limit=2000 — now loads the full connected graph
- Field names: Fixed e.source_id/e.target_id → e.source/e.target (matches /graph API response)
- ConnectComponents: Added dry_run query param — preview counts edges without inserting, execution inserts with dry_run=false
- Quick fix: Wired to POST /api/v1/nodes/dedup endpoint

Foreign Key Violations
- PurgeOldVersions: Added transaction with UPDATE predecessor_id=NULL before DELETE
- CompactNodeVersions: Same predecessor-null pattern
- AddMessages: Added session existence validation — returns 404 instead of 500 FK error
- ProcessAndStore / ProcessAndStoreLLM: Added session validation for async operations

Frontend Null-Safety
- Added 10+ null/undefined guards across dashboard and Brain 3D:
  - .label access on null nodes
  - .edge_type access on undefined edges
  - .substring() and .toFixed() calls on missing values
  - Importance/access_count fallbacks in neighbor tables

Brain 3D Detail Panel
- SIZE field: Changed from visual node radius (8.6px) to content character count
- ACCESSED field: Changed 0x to 0× (multiplication sign) — eliminates hex notation confusion

MCP Server
- create_edge tool: Added edgeType.IsValid() check — returns clear error instead of opaque DB failure
- Search limits: Raised from 50 to 100 to match HTTP handler validation

UTF-8 Truncation Corruption
- Fixed all 3 truncate() functions to use []rune(s) instead of byte slicing
- Root cause: Slicing multi-byte UTF-8 characters (like …) at byte boundaries produced invalid sequences like 0xe2 0x2e 0x2e
- Files: internal/repository/session.go, internal/reasoner/reasoner.go, internal/handler/analyze_common.go

Database Authentication
- Fixed MB_DB_DSN in ~/.hermes/config.yaml — corrected password from literal *** (redaction artifact) to actual credential
- Eliminated MCP server FATAL: password authentication failed errors



Theme & UI Updates

Cyberpunk Aesthetic (Huashu-Design)
- Color palette: Dark background (#0a0a12), elevated panels (#12121e), accent teal (#00d4aa)
- Ink palette node colors: 12 node types with distinct geometric icons (no emoji):
  - Project #2dd4a0, Decision #5b9bd5, Fact #d4a85a, Preference #c084c0, Problem #d4855a, Advice #7bc47b, Event #9aa0d4, Person #d4945a, Topic #7a8fd4, Concept #9aa0d4, Agent #d48ab0, Question #d4a85a
- Edge colors: Same-namespace #3a3a4a, cross-namespace #4a3a3a, selected #00d4aa
- Typography: Monospace + sans-serif stack, 7px–16px hierarchy, uppercase labels with letter-spacing

Layout Improvements
- High-density data-first design — functional dashboard feel, not a marketing page
- Brain 3D canvas: 2D force-directed graph with particle bursts, hover cards, recall popups
- Detail panel: Metadata grid, connection stats with mini bar charts, neighbor list
- Sidebar: Stats bar, search, namespace filters, legend, activity feed

Graph 2D (vis-network)
- Tooltips: Plain text only (vis-network escapes HTML tags)
- Keyboard shortcuts: R=refresh, F=fit, P=physics toggle
- Brightened edges: #1a1a24 → #3a3a4a (was invisible against dark background)