JSLab feature notes: one docs page, explained. Today: Your first tab.
A scratchpad lives or dies on one question: is my stuff still there tomorrow? In JSLab, a JavaScript & TypeScript scratchpad for macOS, the answer is yes, and this note covers how.
Session restore
Quit JSLab and relaunch, and it brings back:
- your tabs and their code;
- each tab's layout, folds, cursor and scroll position;
- the window's size and the display it was on.
Also kept per tab: its working directory and whether its Web View is showing. Each tab's AI Chat conversation comes back too.
The session lives in session.json in JSLab's data folder. If that file can't be read, JSLab restores it from its backup when it can and tells you. A tab whose contents can't be read opens empty and read-only, so JSLab never saves over the file on disk.
Updates use the same mechanism: restarting to update relaunches JSLab with your tabs as they were.
Tabs
| To | Do this |
|---|---|
| Open a blank tab | ⌘T |
| Pick what a new tab is for | + in the tab bar |
| Close the tab | ⌘W |
| Reopen the tab you closed | ⇧⌘T |
| Close every other tab | ⌥⌘T |
| Jump to a tab | ⌘1 to ⌘8, ⌘9 for the last |
Drag to reorder. Closing the last tab opens a fresh one instead of quitting. A scratch tab is titled from its first line of code; Rename… sets your own title.
The + button asks what the tab is for: Plain JavaScript, Plain TypeScript, React, Vue, Solid or Angular. That sets the language, runtime and framework, installs what's needed and opens starter code.
Files
Open… (⌘O), Save (⌘S) and Save As… (⇧⌘S) work with .js, .jsx, .ts, .tsx, .mjs, .cjs, .mts, .cts, .json and .txt. Drop files on the window and each opens in a new tab. From a terminal, jslab file.ts does the same.
A few guard rails:
- JSLab asks before it opens or pastes more than 5 MB, and won't open a file over 50 MB.
- Closing a tab with unsaved changes asks whether to save. Confirm Close (Settings → General) asks before closing any tab.
- A saved tab's right-click menu has Copy Path and Reveal in Finder.
JSLab launches Nov 15. The full page: https://js-lab.app/docs/first-tab


