Skip to content

fix(api): sse events for queue and health - #418

Merged
javi11 merged 6 commits into
mainfrom
cleanup/remove-dead-fiber-sse-handlers
Mar 16, 2026
Merged

fix(api): sse events for queue and health#418
javi11 merged 6 commits into
mainfrom
cleanup/remove-dead-fiber-sse-handlers

Conversation

@javi11

@javi11 javi11 commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Delete handleHealthStream and handleQueueStream Fiber handlers — permanently unreachable since native net/http bypass handlers intercept these routes before Fiber
  • Remove now-unused imports (bufio, context, github.com/gofiber/fiber/v2) from progress_handlers.go
  • Remove dead api.Get("/queue/stream", ...) and api.Get("/health/stream", ...) route registrations from server.go
  • Add setup.go bypass routes for /api/queue/stream and /api/health/stream via ServeQueueSSE/ServeHealthSSE
  • Replace dead route lines with an explanatory comment pointing to the correct handlers in setup.go

Test plan

  • go build ./... compiles cleanly with no unused import errors
  • go vet ./internal/api/... ./cmd/... passes clean
  • Browser devtools: /api/queue/stream and /api/health/stream hold persistent SSE connections
  • Unauthenticated requests to both endpoints return 401

🤖 Generated with Claude Code

javi11 and others added 6 commits March 11, 2026 23:07
Analyze multiple RAR archive groups concurrently using goroutines,
reducing import time for NZBs with multiple separate RAR sets (e.g. season packs).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eams via net/http

The previous fix added native net/http bypass handlers (ServeQueueSSE,
ServeHealthSSE) that intercept /api/queue/stream and /api/health/stream
before requests reach Fiber. This made the original Fiber-based
handleQueueStream and handleHealthStream permanently unreachable dead code.

- Delete handleHealthStream and handleQueueStream Fiber handlers
- Remove now-unused imports: bufio, context, github.com/gofiber/fiber/v2
- Remove dead route registrations in SetupRoutes
- Add setup.go bypass routes for queue/stream and health/stream
- Replace dead route lines with explanatory comment in server.go

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@javi11 javi11 changed the title refactor(api): remove dead Fiber SSE handlers for queue/health streams fix(api): sse events for queue and health Mar 16, 2026
@javi11
javi11 merged commit 7f5d672 into main Mar 16, 2026
2 checks passed
@javi11
javi11 deleted the cleanup/remove-dead-fiber-sse-handlers branch March 16, 2026 09:00
yoshitaka420 pushed a commit to yoshitaka420/altmount that referenced this pull request Jun 1, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant