Skip to content

Keep saved meeting dates when the app rewrites them - #1859

Merged
r3dbars merged 2 commits into
mainfrom
claude/andrii-file-dates-27jlm0
Sep 25, 2026
Merged

r3dbars merged 2 commits into
mainfrom
claude/andrii-file-dates-27jlm0

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Requested by Justin · project thread

Why

Before: a user reported 39 of 90 old meetings suddenly showing "Created" as today in Finder and his notes app, with their text intact. Every app path that edits a saved meeting after the fact (speaker rename, merge, discard, deferred naming, meeting rename, quick summary, restyle, summary sidecar rename) used a plain atomic write. That swaps in a brand-new file, so the creation date resets. A rewrite with identical bytes still bumped Modified too. Daily dictation files had the same problem: every new dictation, delete, edit and undo rewrote the whole day file.

After: those paths skip the write when nothing changed, and when something did change they keep the file's original creation date. Modified still moves on a real edit, on purpose, since the MCP index, Home's capture cache and the dictionary-fix scan all use it to spot changes.

The user thinks he merged a couple of speakers around then, which fits: a merge rewrites every meeting that speaker was in.

Product Impact

  • Affects: meetings / dictation / agent artifacts
  • Lane: meeting reliability
  • Why this matters: people sort their meetings folder (or Obsidian vault) by date. Editing a speaker shouldn't reshuffle their history.

What changed

  • New TranscriptFileRewrite in Sources/TranscriptedCore/Storage/: skip identical bytes, else atomic write + restore creation date.
  • Meeting rewrite sites switched to it: RetroactiveSpeakerUpdater, SpeakerIdentityMutationService, SpeakerNamingCoordinator (rollback), HomeMeetingRename, MeetingTranscriptStyler, MeetingQuickSummaryWriter, MeetingArtifactRenamer (summary sidecar).
  • Dictation: DictationTranscriptWriter append and DictationTranscriptStore delete/edit/undo switched to it.
  • DictionaryPastMeetingFix.writePreservingCreationDate now calls the helper instead of its own copy.
  • Permission tightening after each write is unchanged.
  • Added the new file to SHARED_TEST_STORAGE_SOURCES (fast tests + E2E smoke) and the home-captures benchmark script.
  • Tests: TranscriptFileRewriteTests (StorageTests) and a merge+rename creation-date test in RetroactiveSpeakerUpdaterTests. The existing dictionary-fix fast test already checks creation date is kept.

How I checked it

  • bash scripts/dev/linux-checks.sh (48 passed)
  • check-source-pins.py --changed-only passes
  • bash build.sh --no-open, bash run-tests.sh, swift test, bash run-integration-smoke.sh, bash run-e2e-smoke.sh: CI

Checks I could not run, and why:

  • Anything Swift. Cloud session on Linux, no toolchain. CI is the build.

Mac or hardware test still needed?

  • Not required. Optional: rename a speaker who appears in an old meeting, then check that meeting's Created date in Finder stays put (on main it jumps to now).

Risk Review

  • Privacy / local-first behavior reviewed (no telemetry changes)
  • Checked the text-pin tests for every file I edited
  • Storage path or migration impact reviewed (no path changes)
  • Agent PRs got an independent deep review of the full diff (READY at 356a2cf; its M1 dictation and M2 reuse notes are in b946495)

Notes

Finder's "Date Added", Finder tags and other xattrs still don't survive a real atomic rewrite (pre-existing). Creation date is what sorting and most note apps use. Skipping no-op writes means those files aren't touched at all.

🤖 Generated with Claude Code

https://claude.ai/code/session_011A6EG6MJcFSNvDLMx3YEH9

Speaker renames, merges, discards, meeting renames, summaries and restyles
rewrote saved Markdown with a plain atomic write. That swaps in a new file,
so Finder and note apps showed old meetings as created today, and a rewrite
with identical bytes still bumped Modified.

Add TranscriptFileRewrite: skip the write when the bytes already match,
otherwise write atomically and put the original creation date back.
Modification date still moves on a real change so the MCP index and Home's
cache notice it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A6EG6MJcFSNvDLMx3YEH9
@r3dbars r3dbars self-assigned this Sep 25, 2026
… fix

Daily dictation files had the same bug: every new dictation appended by
rewriting the whole file, and delete/edit/undo rewrote it too, so Created
reset each time. Route those through TranscriptFileRewrite, and let
DictionaryPastMeetingFix use it instead of its own copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A6EG6MJcFSNvDLMx3YEH9
@r3dbars
r3dbars marked this pull request as ready for review September 25, 2026 16:57
@r3dbars
r3dbars merged commit bf0d84f into main Sep 25, 2026
8 checks passed
@r3dbars
r3dbars deleted the claude/andrii-file-dates-27jlm0 branch September 25, 2026 16:57
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