Skip to content

Fix vis-network loading and add structured slog logging throughout#5

Merged
aksOps merged 2 commits into
mainfrom
claude/rename-package-fix-install-s3HlB
Mar 17, 2026
Merged

Fix vis-network loading and add structured slog logging throughout#5
aksOps merged 2 commits into
mainfrom
claude/rename-package-fix-install-s3HlB

Conversation

@aksOps

@aksOps aksOps commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

claude added 2 commits March 17, 2026 10:38
vis-network fix:
- Switch from placeholder vendor stub to CDN (unpkg.com) in index.html
- Remove vendor/vis-network.min.js from embed.go (no longer embedded)
- Add graceful 'vis not loaded' error message in graph.js

Structured logging (log/slog):
- cmd/root.go: initialise global slog text handler; add --log-level flag
  (debug/info/warn/error) to control verbosity
- cmd/serve.go: replace fmt.Fprintf with slog.Info/Error; log store open,
  LLM provider init, server start, shutdown lifecycle
- cmd/index.go: slog for crawl start/complete, index start/complete,
  finalization phases
- internal/pipeline/pipeline.go: slog throughout all phases — file count,
  skip/supersede decisions, chunk+embed counts, entity/relationship
  extraction counts, community detection progress, Finalize phase markers
- internal/crawler/crawler.go: slog for sitemap discovery, BFS progress,
  page fetch errors, crawl summary stats
- internal/api/router.go: HTTP logging middleware capturing method, path,
  status code, duration; 5xx logged at Error, 4xx at Warn, 2xx at Info
- internal/api/handlers.go: slog.Error on all 500 responses; Info on
  search requests and upload jobs

https://claude.ai/code/session_012X8wf4jwQFRYfMnbbWCEs5
Remove the unpkg.com CDN dependency entirely. Implement force-directed
graph rendering in ~220 lines of vanilla JS using HTML5 Canvas:

- Force-directed layout: repulsion (Coulomb), spring attraction along
  edges, gravity toward canvas centre, velocity damping
- Deterministic initial positions (nodes placed on a circle)
- Directional edges with arrowheads, width proportional to weight
- Node size proportional to entity rank, coloured by type
- Edge labels rendered at midpoint
- Interactive: drag nodes, pan (background drag), scroll-to-zoom
- Hover tooltips showing entity name, type and description
- Cleans up ResizeObserver and cancelAnimationFrame on re-render
- Zero external dependencies — works behind corporate firewalls

https://claude.ai/code/session_012X8wf4jwQFRYfMnbbWCEs5
@aksOps aksOps merged commit 1e4478f into main Mar 17, 2026
1 check passed
@aksOps aksOps deleted the claude/rename-package-fix-install-s3HlB branch April 23, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants