Commit Graph

11 Commits

Author SHA1 Message Date
Haapy
366aaa6ef4 Icons — toolbar buttons are now 32×32 line-icon buttons (paper/document for note, terminal-prompt for terminal, globe
for website). Tooltips on hover show label + shortcut. SVGs are inline in src/canvas/icons.tsx, using currentColor so
  they inherit the text color.

  Embed website — new WebCard kind:
  - Click the globe → prompt() for URL (auto-prepends https:// if missing).
  - Card layout: header (title or hostname) → URL bar (monospace, Enter to navigate, Esc to cancel) → iframe sandboxed
  with allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox.
  - Right-click the header to rename. Sites with X-Frame-Options: DENY won't render — that's the iframe-route caveat I
  mentioned; we can upgrade to a real Tauri Webview later if too many sites are blocked.

  Shortcuts — all gated on !isInEditable(activeElement) so they don't fire while typing in CodeMirror, an input, or
  xterm:
  - Ctrl/Cmd+D — duplicate the top-z card (terminals get a fresh shell, same position+28px, same title)
  - Ctrl/Cmd+N — new note
  - Ctrl/Cmd+T — new terminal
  - Delete / Backspace — close the top-z card

  "Top-z card" = the one most recently clicked or just created, which matches the "click to focus" model we already
  have. To duplicate a terminal: click its header to focus, then Ctrl+D — xterm itself doesn't get the keystroke because
   the header isn't an editable target.
2026-05-15 12:07:48 +00:00
Haapy
66ea8b2b69 MULTI-BOARD ! 2026-05-15 11:57:12 +00:00
Haapy
092d27beab 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.
2026-05-15 11:40:36 +00:00
Haapy
595666e94b Added Markdown preview 2026-05-15 11:16:45 +00:00
Haapy
6a4f4b4aa9 test again 2026-05-14 23:26:02 +00:00
Haapy
b496914b3c addition 2026-05-14 22:51:36 +00:00
Haapy
c3552d08b9 new additions : What's new
 Rust PTY backend (portable-pty)
     - pty_spawn / pty_write / pty_resize / pty_kill commands
     - Output streamed via pty:data Tauri events (base64-encoded bytes)
     - Spawns /bin/bash (falls back to /bin/bash), starts in /home/code
   xterm.js terminal card (full ANSI + true color)
   Toolbar (top-left) with + Note / + Terminal
   Shared useDragHandle hook (notes + terminals)
   Terminal font-size scales with canvas zoom → crisp at any zoom
   Terminal auto-refits when card resizes or zoom changes
2026-05-14 22:22:18 +00:00
Haapy
eaeb4c2d92 fix zomming 2026-05-14 22:12:32 +00:00
Haapy
a858a3415d fix error 2026-05-14 22:08:14 +00:00
Haapy
fe9f3681fd test 2026-05-14 22:00:34 +00:00
Haapy
259959d713 Initial commit 2026-05-14 21:08:13 +00:00