Skip to content

Commit c39ecdc

Browse files
committed
Strip em dashes from docs and comments (45 files, 327 occurrences)
1 parent 0d84e4e commit c39ecdc

45 files changed

Lines changed: 329 additions & 329 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/api-server/src/error-report-eviction.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ describe('tryEvict', () => {
231231

232232
it('evicts oldest by key date prefix, then upload time for ties', async () => {
233233
const objs: StubObj[] = [
234-
// Same day two uploads with different upload times
234+
// Same day: two uploads with different upload times
235235
{
236236
key: `${ERROR_REPORT_PREFIX}2026-04-01/ERR-AAAAA-u.zip`,
237237
size: 2 * GB,

apps/desktop/src-tauri/src/commands/e2e.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
/// Returns the `CMDR_E2E_START_PATH` env var if set.
44
/// The frontend uses this to override startup paths for E2E tests.
5-
/// Always compiled in — reading an unset env var is a no-op in production.
5+
/// Always compiled in. Reading an unset env var is a no-op in production.
66
#[tauri::command]
77
#[specta::specta]
88
pub fn get_e2e_start_path() -> Option<String> {
@@ -27,7 +27,7 @@ pub fn set_test_throttle(ms: Option<u64>) -> Result<(), String> {
2727
///
2828
/// The notify-debouncer-full crate buffers events for `DEBOUNCE_MS` (200 ms by
2929
/// default), plus the OS itself coalesces FSEvents on macOS over a longer
30-
/// window so a single FS mutation can take 1–10 s to land in the UI. For
30+
/// window, so a single FS mutation can take 1–10 s to land in the UI. For
3131
/// tests, that's pure waste.
3232
///
3333
/// This command sidesteps the debouncer: it iterates every active listing and

apps/desktop/src-tauri/src/commands/search.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub async fn prepare_search_index(app: tauri::AppHandle) -> Result<PrepareResult
4646
h.abort();
4747
}
4848
state.idle_timer = None;
49-
// Reset backstop timer the previous session's timer may still
49+
// Reset backstop timer; the previous session's timer may still
5050
// be ticking and could fire while the dialog is open.
5151
if let Some(ref h) = state.backstop_timer {
5252
h.abort();
@@ -57,7 +57,7 @@ pub async fn prepare_search_index(app: tauri::AppHandle) -> Result<PrepareResult
5757
entry_count: state.index.entries.len() as u64,
5858
});
5959
}
60-
// Stale drop and reload below
60+
// Stale: drop and reload below
6161
}
6262
}
6363

@@ -204,7 +204,7 @@ pub async fn search_files(mut query: SearchQuery) -> Result<SearchResult, String
204204
}
205205
true
206206
});
207-
// total_count is approximate after post-filtering the true count
207+
// total_count is approximate after post-filtering; the true count
208208
// would require fetching dir_stats for ALL matching directories, which
209209
// is too expensive. The displayed count may overestimate slightly.
210210
result.total_count = result.entries.len() as u32;
@@ -216,7 +216,7 @@ pub async fn search_files(mut query: SearchQuery) -> Result<SearchResult, String
216216
result.entries.truncate(limit);
217217
}
218218

