Skip to content

Conversation

@sinelaw
Copy link
Owner

@sinelaw sinelaw commented Dec 5, 2025

Allow opening files with line and column position specified as file.txt:42:10. Handles Windows drive prefixes correctly using std::path APIs. Includes property tests for the parsing logic.

sinelaw and others added 10 commits December 6, 2025 23:29
Allow opening files with line and column position specified as
file.txt:42:10. Handles Windows drive prefixes correctly using
std::path APIs. Includes property tests for the parsing logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…tures (#237)

Switch default highlighting backend from tree-sitter to syntect/TextMate
for broader language coverage. Tree-sitter language detection is preserved
and available via `.language()` for non-highlighting features like
auto-indentation and semantic highlighting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Plugin hooks (after-insert, after-delete) are fired asynchronously to a
separate thread. The plugin state snapshot was only updated in process_async,
which runs during the render cycle. This created a race where the plugin
might read stale state (cursor positions, buffer diffs, etc.) if it executed
before the next render cycle updated the snapshot.

Fix: Update the plugin state snapshot immediately before firing hooks.

Also add SIGINT handler and tracing to the flaky test for debugging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Usage: ./scripts/stress_test.sh <test_name> [iterations] [parallelism]
Example: ./scripts/stress_test.sh e2e::recovery::test_recovery 100 16

Aborts on first failure and dumps the output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Traces added to help debug flaky test_recovery_after_save_with_size_change:
- Buffer::load_from_file: log initial saved_file_size
- Buffer::save: log saved_file_size updates
- auto_save_dirty_buffers: log original_size and final_size
- reconstruct_from_chunks: log expected vs actual file sizes

Also add signal handler and tracing subscriber to the flaky test.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add DirectoryContext struct to centralize all directory paths (data, config,
home, documents, downloads). Only main() constructs from system dirs::*;
all other code receives it via parameter passing.

This fixes flaky tests where parallel tests were sharing the global
~/.local/share/fresh/recovery directory, causing race conditions.

Changes:
- Add DirectoryContext struct in src/config.rs with from_system() and for_testing()
- Update Editor constructors to require DirectoryContext parameter
- Update RecoveryService with with_storage_dir() and with_config_and_dir()
- Update test harness to create isolated temp directories per test
- Add recovery_dir() and take_temp_dir() methods to test harness
- Update recovery e2e tests to use harness's isolated recovery directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Use createVirtualBuffer instead of createVirtualBufferInSplit to open
the config editor as a new tab in the current split rather than creating
a separate split. On close, use closeBuffer to remove the buffer and
auto-switch back to the previous buffer.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Syntect's default grammars don't include TypeScript, so .ts/.tsx files
had no highlighting. Now when TextMate/syntect doesn't have a grammar
for a file type, we fall back to tree-sitter if it supports the language.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
sinelaw and others added 9 commits December 6, 2025 23:30
Language detection for LSP now reads from the user's config.json
languages section instead of using hardcoded extension mappings.
This allows users to add LSP support for any language by configuring
both the language extensions and the LSP server command.

Updated USER_GUIDE.md with instructions for configuring LSP for
new languages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add stderr_log_path field to AsyncMessage::LspError
- Redirect LSP process stderr directly to /tmp/fresh-lsp-{lang}-{pid}.log
- On LSP error, automatically open the stderr log as a read-only buffer
- Remove async stderr reader task (direct file redirect is more efficient)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add shutting_down flag (Arc<AtomicBool>) that is set before processing
LspCommand::Shutdown. The stdout reader checks this flag and skips
emitting LspError/LspStatusUpdate when the shutdown was intentional.

This prevents:
- Error messages appearing in status bar on graceful shutdown
- Stderr log file opening automatically on graceful shutdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
When the path + input exceeds 90% of the prompt width, the path is now
truncated to show the first component, a highlighted [...], and the last
components that fit. For example:
  /private/var/folders/.../T/.tmpXXX/project/ becomes
  /private/[...]/project/

This fixes test failures on macOS where temp paths can be very long.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
It interfers with tests where the log file suddenly opens.

Also add traces in test_typescript_interface_indent
- Use std::env::temp_dir() instead of hardcoded /tmp/ path in test_write_file
- Remove Unix-specific absolute path check in test_get_cwd

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Use Windows API (OpenProcess + GetExitCodeProcess) to properly check
if a process is running, fixing test_session_lock_lifecycle on Windows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Windows support is experimental; allow tests to fail without blocking PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@sinelaw sinelaw merged commit 0f35b66 into master Dec 6, 2025
15 of 16 checks passed
@sinelaw sinelaw deleted the pathline branch December 6, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants