Skip to content

fix: Keep search result files in the per-user temp dir - #32

Merged
a1594834522-coder merged 1 commit into
memorylake-ai:mainfrom
a1594834522-coder:fix/quick-actions-temp-dir
Sep 14, 2026
Merged

a1594834522-coder merged 1 commit into
memorylake-ai:mainfrom
a1594834522-coder:fix/quick-actions-temp-dir

Conversation

@a1594834522-coder

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #31, which opens search results in TextEdit from a text file. That file was written under ~/Library/Caches/memorylake-quick-actions and kept for a day, leaving a small but real residue on the user's disk. It now goes to the per-user temp dir macOS provides, which the system purges on reboot and after three idle days, and the action deletes anything older than an hour on the next search. The dir is resolved with getconf DARWIN_USER_TEMP_DIR rather than $TMPDIR, because services run with an empty environment where $TMPDIR is unset and the fallback would have been the shared /tmp.

Changes

  • scripts/quick-actions/search.sh: results file lives in $(getconf DARWIN_USER_TEMP_DIR)memorylake-quick-actions/; cleanup threshold one hour instead of one day.

Test plan

  • env -i HOME PATH __CF_USER_TEXT_ENCODING=0x1F5:0x19:0x34 (the service's environment, no TMPDIR) → file lands under /var/folders/…/T/memorylake-quick-actions/, TextEdit opens it with correct Chinese
  • Reinstalled from a checkout; ⌃⌥⌘L via the real service produces the same
  • zsh -n clean

🤖 Generated with Claude Code

The search action wrote one text file per search under
~/Library/Caches/memorylake-quick-actions and kept them for a day. They now
go to the per-user temp dir macOS provides (getconf DARWIN_USER_TEMP_DIR —
resolved that way because services run with an empty environment and
$TMPDIR is unset there), which the system purges on reboot and after three
idle days, and anything older than an hour is removed on the next search.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@a1594834522-coder
a1594834522-coder merged commit 487377f into memorylake-ai:main Sep 14, 2026
5 of 6 checks passed
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.

1 participant