Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Added

- Multi-window editing with one independently autosaved presentation per editor window, per-editor presentation/debug windows, duplicate-file focusing, and cross-platform file-open routing

## [1.2.0] - 2026-08-24

### Added
Expand Down
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ twig follows Electron's standard architecture:
2. **Preload Script** (`src/preload/index.ts`): Bridge layer that safely exposes IPC handlers to the renderer via `contextBridge`
3. **Renderer Process** (`src/renderer/`): Svelte application running in the browser context

### Multi-Window Ownership (`src/main/editorWindowManager.ts`)

- Every editor renderer owns exactly one committed presentation and may temporarily reserve one replacement path while opening or saving.
- Canonical path identities prevent the same `.tb` file from being owned by multiple editor windows.
- Presentation and debug windows are scoped to an owning editor; their IPC must always route through that owner.
- Each editor runs in a separate renderer process, so the module-level Svelte state remains isolated per window.

### Database Layer (`src/main/db.ts`)

- Uses better-sqlite3 for synchronous SQLite operations
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Presentations are stored as `.tb` files — plain SQLite databases. No cloud req

## Status

twig is in active development. It handles the essentials — editing, alignment guides, transitions, animations, custom fonts, backgrounds — and works well for day-to-day use.
twig is in active development. It handles the essentials — editing, multi-window workflows, alignment guides, transitions, animations, custom fonts, backgrounds — and works well for day-to-day use.

On the roadmap: templates, element grouping, and more transitions and animation types.

Expand Down
2 changes: 1 addition & 1 deletion src/main/db/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function validateFilePath(filePath: unknown): asserts filePath is string
if (!isAbsolute(filePath)) {
throw new Error('File path must be absolute')
}
if (!filePath.endsWith('.tb')) {
if (!filePath.toLowerCase().endsWith('.tb')) {
throw new Error('Invalid file extension. Expected .tb file')
}
const normalized = normalize(filePath)
Expand Down
Loading