Add beautiful error page with OpenCode self‑healing#1
Merged
Conversation
- templates/error.html: Orange-themed error page with pipeline steps - internal/handler/error_handler.go: Centralized error handling - internal/handler/opencode_analyzer.go: OpenCode Docker integration - Routes: /error (preview), /error/trigger (simulate error) Features: - Animated pipeline showing self-healing progress - Error ID tracking for incident correlation - Async OpenCode analysis trigger via Docker container - Webhook fallback for n8n integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move widget script to base.html so it loads on all pages. Add htmx:afterSwap listener to reinitialize widget after HTMX content swaps. Previously, navigating via hx-boost links only rendered the "content" block, skipping the "scripts" block where the widget was initialized. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Go's html/template sanitizes data URLs to #ZgotmplZ for security. Add safeURL template function to mark data URLs as safe for img src. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove tool calling from self-healing analysis. The model (groq/llama-3.3-70b-versatile via Demeterics) outputs function calls as text (<function=...>) instead of structured JSON, causing API errors. Now uses simple single-turn analysis without file reading. Less powerful but works reliably. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit a99d2e3.
Switch from groq/llama-3.3-70b-versatile to meta-llama/llama-4-maverick-17b-128e-instruct which properly supports function calling via Demeterics API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The PROMPT string was closed prematurely on line 110, causing "Instructions:" to be interpreted as a shell command. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove set -e and add || true to git diff | head pipes to prevent SIGPIPE when head closes the pipe before git diff finishes writing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AI Code ReviewPowered by Demeterics with openai/gpt-oss-20b |
- Add goldmark for proper markdown-to-HTML conversion with GFM support - Strip ANSI escape codes from LLM analysis output - Parse JSON wrapper from self-healing analysis response - Fallback to escaped pre block if markdown conversion fails Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AI Code ReviewPowered by Demeterics with openai/gpt-oss-20b |
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.
Summary
go fmtto all Go files for consistent formatting.Changes
cmd/server/main.go: Updated server startup to serve the new error page.internal/handler/error_handler.go: Implemented custom error handling logic.internal/handler/feedback.go: Added feedback endpoint for error reporting.internal/handler/opencode_analyzer.go: Hook for OpenCode analysis.internal/model/feedback.go: New feedback data model.internal/repository/repository.go: Persist feedback and analysis results.internal/selfhealing/analyze.go: Core analysis logic for self‑healing.internal/selfhealing/guards.go: Guard conditions for triggering healing.internal/selfhealing/trigger.go: Execution of self‑healing actions.templates/error.html: New HTML template for the error page.go fmtto all modified Go files.Test Plan
Manual UI Test
Automated Tests
go test ./...to confirm all existing tests pass.Formatting Check
go fmt ./...locally to ensure no formatting changes are pending.PR generated with Demeterics AI