Fix vis-network loading and add structured slog logging throughout#5
Merged
Conversation
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.