// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CompareBaseline } from "./CompareBaseline";
import type { FolderOrigin } from "./FolderOrigin";
import type { PrListScope } from "./PrListScope";
import type { ReviewComment } from "./ReviewComment";
import type { ReviewedFile } from "./ReviewedFile";
import type { SplitSide } from "./SplitSide";

/**
 * One folder's slice of UI state. Multiple of these live inside a
 * [`WorkspaceSession`] — the user's tabs/active-pane state is per
 * folder, swapping when the active bar changes. Phase 2.5 ships
 * multi-folder UX; before that, this list always had exactly one
 * entry but the wire shape stays the same.
 */
export type FolderSession = { 
/**
 * Absolute path of the folder on the host. Used to re-bind the
 * folder on next launch and to invalidate stale entries when the
 * user opens a different folder.
 */
folder_path: string, 
/**
 * Tabs open in the left pane, in tab order. May reference files
 * that no longer exist; the frontend filters those out at restore
 * time.
 */
open_files_left: Array<string>, 
/**
 * Tabs open in the right pane, in tab order. Empty when no split
 * is active. The two lists are independent — a file can live in
 * one pane, both, or neither (VSCode/Zed convention).
 */
open_files_right: Array<string>, 
/**
 * Active tab on the left pane, if any. Must appear in `open_files_left`.
 */
active_left: string | null, 
/**
 * Active tab on the right pane, if any. `None` when the split is
 * closed; `Some` only makes sense alongside `has_split = true`.
 */
active_right: string | null, has_split: boolean, focused_side: SplitSide, 
/**
 * Branch-switcher PR-section filter for this folder. Persisted
 * per folder so flipping to "Participating" on a busy
 * monorepo doesn't drag a sleepy side-project's palette into
 * participating-only mode too. Defaults to
 * [`PrListScope::All`] for fresh sessions and for sessions
 * written by older builds (`#[serde(default)]`).
 */
pr_scope: PrListScope, 
/**
 * SCM compare baseline for this folder. `Default` makes the
 * file tree, change gutter, and diff view show "what this
 * branch / PR changes versus main"; `Head` is the regular
 * "what's modified since the last commit". Persisted per
 * folder for the same reason as `pr_scope`.
 */
compare_baseline: CompareBaseline, 
/**
 * Hide whitespace-only changes in the merge surfaces (review
 * tab, working-tree diff). Default-on: a fresh review is far
 * more often hurt by reindent churn (agent refactors,
 * formatter flips) than by missing a whitespace-only delta,
 * and the banner pill says when the lens is on. Persisted per
 * folder for the same reason as `compare_baseline`.
 */
ignore_whitespace: boolean, 
/**
 * Local-first review-comment drafts for this folder (Phase
 * 5.7). Persisted until published to a GitHub PR and then
 * cleared. `#[serde(default)]` on the struct fills an empty
 * vec for sessions written by older builds.
 */
review_comments: Array<ReviewComment>, 
/**
 * Per-file "Viewed" marks for this folder (Phase 5.7).
 * Pinned to the ticked version's blob SHA; the frontend
 * drops stale entries on git-status refresh. Never published.
 */
reviewed_files: Array<ReviewedFile>, 
/**
 * How this folder came to be bound (ADR 0028). Persisted so a
 * worktree-backed coder session's checkout is re-bound as a
 * nested worktree folder on next launch rather than promoted to
 * a plain top-level folder. Defaults to
 * [`FolderOrigin::UserPicked`] for folders written by older
 * builds.
 */
origin: FolderOrigin, };
