project

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package project keeps a list of boards the user has opened, so the board can offer a switcher. It is a convenience list rather than a source of truth: a project is just a directory containing .jaira, and deleting this registry loses nothing but the shortcut.

Index

Constants

View Source
const MaxScanDepth = 2

MaxScanDepth is how many directory levels below a root are searched for boards.

Two is deliberate and not a placeholder: repositories are normally one or two levels under a code directory, and an unbounded walk of a home directory is slow enough to feel broken — it would descend into node_modules, caches and mounted drives to find nothing.

Variables

This section is empty.

Functions

func Canonical

func Canonical(p string) string

Canonical is exported because every caller that compares board paths has to use the same reduction. The launcher deduping with filepath.Abs while the registry stored a symlink-resolved path listed the same board twice on macOS, where /var is a symlink to /private/var.

func Discover

func Discover(root string, maxDepth int) []string

Discover finds boards at most MaxScanDepth levels below root.

A board is a directory containing .jaira/tickets, matching how Discover works in the ticket store: the name .jaira alone is not enough, because the user's own configuration lives at ~/.jaira and would otherwise look like a board.

func Remember

func Remember(root string)

RememberProject records that a board was opened here.

Types

type Project

type Project struct {
	Root     string `json:"root"`
	Name     string `json:"name"`
	LastOpen string `json:"last_open"`
}

Project is one repository the user has opened a board in.

The registry exists only so the board can offer a switcher. It is a convenience list, not a source of truth: a project is still just a directory containing .jaira, and deleting this file loses nothing but the shortcut.

func Load

func Load() []Project

LoadProjects returns known projects, most recently opened first, dropping any that no longer exist on disk.

Jump to

Keyboard shortcuts

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