219-
// Check generation staleness trigger background reload if needed
219+
// Check generation staleness; trigger background reload if needed
220220
let current_gen = WRITER_GENERATION.load(Ordering::Relaxed);
221221
if index.generation != current_gen {
222222
log::debug!(

apps/desktop/src-tauri/src/commands/volumes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::volumes::{self, DEFAULT_VOLUME_ID, LocationCategory, VolumeInfo, Volu
99

1010
/// Result of resolving a path to its containing volume.
1111
/// Unlike `TimedOut<Option<VolumeInfo>>`, `timed_out: true` means "the filesystem
12-
/// didn't respond, we genuinely don't know" not "here's a fallback."
12+
/// didn't respond, we genuinely don't know" (not "here's a fallback").
1313
#[derive(Debug, Clone, Serialize, specta::Type)]
1414
#[serde(rename_all = "camelCase")]
1515
pub struct PathVolumeResolution {

apps/desktop/src-tauri/src/error_reporter/bundle_builder.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! timestamp, packs into a `BTreeMap`, then calls [`build_zip`].
99
//!
1010
//! Public entry point is [`build_bundle`], which dispatches on the scope. Capping is in
11-
//! the sibling [`super::bundle_capper`] moduleFlow A enforces the cap inline, Flow B
11+
//! the sibling [`super::bundle_capper`] module. Flow A enforces the cap inline; Flow B
1212
//! relies on a post-build trim from the auto-dispatcher.
1313
1414
use super::tail_walker;
@@ -36,7 +36,7 @@ const SAMPLE_LAST_LINES: usize = 20;
3636
const FLOW_B_PRE_ERROR_WINDOW: chrono::Duration = chrono::Duration::minutes(30);
3737

3838
/// One log file selected for inclusion: redacted lines plus the source file's mtime
39-
/// (used to date the zip entry without an explicit mtime, `zip` writes 1980-01-01).
39+
/// (used to date the zip entry; without an explicit mtime, `zip` writes 1980-01-01).
4040
#[derive(Debug, Clone)]
4141
pub(super) struct PreparedFile {
4242
pub(super) lines: Vec<String>,
@@ -46,7 +46,7 @@ pub(super) struct PreparedFile {
4646
/// Build an error report bundle in memory. No network. No disk writes (except reading logs).
4747
///
4848
/// `user_note` is trimmed and dropped if empty. Callers are expected to cap its length
49-
/// (the commands layer enforces 100 000 chars) we store it verbatim.
49+
/// (the commands layer enforces 100 000 chars); we store it verbatim.
5050
///
5151
/// `scope` controls which log content makes it into the bundle. See [`BundleScope`].
5252
///
@@ -202,7 +202,7 @@ pub(super) fn build_bundle_streaming(
202202

203203
if walk.lines.is_empty() {
204204
// If we bailed at the cutoff with no lines, older rotations would be
205-
// older still — stop walking entirely.
205+
// older still. Stop walking entirely.
206206
if walk.hit_cutoff {
207207
break;
208208
}
@@ -241,7 +241,7 @@ pub(super) fn build_bundle_streaming(
241241

242242
// Mid-file cap check. The deflater holds an internal buffer of up to ~64 KB
243243
// that hasn't been flushed to the cursor yet, so the counter is a lower
244-
// bound on the eventual on-disk size — there's a small overshoot risk on
244+
// bound on the eventual on-disk size. There's a small overshoot risk on
245245
// the order of one chunk + the central directory tail (~few hundred bytes
246246
// per entry). Both are well inside the cap's headroom.
247247
let bytes_so_far = counter.load(std::sync::atomic::Ordering::Relaxed) as usize;
@@ -279,7 +279,7 @@ pub(super) fn build_bundle_streaming(
279279
/// `Write::write` call. Lets the streaming zip pipeline poll the running compressed
280280
/// byte count without taking an unsafe `get_mut()` borrow on the `ZipWriter`.
281281
///
282-
/// The counter measures bytes the `zip` crate emitted to the cursor i.e. compressed
282+
/// The counter measures bytes the `zip` crate emitted to the cursor, i.e. compressed
283283
/// payload + per-entry headers up to the last deflate flush. The crate's internal
284284
/// deflate buffer (up to ~64 KB) lags behind, so callers should treat the counter as a
285285
/// lower bound on the final size and budget conservatively.
@@ -331,7 +331,7 @@ fn build_bundle_legacy_window(
331331
now_system: SystemTime,
332332
salt: &[u8],
333333
) -> Result<BuiltBundle, String> {
334-
// BTreeMap so zip order is deterministic same inputs, same bytes out. Matters for
334+
// BTreeMap so zip order is deterministic: same inputs, same bytes out. Matters for
335335
// the preview hash and for byte-level tests.
336336
let mut prepared: BTreeMap<String, PreparedFile> = BTreeMap::new();
337337
let mut total_redacted_lines: usize = 0;
@@ -386,7 +386,7 @@ fn build_bundle_legacy_window(
386386
///
387387
/// Returns `None` if the file can't be opened or its mtime can't be read; returns
388388
/// `Some((lines, mtime))` otherwise. `lines` may be empty if the entire file was
389-
/// outside the scope window — callers drop empty results so the bundle doesn't ship
389+
/// outside the scope window. Callers drop empty results so the bundle doesn't ship
390390
/// empty `logs/<name>` entries.
391391
pub(super) fn load_and_filter_log_file(
392392
path: &Path,
@@ -409,7 +409,7 @@ pub(super) fn load_and_filter_log_file(
409409
let mtime = metadata.modified().unwrap_or(now_system);
410410

411411
// File-level filter. If a file's mtime is older than the lower bound of the scope's
412-
// window, skip it entirely its newest line is older than what we want.
412+
// window, skip it entirely: its newest line is older than what we want.
413413
let lower_bound = match scope {
414414
BundleScope::Recent { window } => {
415415
now_utc - chrono::Duration::from_std(window).unwrap_or(chrono::Duration::hours(1))
@@ -436,7 +436,7 @@ pub(super) fn load_and_filter_log_file(
436436

437437
// Per-line filter for the Flow B window: drop lines whose leading ISO-8601 stamp
438438
// is older than `lower_bound`. Lines without a parseable stamp pass through (the
439-
// log line wasn't written by us we keep it as-is rather than risk dropping
439+
// log line wasn't written by us, so we keep it as-is rather than risk dropping
440440
// something useful).
441441
let mut lines: Vec<String> = Vec::new();
442442
for line in reader.lines().map_while(Result::ok) {
@@ -454,7 +454,7 @@ pub(super) fn load_and_filter_log_file(
454454

455455
/// Convert a [`SystemTime`] into a [`zip::DateTime`] (the format the zip crate stores
456456
/// per entry). On parse failure (system clock before 1980, post-2107) returns the zip
457-
/// crate's default not a hard error; the bundle still ships, just with a placeholder
457+
/// crate's default (not a hard error). The bundle still ships, just with a placeholder
458458
/// mtime on that one entry.
459459
pub(super) fn zip_dt(time: SystemTime) -> ZipDateTime {
460460
let local: DateTime<chrono::Local> = time.into();
@@ -473,8 +473,8 @@ pub(super) fn zip_dt(time: SystemTime) -> ZipDateTime {
473473
///
474474
/// Each entry's mtime is set explicitly: `manifest.json` uses `now`, log entries use
475475
/// the source file's mtime. Without this, the `zip` crate writes 1980-01-01 00:00 for
476-
/// every entry (DOS epoch), which makes downstream tooling and humans inspecting the
477-
/// archive unable to tell when anything was actually captured.
476+
/// every entry (DOS epoch), which makes downstream tooling and humans inspecting the
477+
/// archive unable to tell when anything was actually captured.
478478
///
479479
/// Split out from [`build_bundle`] so tests can feed synthetic inputs without needing
480480
/// a Tauri app handle or a real log directory.

apps/desktop/src-tauri/src/file_system/cloud_actions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//! "Make available offline" / "Remove download" wrappers iCloud Drive only.
1+
//! "Make available offline" / "Remove download" wrappers (iCloud Drive only).
22
//!
3-
//! Implementation notes important context for future agents:
3+
//! Implementation notes (important context for future agents):
44
//!
55
//! `NSFileProviderManager` looked like the universal cross-provider API (Dropbox,
66
//! Google Drive, OneDrive, Box, iCloud all show up as File Provider domains since
7-
//! macOS 12.3). It isn't its host-side methods (`getDomainsWithCompletionHandler`,
7+
//! macOS 12.3). It isn't: its host-side methods (`getDomainsWithCompletionHandler`,
88
//! `evictItemWithIdentifier`, `requestDownloadForItemWithIdentifier`) are reserved
99
//! for the app that *bundles* the File Provider extension. From a third-party app
1010
//! like Cmdr, the system rejects the call with `NSFileProviderErrorProviderNotFound`
@@ -13,7 +13,7 @@
1313
//!
1414
//! What does work for any app: `FileManager.evictUbiquitousItem(at:)` and
1515
//! `startDownloadingUbiquitousItem(at:)`. They route through the **iCloud (NSUbiquity)
16-
//! infrastructure**separate from the File Provider host APIs above and accept
16+
//! infrastructure**, separate from the File Provider host APIs above, and accept
1717
//! any URL inside an iCloud ubiquity container. So we offer the eviction / download
1818
//! menu items only for files under `~/Library/Mobile Documents/com~apple~CloudDocs/`
1919
//! (iCloud Drive). For Dropbox/GDrive/OneDrive items the menu items don't appear;
@@ -32,7 +32,7 @@ fn home_dir() -> Option<PathBuf> {
3232
std::env::var_os("HOME").map(PathBuf::from)
3333
}
3434

35-
/// Returns true only for paths inside iCloud Drive the location where
35+
/// Returns true only for paths inside iCloud Drive, the location where
3636
/// `FileManager.evictUbiquitousItem` / `startDownloadingUbiquitousItem` work.
3737
#[cfg(target_os = "macos")]
3838
pub fn is_in_icloud_drive(path: &Path) -> bool {
@@ -150,7 +150,7 @@ mod tests {
150150
#[test]
151151
fn is_in_icloud_drive_excludes_third_party() {
152152
set_test_home();
153-
// Third-party clouds aren't iCloud eviction APIs don't apply.
153+
// Third-party clouds aren't iCloud, so eviction APIs don't apply.
154154
assert!(!is_in_icloud_drive(Path::new(
155155
"/Users/test/Library/CloudStorage/Dropbox/foo.txt"
156156
)));

apps/desktop/src-tauri/src/file_system/listing/caching.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub enum DirectoryChange {
2222
Modified(FileEntry),
2323
/// An entry was renamed within the same directory.
2424
Renamed { old_name: String, new_entry: FileEntry },
25-
/// Unknown or bulk change trigger a full re-read via the Volume trait.
25+
/// Unknown or bulk change: trigger a full re-read via the Volume trait.
2626
FullRefresh,
2727
}
2828

@@ -58,7 +58,7 @@ pub(crate) struct CachedListing {
5858
/// Lives on the listing so it works for all volume types, including SMB/MTP
5959
/// which don't use the FSEvents-based `WatchedDirectory`.
6060
pub sequence: AtomicU64,
61-
/// When this listing was created. Used by `snapshot_listings` for triage
61+
/// When this listing was created. Used by `snapshot_listings` for triage,
6262
/// surfacing orphan listings (e.g., volume dropdown previews) in error reports.
6363
pub created_at: Instant,
6464
}
@@ -73,8 +73,8 @@ pub struct ListingSummary {
7373
}
7474

7575
/// Returns a snapshot of every active listing in the cache. Used by `cmdr://state`
76-
/// so triagers can spot orphan listings (started but never bound to a pane
77-
/// for example, when a volume dropdown commits a navigation that the user then
76+
/// so triagers can spot orphan listings (started but never bound to a pane,
77+
/// for example when a volume dropdown commits a navigation that the user then
7878
/// abandons or that surfaces an error).
7979
pub fn snapshot_listings() -> Vec<ListingSummary> {
8080
let cache = match LISTING_CACHE.read() {

apps/desktop/src-tauri/src/file_viewer/byte_seek_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn backward_scan_with_no_newline_caps_at_max() {
321321

322322
let backend = ByteSeekBackend::open(&file).unwrap();
323323

324-
// Seek to byte 15000 backward scan of 8192 bytes won't find '\n'
324+
// Seek to byte 15000; backward scan of 8192 bytes won't find '\n'
325325
let chunk = backend.get_lines(&SeekTarget::ByteOffset(15000), 1).unwrap();
326326

327327
// Should fall back to scan_start = 15000 - 8192 = 6808

apps/desktop/src-tauri/src/file_viewer/line_index.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! LineIndexBackend sparse line-offset index for efficient line-based seeking.
1+
//! LineIndexBackend: sparse line-offset index for efficient line-based seeking.
22
//!
33
//! Stores byte offsets every INDEX_CHECKPOINT_INTERVAL lines (256 by default).
4-
//! Memory: O(total_lines / 256) a 10M-line file uses ~40 KB of index.
4+
//! Memory: O(total_lines / 256); a 10M-line file uses ~40 KB of index.
55
//!
66
//! The index is built by scanning the file for newlines using memchr (SIMD-accelerated).
77
//! After scanning, supports O(1) line-based seeking via the checkpoint array.
@@ -102,7 +102,7 @@ impl LineIndexBackend {
102102
}
103103

104104
// total_lines is line_number + 1 (for the last line, which may not end with \n)
105-
// But if the file ends with \n, the last "line" is empty we still count it.
105+
// But if the file ends with \n, the last "line" is empty; we still count it.
106106
let total_lines = line_number + 1;
107107

108108
Ok(Self {
@@ -217,7 +217,7 @@ impl FileViewerBackend for LineIndexBackend {
217217

218218
let lines = self.read_lines_from_checkpoint(checkpoint.offset, lines_to_skip, count)?;
219219

220-
// Calculate byte offset of the target line (approximate it's the checkpoint offset)
220+
// Calculate byte offset of the target line (approximate; it's the checkpoint offset)
221221
let byte_offset = checkpoint.offset;
222222

223223
Ok(LineChunk {
@@ -315,7 +315,7 @@ impl FileViewerBackend for LineIndexBackend {
315315
*progress.lock_ignore_poison() = scanned;
316316
}
317317

318-
// Handle last line (only reached if limit not hit loop breaks early otherwise)
318+
// Handle last line (only reached if limit not hit; loop breaks early otherwise)
319319
if !leftover.is_empty() {
320320
let line = String::from_utf8_lossy(&leftover);
321321
let line_lower = line.to_lowercase();

apps/desktop/src-tauri/src/file_viewer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! File viewer module on-demand line serving with three backend strategies.
1+
//! File viewer module: on-demand line serving with three backend strategies.
22
//!
33
//! Backends:
44
//! - `FullLoadBackend`: loads entire file into memory (small files, <1 MB)
@@ -37,7 +37,7 @@ const MAX_BACKWARD_SCAN: usize = 8192;
3737

3838
/// Maximum number of matches stored during search. Once reached, the search stops entirely.
3939
/// The frontend highlights additional matches client-side on visible lines, so stopping early
40-
/// doesn't lose highlighting it only caps the prev/next navigation index.
40+
/// doesn't lose highlighting: it only caps the prev/next navigation index.
4141
const MAX_SEARCH_MATCHES: usize = 10_000;
4242

4343
/// Where to seek in the file.

0 commit comments

Comments
 (0)