Documentation
¶
Overview ¶
Package webui serves the browser-based GUI: the same review workflow as the TUI — pick an instance, browse MRs, read the diff, comment, run a review, curate findings, publish — rendered as HTML over a loopback-only HTTP server. It is a second frontend over the same core packages (gitlabx, review/runner, review/publisher, resultstore, runlog); no review logic lives here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Cfg config.Config
Svc gitlabx.Service
Reviewer review.Reviewer
Checkout runner.CheckoutFunc
CfgFor func(projectPath string) config.Config
// Agents is the catalog of available review agents (builtins + user
// agents); nil means builtins only.
Agents *agents.Catalog
// Selection remembers the last agent selection per project; nil is a
// no-op store.
Selection *agents.SelectionStore
// ProjectAgents caches the repo-shipped agent definitions the review
// form fetches over the API, per (project, MR head); nil fetches
// uncached.
ProjectAgents *agents.RemoteCache
Logs *runlog.Store
Results *resultstore.Store
}
Deps bundles everything the handlers need for one GitLab instance. CfgFor resolves per-project overrides on top of the instance's configuration.
type Options ¶
type Options struct {
// Instances are the selectable GitLab instance names, in config order.
// Empty means a single unnamed instance served as "default".
Instances []string
// MakeDeps builds the dependencies for one instance; called lazily on
// first use and cached. It may fail (e.g. an unset token_env variable),
// which surfaces as an error page for that instance only.
MakeDeps func(instance string) (*Deps, error)
// ReviewsDir is where run logs and result records live; record and log
// links are validated against it.
ReviewsDir string
// Version is shown in the page footer.
Version string
}
Options configure the server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the browser GUI: an http.Handler plus the session state that backs it (per-instance deps, in-flight review runs, pending comments).