What persists: every card (kind, position, size, title, note text, ptyId, z-order) + viewport pan/zoom + maxZ counter,
in a single board.json under app_data_dir() (~/.local/share/{appName}/board.json on Linux).
Write pattern: tmp file + atomic rename, debounced 400ms. A crash mid-write can't corrupt the existing file; worst
case you lose ~400ms of recent edits.
Read pattern: load on app start, gate the Canvas render on the result. Missing file → default welcome board. Parse
error → log and fall back to default (won't overwrite the bad file until the user makes changes; actually it will save
over it after the next change — if you want to preserve a corrupt file for recovery that's a one-line tweak).
Terminal caveat: live PTY processes die with the app session, so sanitize() in App.tsx clears every terminal card's
ptyId on load. Each terminal card respawns a fresh shell on mount via the existing pty.spawn path. The card's
position, size, and title are preserved.
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infinite</title>
|
||||
<script type="module" crossorigin src="/assets/index-D6iqmLrm.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BRF-Y_tu.css">
|
||||
<script type="module" crossorigin src="/assets/index-DxdHmf_Q.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BZPHLDSC.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user