web

package
v0.165.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

wb bench dashboard

The Astro source for the bench dashboard — the pages behind wb's /workbench/dashboard/, /workbench/dashboard/github/, /workbench/org/*, /workbench/repo/*, and /workbench/app/sync-report/ routes. Marketing pages for sneat.work/bench live in a separate, private repository.

pnpm install && pnpm build
pnpm test
pnpm test:e2e

wb embeds this dist/ and serves it at /workbench/; the hosted sneat.dev/wb site serves its own rewritten copy of the same build under /wb.

Documentation

Overview

Package web embeds the built bench dashboard so a self-hosted hub serves the same pages the hosted instance does, with no Node runtime and no configuration.

dist/ is produced by `pnpm build` in this directory and is git-ignored except for dist/.gitkeep, which exists because go:embed refuses a directory that is not there. The Astro build copies public/.gitkeep back into dist/, so building never deletes the tracked placeholder. A wb built from a clean clone therefore compiles, and Handler serves a one-line page explaining how to build the real dashboard.

Index

Constants

View Source
const MountPath = "/workbench/"

MountPath is where the dashboard is served. The Astro build hard-codes it as the site base, so every asset URL in the emitted HTML already starts here and the pages need no rewriting.

Variables

View Source
var Dist embed.FS

Dist holds every file the Astro build emitted, or only .gitkeep in a clone where `pnpm build` has never run.

Functions

func Built

func Built() bool

Built reports whether a real dashboard is embedded.

func Handler

func Handler() http.Handler

Handler serves the embedded dashboard under MountPath. It implements the Astro build's trailingSlash: 'always' + build.format: 'directory' contract: a request for a directory is answered with that directory's index.html, and a request that omits the trailing slash is redirected to the one that has it — the same shape a static host gives the hosted instance.

Mount it on a mux at MountPath; the prefix is stripped here so the caller does not have to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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