From 01603c570a12b2502c7751d10bf6a2f3c6f07959 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Wed, 25 Feb 2026 00:10:03 -0500 Subject: [PATCH] fix: ForkInfo placement, required fork_info field, add JSDoc Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/types/tree.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/types/tree.ts b/frontend/src/types/tree.ts index 619a6d83..8328163e 100644 --- a/frontend/src/types/tree.ts +++ b/frontend/src/types/tree.ts @@ -139,6 +139,10 @@ export interface ProceduralTreeStructure { steps: ProceduralStep[] } +// API response types +export type TreeStatus = 'draft' | 'published' + +/** Fork lineage metadata. Only present (non-null) on trees that are forks (fork_depth > 0). */ export interface ForkInfo { parent_tree_id: string | null root_tree_id: string | null @@ -148,9 +152,6 @@ export interface ForkInfo { has_parent_updates: boolean } -// API response types -export type TreeStatus = 'draft' | 'published' - export interface Tree { id: string name: string @@ -173,7 +174,7 @@ export interface Tree { created_at: string updated_at: string usage_count: number - fork_info?: ForkInfo | null + fork_info: ForkInfo | null } export interface TreeListItem {