@fresh-editor/fresh-editor 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Release Notes
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Features
6
+
7
+ * **Persistent Auto-Save**: New `auto_save_enabled` config option (default: false) to automatically save modified buffers to their original file at a configurable interval (`auto_save_interval_secs`, default: 30s) (#542)
8
+
9
+ * **Smart Home**: Home key now uses smart home behavior by default, toggling between the first non-whitespace character and column 0. On soft-wrapped lines, smart home respects visual line boundaries instead of jumping to the physical line start (#1064).
10
+
11
+ ### Bug Fixes
12
+
13
+ * **Diff View Scrollbar**: Fixed scrollbar click-to-jump and thumb drag not working in side-by-side diff views. Composite buffer views now use row-based scrolling via CompositeViewState.
14
+
15
+ * **Terminal Bracket Paste**: Fixed pasted text going into the editor buffer instead of the terminal PTY when in terminal mode (#1056).
16
+
17
+ * **LSP did_open Reliability**: Fixed buffer being incorrectly marked as LSP-opened when the did_open send fails, which prevented retry and could corrupt server document state.
18
+
19
+ * **Remote Editing Data Loss**: Fixed intermittent data loss when loading large files via SSH remote editing on macOS. The bounded channel now uses backpressure instead of silently dropping data when the buffer overflows (#1059).
20
+
21
+ ### Configuration
22
+
23
+ * Renamed `auto_save_interval_secs` (recovery) to `auto_recovery_save_interval_secs` to distinguish it from the new persistent auto-save feature. Added `auto_recovery_save_interval_secs` config option (default: 2s).
24
+
25
+ ### Internal
26
+
27
+ * Introduced typed `LeafId` and `ContainerId` wrappers around `SplitId` to enforce leaf-vs-container constraints at compile time.
28
+ * Enabled `#![deny(clippy::let_underscore_must_use)]` crate-wide; all ignored `Result` values now have explicit annotations or proper error handling.
29
+ * Made `request_completion` and `request_signature_help` infallible, removing dead `Result` return types.
30
+ * Added CONTRIBUTING.md with development guidelines.
31
+
32
+ ---
33
+
3
34
  ## 0.2.4
4
35
 
5
36
  ### Features
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A modern, full-featured terminal text editor, **with zero configuration**. Familiar keybindings, mouse support, and IDE-level features — no learning curve required.
4
4
 
5
- [Official Website](https://sinelaw.github.io/fresh/)  ·  [Documentation](https://getfresh.dev/docs)  ·  [Discord](https://discord.gg/qUutBj9t)  ·  [Contributing](#contributing)
5
+ [Official Website](https://sinelaw.github.io/fresh/)  ·  [Documentation](https://getfresh.dev/docs)  ·  [Discord](https://discord.gg/GpNWqMUH)  ·  [Contributing](#contributing)
6
6
 
7
7
  **[Quick Install](#installation):**   `curl https://raw.githubusercontent.com/sinelaw/fresh/refs/heads/master/scripts/install.sh | sh`
8
8
 
@@ -240,30 +240,7 @@ cargo build --release
240
240
 
241
241
  ## Contributing
242
242
 
243
- Thanks for contributing!
244
-
245
- 1. **Reproduce Before Fixing**: Always include a test case that reproduces the bug (fails) without the fix, and passes with the fix. This ensures the issue is verified and prevents future regressions.
246
-
247
- 2. **E2E Tests for New Flows**: Any new user flow or feature must include an end-to-end (e2e) test. E2E tests send keyboard/mouse events and examines the final rendered output, do not examine internal state.
248
-
249
- 3. **No timeouts or time-sensitive tests**: Use "semantic waiting" (waiting for specific state changes/events) instead of fixed timers to ensure test stability. Wait indefinitely, don't put timeouts inside tests (cargo nextest will timeout externally).
250
-
251
- 4. **Test isolation**: Tests should run in parallel. Use the internal clipboard mode in tests to isolate them from the host system and prevent flakiness in CI. Same for other external resources (temp files, etc. should all be isolated between tests, under a per-test temporary workdir).
252
-
253
- 5. **Required Formatting**: All code must be formatted with `cargo fmt` before submission. PRs that fail formatting checks will not be merged.
254
-
255
- 6. **Cross-Platform Consistency**: Avoid hard-coding newline or CRLF related logic, consider the buffer mode.
256
-
257
- 7. **LSP**: Ensure LSP interactions follow the correct lifecycle (e.g., `didOpen` must always precede other requests to avoid server-side errors). Use the appropriate existing helpers for this pattern.
258
-
259
- 8. **Regenerate plugin types and schemas**: After modifying the plugin API or config types:
260
- - **TypeScript definitions** (`plugins/lib/fresh.d.ts`): Auto-generated from Rust types with `#[derive(TS)]`. Run: `cargo test -p fresh-plugin-runtime write_fresh_dts_file -- --ignored`
261
- - **JSON schemas** (`plugins/config-schema.json`, `plugins/schemas/theme.schema.json`): Auto-generated from Rust types with `#[derive(JsonSchema)]`. Run: `./scripts/gen_schema.sh`
262
- - **Package schema** (`plugins/schemas/package.schema.json`): Manually maintained - edit directly when adding new language pack fields
263
-
264
- 9. **Type check plugins**: Run `crates/fresh-editor/plugins/check-types.sh` (requires `tsc`)
265
-
266
- **Tip**: You can use tmux + send-keys + render-pane to script ad-hoc tests on the UI, for example when trying to reproduce an issue.
243
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
267
244
 
268
245
  ## Privacy
269
246
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fresh-editor/fresh-editor",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "A modern terminal-based text editor with plugin support",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,8 +58,10 @@
58
58
  "mouse_hover_enabled": true,
59
59
  "mouse_hover_delay_ms": 500,
60
60
  "double_click_time_ms": 500,
61
+ "auto_save_enabled": false,
62
+ "auto_save_interval_secs": 30,
61
63
  "recovery_enabled": true,
62
- "auto_save_interval_secs": 2,
64
+ "auto_recovery_save_interval_secs": 2,
63
65
  "auto_revert_poll_interval_ms": 2000,
64
66
  "keyboard_disambiguate_escape_codes": true,
65
67
  "keyboard_report_event_types": false,
@@ -388,14 +390,28 @@
388
390
  "default": 500,
389
391
  "x-section": "Mouse"
390
392
  },
393
+ "auto_save_enabled": {
394
+ "description": "Whether to enable persistent auto-save (save to original file on disk).\nWhen enabled, modified buffers are saved to their original file path\nat a configurable interval.\nDefault: false",
395
+ "type": "boolean",
396
+ "default": false,
397
+ "x-section": "Recovery"
398
+ },
399
+ "auto_save_interval_secs": {
400
+ "description": "Interval in seconds for persistent auto-save.\nModified buffers are saved to their original file at this interval.\nOnly effective when auto_save_enabled is true.\nDefault: 30 seconds",
401
+ "type": "integer",
402
+ "format": "uint32",
403
+ "minimum": 0,
404
+ "default": 30,
405
+ "x-section": "Recovery"
406
+ },
391
407
  "recovery_enabled": {
392
408
  "description": "Whether to enable file recovery (Emacs-style auto-save)\nWhen enabled, buffers are periodically saved to recovery files\nso they can be recovered if the editor crashes.",
393
409
  "type": "boolean",
394
410
  "default": true,
395
411
  "x-section": "Recovery"
396
412
  },
397
- "auto_save_interval_secs": {
398
- "description": "Auto-save interval in seconds for file recovery\nModified buffers are saved to recovery files at this interval.\nDefault: 2 seconds for fast recovery with minimal data loss.\nSet to 0 to disable periodic auto-save (manual recovery only).",
413
+ "auto_recovery_save_interval_secs": {
414
+ "description": "Interval in seconds for auto-recovery-save.\nModified buffers are saved to recovery files at this interval.\nOnly effective when recovery_enabled is true.\nDefault: 2 seconds",
399
415
  "type": "integer",
400
416
  "format": "uint32",
401
417
  "minimum": 0,