| 1 | package main |
| 2 | |
| 3 | import "reasonix/internal/session" |
| 4 | |
| 5 | // ProjectNode is one node in the sidebar project tree (a project folder or a |
| 6 | // topic leaf). |
| 7 | type ProjectNode struct { |
| 8 | Source *SessionSourceRef `json:"source,omitempty"` |
| 9 | Historical bool `json:"historical,omitempty"` |
| 10 | HistoricalBranch bool `json:"historicalBranch,omitempty"` |
| 11 | PreparationStatus string `json:"preparationStatus,omitempty"` |
| 12 | IdentityAliases []string `json:"identityAliases,omitempty"` |
| 13 | LifecycleGeneration uint64 `json:"lifecycleGeneration,omitempty"` |
| 14 | TabID string `json:"tabId,omitempty"` |
| 15 | Session *session.SessionRef `json:"session,omitempty"` |
| 16 | ParentSession *session.SessionRef `json:"parentSession,omitempty"` |
| 17 | SessionOrigin string `json:"sessionOrigin,omitempty"` |
| 18 | CanArchive bool `json:"canArchive,omitempty"` |
| 19 | Key string `json:"key"` // stable key for React |
| 20 | Kind string `json:"kind"` // "project" | "topic" | "session" | "global_folder" | "global_topic" | "global_session" |
| 21 | Label string `json:"label"` |
| 22 | Root string `json:"root,omitempty"` // project workspace root |
| 23 | TopicID string `json:"topicId,omitempty"` |
| 24 | SessionPath string `json:"sessionPath,omitempty"` |
| 25 | Preview string `json:"preview,omitempty"` |
| 26 | ProjectColor string `json:"projectColor,omitempty"` |
| 27 | Turns int `json:"turns,omitempty"` |
| 28 | TurnsState string `json:"turnsState,omitempty"` |
| 29 | Health string `json:"health,omitempty"` |
| 30 | CreatedAt int64 `json:"createdAt,omitempty"` |
| 31 | LastActivityAt int64 `json:"lastActivityAt,omitempty"` |
| 32 | ResultSequence uint64 `json:"resultSequence,omitempty"` |
| 33 | Open bool `json:"open,omitempty"` |
| 34 | Running bool `json:"running,omitempty"` |
| 35 | Status string `json:"status,omitempty"` |
| 36 | Pinned bool `json:"pinned,omitempty"` |
| 37 | SortOrder int `json:"sortOrder"` // manual topic order index (0-based); -1 when unknown |
| 38 | Recovered bool `json:"recovered,omitempty"` |
| 39 | RecoveryReason string `json:"recoveryReason,omitempty"` |
| 40 | RecoveryDigest string `json:"recoveryDigest,omitempty"` |
| 41 | RecoveryParentID string `json:"recoveryParentId,omitempty"` |
| 42 | RecoveryState string `json:"recoveryState,omitempty"` |
| 43 | RecoveryBranchCount int `json:"recoveryBranchCount,omitempty"` |
| 44 | RecoveryUnresolvedCount int `json:"recoveryUnresolvedCount,omitempty"` |
| 45 | RecoveryCleanupEligibleCount int `json:"recoveryCleanupEligibleCount,omitempty"` |
| 46 | // RecoveryCopyCount is retained for compatibility with older desktop |
| 47 | // frontends. Ordinary project-tree payloads intentionally leave it at zero: |
| 48 | // physical recovery copies are an internal persistence detail. |
| 49 | RecoveryCopyCount int `json:"recoveryCopyCount,omitempty"` |
| 50 | IsolatedWorktree bool `json:"isolatedWorktree,omitempty"` |
| 51 | Remote *RemoteTabRef `json:"remote,omitempty"` |
| 52 | RuntimeOnly bool `json:"runtimeOnly,omitempty"` |
| 53 | Children []ProjectNode `json:"children,omitempty"` |
| 54 | } |
| 55 |