[{"data":1,"prerenderedAt":266},["ShallowReactive",2],{"navigation_docs":3,"-architecture-sessions":92,"-architecture-sessions-surround-resolved":258,"daily-note-surround--architecture-sessions":95},[4,9,35,66,82,87],{"title":5,"path":6,"stem":5,"icon":7,"order":8},"Home","/home","i-lucide-home",0,{"title":10,"icon":11,"order":12,"path":13,"stem":14,"children":15,"page":34},"Guide","i-lucide-book-open",1,"/guide","1.guide",[16,22,28],{"title":17,"path":18,"stem":19,"icon":20,"order":21},"Installation","/guide/installation","1.guide/1.installation","i-lucide-download",10,{"title":23,"path":24,"stem":25,"icon":26,"order":27},"Usage","/guide/usage","1.guide/2.usage","i-lucide-layers",20,{"title":29,"path":30,"stem":31,"icon":32,"order":33},"Configuration","/guide/configuration","1.guide/3.configuration","i-lucide-settings",30,false,{"title":36,"icon":26,"order":37,"path":38,"stem":39,"children":40,"page":34},"Architecture",2,"/architecture","2.architecture",[41,45,50,55,61],{"title":42,"path":43,"stem":44,"icon":26,"order":21},"Overview","/architecture/overview","2.architecture/1.overview",{"title":46,"path":47,"stem":48,"icon":49,"order":27},"Ghostty","/architecture/ghostty","2.architecture/2.ghostty","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54,"order":33},"Sessions","/architecture/sessions","2.architecture/3.sessions","i-lucide-layout-grid",{"title":56,"path":57,"stem":58,"icon":59,"order":60},"Shell Integration","/architecture/shell-integration","2.architecture/4.shell-integration","i-lucide-plug",40,{"title":62,"path":63,"stem":64,"icon":54,"order":65},"Widget","/architecture/widget","2.architecture/5.widget",50,{"title":67,"icon":68,"order":69,"path":70,"stem":71,"children":72,"page":34},"Development","i-lucide-wrench",3,"/development","3.development",[73,77],{"title":74,"path":75,"stem":76,"icon":68,"order":21},"Building","/development/building","3.development/1.building",{"title":78,"path":79,"stem":80,"icon":81,"order":27},"Distribution","/development/distribution","3.development/2.distribution","i-lucide-package",{"title":83,"path":84,"stem":83,"icon":85,"order":86},"Changelog","/changelog","i-lucide-history",98,{"title":88,"path":89,"stem":88,"icon":90,"order":91},"About","/about","i-lucide-info",99,{"id":93,"title":94,"aliases":95,"body":96,"concluded":95,"date":95,"description":252,"documentation":95,"extension":253,"isBase":34,"links":95,"meta":254,"mtime":95,"navigation":255,"order":33,"outcome":95,"path":52,"project":95,"repository":95,"seo":256,"started":95,"status":95,"stem":53,"tags":95,"team":95,"type":95,"__hash__":257},"docs/2.architecture/3.sessions.md","Sessions & Workspaces",null,{"type":97,"value":98,"toc":246},"minimark",[99,104,117,123,127,130,146,149,181,185,192,211,221,225,230,240],[100,101,103],"h2",{"id":102},"workspaces","Workspaces",[105,106,107,108,112,113,116],"p",{},"Each native macOS window and each native tab is backed by a ",[109,110,111],"code",{},"KytosWorkspace"," — an ",[109,114,115],{},"@Observable"," model holding a split tree of panes plus the focused pane.",[105,118,119,122],{},[109,120,121],{},"KytosAppModel"," manages the mapping from window/tab UUIDs to workspaces.",[100,124,126],{"id":125},"persistence","Persistence",[105,128,129],{},"At shutdown, Kytos persists:",[131,132,133,140],"ul",{},[134,135,136,139],"li",{},[109,137,138],{},"KytosAppModel_Windows_v7"," — the full workspace map (all windows, all panes)",[134,141,142,145],{},[109,143,144],{},"KytosAppModel_TabGroups_v1"," — native tab groupings",[105,147,148],{},"On relaunch:",[150,151,152,159,165,171,174],"ol",{},[134,153,154,155,158],{},"SwiftUI/AppKit restores each ",[109,156,157],{},"NSWindow"," via state restoration",[134,160,161,162],{},"Each window's UUID is restored by ",[109,163,164],{},"WindowGroup(for: UUID.self)",[134,166,167,170],{},[109,168,169],{},"KytosAppModel.workspace(for:)"," reconnects the UUID to its workspace",[134,172,173],{},"UUID remapping handles cases where SwiftUI assigns new UUIDs on restore",[134,175,176,177,180],{},"Tab groups are replayed via ",[109,178,179],{},"addTabbedWindow"," after windows register",[100,182,184],{"id":183},"tab-restoration","Tab Restoration",[105,186,187,188,191],{},"Tab restoration uses a retry loop (",[109,189,190],{},"attemptPendingTabRestoration",") that:",[150,193,194,197,200,203,208],{},[134,195,196],{},"Fires every 0.1s, up to 40 attempts",[134,198,199],{},"Waits for all windows in a group to register",[134,201,202],{},"Orders them front",[134,204,205,206],{},"Groups them with ",[109,207,179],{},[134,209,210],{},"Skips if AppKit already grouped them",[105,212,213,216,217,220],{},[109,214,215],{},"restoredWindowIDRemap"," and ",[109,218,219],{},"remapPendingTabGroups"," keep tab group data consistent when UUIDs change during restoration.",[100,222,224],{"id":223},"widget-snapshots","Widget Snapshots",[105,226,227,229],{},[109,228,121],{}," writes a JSON snapshot to the widget's sandbox container after state changes:",[231,232,237],"pre",{"className":233,"code":235,"language":236},[234],"language-text","~/Library/Containers/me.jwintz.Kytos.KytosWidget/Data/Library/Application Support/Kytos/widget-snapshot.json\n","text",[109,238,235],{"__ignoreMap":239},"",[105,241,242,245],{},[109,243,244],{},"WidgetCenter.shared.reloadAllTimelines()"," is called immediately after writing.",{"title":239,"searchDepth":69,"depth":69,"links":247},[248,249,250,251],{"id":102,"depth":37,"text":103},{"id":125,"depth":37,"text":126},{"id":183,"depth":37,"text":184},{"id":223,"depth":37,"text":224},"Window management, tab restoration, and state persistence","md",{"icon":54},{"title":51,"icon":54,"order":33},{"title":94,"description":252},"L5w0a7emXIU8MCoDq4f2dGxIFDMsQZojuRn3zVEVXsw",[259,263],{"title":260,"description":261,"path":47,"navigation":262},"Ghostty Integration","How libghostty is embedded and driven",{"title":46,"icon":49,"order":27},{"title":56,"description":264,"path":57,"navigation":265},"OSC escape sequences, resource detection, and live UI updates",{"title":56,"icon":59,"order":60},1774809103290]