dashboard

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dashboard provides a live browser viewport stream over WebSocket. It captures CDP screencast frames and broadcasts them to connected clients, plus an activity feed of navigation and interaction events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	ID         int       `json:"id"`
	FrameID    uint64    `json:"frame_id"`
	Note       string    `json:"note"`
	Region     Region    `json:"region"`
	Screenshot string    `json:"screenshot"`
	CreatedAt  time.Time `json:"created_at"`
}

Annotation couples a human note with the exact frame and region it marks.

type AnnotationArtifact

type AnnotationArtifact struct {
	Version     int          `json:"version"`
	Annotations []Annotation `json:"annotations"`
}

AnnotationArtifact is written after each dashboard drawing. Screenshot paths are relative to the artifact so the JSON can be moved as one directory.

type Dashboard

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

Dashboard wraps the HTTP server and screencast streamer.

func Start

func Start(page *rod.Page, port int) (*Dashboard, string, error)

Start begins screencasting and serving the dashboard UI on the given port. Returns the URL where the dashboard is accessible.

func StartWithOptions

func StartWithOptions(page *rod.Page, port int, opts Options) (*Dashboard, string, error)

StartWithOptions begins screencasting with optional annotation capture.

func (*Dashboard) AnnotationArtifactPath

func (d *Dashboard) AnnotationArtifactPath() string

AnnotationArtifactPath returns the JSON result artifact when annotations are enabled.

func (*Dashboard) PushEvent

func (d *Dashboard) PushEvent(text string)

PushEvent sends a text event to all connected dashboard clients.

func (*Dashboard) Stop

func (d *Dashboard) Stop()

Stop shuts down the dashboard server and stops screencasting.

type Options

type Options struct {
	Annotate     bool
	ArtifactPath string
}

Options configure optional human-collaboration features.

type Region

type Region struct {
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
	Width  float64 `json:"width"`
	Height float64 `json:"height"`
}

Region is a screenshot-pixel rectangle supplied by the dashboard canvas.

Jump to

Keyboard shortcuts

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