uifocus

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package uifocus is the handoff from the CLI to a running UI. The CLI writes a hash; every polling UI on that profile peeks the same payload while it is fresh (MaxAge). The file is not deleted on read — one-shot apply belongs to each client, keyed on the write timestamp. The file lives next to the profile's config — not in SQLite — so a sync cannot wipe a pending focus and a snapshot cannot carry one.

Index

Constants

View Source
const MaxAge = 2 * time.Minute

MaxAge is how long a focus request stays valid. Older files are ignored so a leftover from yesterday cannot yank the list when the app next opens.

Variables

This section is empty.

Functions

func PathFor

func PathFor(profile string) (string, error)

PathFor is the focus file for a named profile ("" / "default" = root).

func PeekFor added in v0.18.1

func PeekFor(profile string) (hash, at string, ok bool, err error)

PeekFor returns a still-fresh hash and its write timestamp without deleting the file. ok is false when there is nothing to apply (missing, empty, or stale). Workspace mounts pass the /w/<name> segment so they read their own file, not the process-primary one.

func Write

func Write(hash string) error

Write records a view hash (query string, no #/?) for the running UI to apply.

func WriteFor

func WriteFor(profile, hash string) error

WriteFor records a view hash for the named profile's UI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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