// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * One row in the branch-switcher palette. Two kinds today: a
 * local branch (or remote-tracking ref already fetched) and a
 * GitHub PR sourced from `gh pr list`. The discriminant drives
 * the switch verb on the backend — `git switch <name>` for
 * `Local`, `gh pr checkout <number>` for `Pr` (so cross-fork PRs
 * get the fork-fetching dance for free).
 *
 * Frontend renders both in a single list with a section header
 * per kind; type-to-filter spans both. See
 * `src/lib/components/BranchSwitcher.svelte`.
 */
export type BranchListEntry = { "kind": "local", 
/**
 * Short branch name (`feat/foo`, `main`).
 */
name: string, 
/**
 * First line of the tip commit (`%(subject)`). Empty
 * string when the ref points at an empty tree (rare —
 * freshly created branch with `--orphan` and no
 * commit yet).
 */
lastCommitSubject: string, 
/**
 * Human-readable "3 hours ago" / "yesterday" style
 * timestamp, computed by git itself
 * (`%(committerdate:relative)`). The frontend renders
 * it verbatim — no locale translation, matches what
 * `git branch -v` would print.
 */
committerDateRelative: string, 
/**
 * Marker for the row that's currently checked out so
 * the UI can render it as inert (no point switching to
 * the branch you're already on).
 */
isCurrent: boolean, 
/**
 * Marker for the repo's default branch (`main` /
 * `master`, resolved from `origin/HEAD`). The recency
 * cap can push the default branch off the end of the
 * list on a busy repo, so the backend always includes
 * its row and sets this flag; the frontend keeps it
 * visible even when the list is collapsed, since
 * switching back to the default branch is the most
 * common destination.
 */
isDefault: boolean, } | { "kind": "pr", 
/**
 * PR number (the `#42` segment). 32-bit fits every
 * realistic GitHub repo's PR count.
 */
number: number, 
/**
 * PR title verbatim. Rendered with mono accent on the
 * number, then a separator, then the title.
 */
title: string, 
/**
 * GitHub login of the PR's author (no `@` prefix). The
 * frontend prepends `@` itself so the wire format
 * stays clean.
 */
author: string, 
/**
 * Source branch (`headRefName`) the PR is open from.
 * Used by `gh pr checkout` implicitly; we surface it
 * in the UI for users who recognise the branch name
 * faster than the title.
 */
headRef: string, 
/**
 * True iff the PR is currently a draft. The frontend
 * renders a small `draft` badge inline; type-to-filter
 * still matches drafts (no filter knob today, hardcode
 * first per AGENTS.md).
 */
isDraft: boolean, 
/**
 * Human-readable last-update timestamp from gh's
 * JSON. We compute the relative form on the backend so
 * every row has the same format regardless of locale.
 */
updatedAtRelative: string, };
