fix: replay channel state on SPA reconnect #61

Merged
sneak merged 7 commits from fix/spa-reconnect-channel-tabs into main 2026-03-10 11:08:13 +01:00
Showing only changes of commit 91da9eb8c7 - Show all commits

View File

@@ -1850,26 +1850,14 @@ docker run -p 8080:8080 \
neoirc neoirc
``` ```
The Dockerfile is a multi-stage build: The Dockerfile is a four-stage build:
1. **Build stage**: Compiles `neoircd` and `neoirc-cli` (CLI built to verify 1. **web-builder**: Installs Node dependencies and compiles the SPA (JSX →
compilation, not included in final image) bundled JS via esbuild) into `web/dist/`
2. **Final stage**: Alpine Linux + `neoircd` binary only 2. **lint**: Runs formatting checks and golangci-lint against the Go source
(with the built SPA assets copied in)
```dockerfile 3. **builder**: Runs tests and compiles static `neoircd` and `neoirc-cli`
FROM golang:1.24-alpine AS builder binaries (CLI built to verify compilation, not included in final image)
WORKDIR /src 4. **final**: Minimal Alpine image with only the `neoircd` binary
RUN apk add --no-cache make
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o /neoircd ./cmd/neoircd/
RUN go build -o /neoirc-cli ./cmd/neoirc-cli/
FROM alpine:latest
COPY --from=builder /neoircd /usr/local/bin/neoircd
EXPOSE 8080
CMD ["neoircd"]
```
### Binary ### Binary
@@ -2318,10 +2306,14 @@ neoirc/
│ └── http.go # HTTP timeouts │ └── http.go # HTTP timeouts
├── web/ ├── web/
│ ├── embed.go # go:embed directive for SPA │ ├── embed.go # go:embed directive for SPA
── dist/ # Built SPA (vanilla JS, no build step) ── build.sh # SPA build script (esbuild, runs in Docker)
├── index.html ├── package.json # Node dependencies (preact, esbuild)
├── style.css ├── package-lock.json
└── app.js ├── src/ # SPA source files (JSX + HTML + CSS)
│ │ ├── app.jsx
│ │ ├── index.html
│ │ └── style.css
│ └── dist/ # Generated at Docker build time (not committed)
├── schema/ # JSON Schema definitions (planned) ├── schema/ # JSON Schema definitions (planned)
├── go.mod ├── go.mod
├── go.sum ├── go.sum