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 ¶
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 ¶
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 ¶
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.
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.