webreview

package
v0.0.0-...-13d30d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package webreview exposes the comments review model as a local, browser-based human review surface. It deliberately delegates all document mutations to pkg/comment so the TUI, CLI, MCP server, and browser share one sidecar format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is an http.Handler for one file or one directory review workspace.

func New

func New(target, author string) (*Server, error)

New creates a review server. A directory includes Markdown documents that already have sidecars; an explicit Markdown file is always included.

func (*Server) AllowHost

func (s *Server) AllowHost(host string)

AllowHost adds a Host accepted by the handler. It is primarily useful to mount the handler under httptest without weakening production checks.

func (*Server) BootstrapURL

func (s *Server) BootstrapURL(listener net.Listener) string

BootstrapURL is the local URL the user opens once to establish the session.

func (*Server) ConfigureListener

func (s *Server) ConfigureListener(listener net.Listener)

ConfigureListener records the exact Host values accepted by the handler. Call it before serving to prevent DNS rebinding against the loopback server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) Token

func (s *Server) Token() string

Token returns the unguessable bootstrap token. It is intended to appear only in the initial local URL, which exchanges it for an HttpOnly cookie.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL