frank 2c03e691e8
CI / TypeScript Lint + Typecheck (push) Successful in 22s
CI / Rust Format (push) Successful in 28s
CI / Rust Tests + Coverage (push) Successful in 38s
CI / TypeScript Tests + Coverage (push) Successful in 46s
Release Builds / macOS Apple Silicon Electron Build (push) Successful in 1m28s
CI / Clippy (SARIF) (push) Successful in 1m52s
Release Builds / Windows Electron Build (push) Successful in 2m53s
CI / Electron Release Build (push) Successful in 2m17s
Release Builds / Publish Gitea Release (push) Has been skipped
CI / SonarQube (push) Successful in 1m8s
CI / E2E Tests (Playwright + Electron) (push) Successful in 2m53s
CI / Dependency-Track (BOM) (push) Failing after 10m32s
Merge pull request 'fixing issues reported by SQ and adding test coverage.' (#9) from sq_fixes into master
Reviewed-on: #9
2026-05-10 16:55:33 -04:00
2026-05-07 15:39:27 -04:00
2026-04-12 17:14:34 -04:00
2026-05-08 01:12:44 -04:00
2026-05-08 04:47:46 -04:00
2026-05-08 01:12:44 -04:00
2026-05-10 15:02:07 -04:00
2026-05-07 15:39:27 -04:00
2026-05-08 00:42:34 -04:00
2026-04-05 19:14:26 -04:00
2026-05-08 00:54:56 -04:00
2026-05-08 00:54:56 -04:00
2026-05-08 05:19:52 -04:00
2026-05-08 04:47:46 -04:00
2026-05-08 04:47:46 -04:00
2026-05-08 01:08:01 -04:00

ByteDraft

ByteDraft is a specialized, performance-oriented editor designed for viewing, editing, and formatting structured data files. Built with Electron, a React/TypeScript frontend, and a Rust core (byte_draft), it provides a lightweight, Notepads-inspired IDE experience for developers who need to quickly work with JSON, YAML, TOML, XML, Markdown, and source files.

Features

  • Tabs in Title Bar: Minimal Notepads-style chrome — tabs live directly in the title bar for maximum content space.
  • Embedded Menu: App menu () replaces the native OS menu bar, giving a consistent cross-platform look.
  • Multi-Document Interface: Draggable, reorderable tabs with dirty-file indicators.
  • Syntax Highlighting: Full token-level highlighting via CodeMirror 6 for Rust, Python, JS/TS, Go, JSON, YAML, TOML, XML, Markdown, Shell, CSS, HTML, C/C++, Java, and more.
  • Markdown Live Preview: Split source/preview or preview-only mode with scroll synchronisation.
  • Hex Viewer: Built-in binary/hex viewer for non-text files.
  • Workspace Explorer: Folder tree sidebar with file-type icons and keyboard navigation.
  • Theme System: Six built-in colour presets (Notepads Dark default, One Dark, Dracula, GitHub Dark, Solarized Dark, Gruvbox Dark) with per-colour customisation in Preferences.
  • Advanced Find/Replace: Regex and case-sensitive search with match highlighting.
  • Command Palette: ⌘P fuzzy launcher for files and actions.
  • Session Persistence: Remembers open tabs, workspace, and theme between launches.

Getting Started

Prerequisites

  • Rust 1.75+ — rustup.rs
  • Node.js 20+ and npm
  • Linux (Electron runtime): GTK and related libraries (typical desktop Electron deps; see Electron docs for your distro).

Development

Install UI dependencies:

cd ui && npm install

Install root and E2E dependencies (from repo root):

npm install
cd e2e && npm install && cd ..

Run the desktop app (Vite + Electron):

npm run electron:dev

Build a packaged app (Rust CLI release + Vite + Electron Forge):

npm run electron:build

Run UI unit tests:

cd ui && npm test

Version bump

The app version is shared across the Rust workspace (Cargo.toml [workspace.package]), root package.json, and ui/package.json. Bump all of them in one step:

npm run version:set -- 0.4.0

Release workflow artifacts are named bytedraft-<platform>-<major>.<minor>.<run_number> (see .gitea/workflows/release-builds.yml).

Hotkeys

Command macOS Windows/Linux
New Tab ⌘T Ctrl+T
Open File ⌘O Ctrl+O
Save ⌘S Ctrl+S
Save As ⌘⇧S Ctrl+Shift+S
Close Tab ⌘W Ctrl+W
Find/Replace ⌘F Ctrl+F
Toggle Sidebar ⌘B Ctrl+B
Command Palette ⌘P Ctrl+P
Preferences ⌘, Ctrl+,
App Menu click in title bar click in title bar

Architecture

┌──────────────────────────────────────────────┐
│  React 19 + Vite (ui/)                       │
│  ├─ TitleBar     tabs + drag region + menu   │
│  ├─ AppMenu      embedded hamburger menu     │
│  ├─ Editor       CodeMirror 6                │
│  ├─ FileTree     workspace sidebar + icons   │
│  ├─ MarkdownPreview  split / preview mode    │
│  ├─ StatusBar    language · encoding · pos   │
│  └─ Preferences  theme + editor settings     │
│  Zustand stores: editorStore, uiStore,       │
│                  sessionStore                │
└────────────────────────────────────────────┘
           ↓ window.api (contextBridge)
┌──────────────────────────────────────────────┐
│  Electron main + preload (electron/)         │
│  Native dialogs, window chrome, IPC bridge   │
└────────────────────────────────────────────┘
           ↓ JSON subprocess (stdin/stdout)
┌──────────────────────────────────────────────┐
│  byte_draft_desktop CLI (Rust)             │
│  File · session · workspace · editor ops    │
└────────────────────────────────────────────┘
           ↓
┌──────────────────────────────────────────────┐
│  byte_draft core (encoding, language, I/O)   │
└────────────────────────────────────────────┘

Troubleshooting

Linux / WSL: File Dialogs Not Appearing

Install a portal backend and restart where applicable:

sudo apt install xdg-desktop-portal-gtk
wsl --shutdown   # WSL only

macOS: Window Dragging

The title bar uses data-electron-drag-region zones. Drag from the blank strips next to the menu button or before the right-side controls (not on tabs or buttons).

Security & Auditing

  • audit.toml / deny.toml: Prevent insecure Rust dependencies.
  • Security Scan: scripts/security-scan.ps1 (PowerShell) for local audits.

License

MIT OR Apache-2.0, at your option.

S
Description
No description provided
Readme 4.6 MiB
2026-05-08 06:19:17 -04:00
Languages
TypeScript 63.7%
Rust 24%
JavaScript 4.5%
PowerShell 4.1%
Python 2.2%
Other 1.5%