Skip to content

Keep Taildrop home shorthand on literal directory boundaries - #14182

Open
manuaudio wants to merge 7 commits into
omacom:quattrofrom
manuaudio:claude/fix-tailscale-receive-tilde
Open

manuaudio wants to merge 7 commits into
omacom:quattrofrom
manuaudio:claude/fix-tailscale-receive-tilde

Conversation

@manuaudio

@manuaudio manuaudio commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

PR #16301 restored the ~ shorthand while this pull request was waiting, but its ${dir/#$HOME/"~"} substitution still treats $HOME as a pattern and does not enforce a directory boundary. A home path containing glob characters is not shortened correctly, while a sibling such as /home/alice-backup/Downloads can be displayed as ~-backup/Downloads.

I build the display path separately and shorten it only when the save directory equals $HOME or starts with the literal $HOME/ boundary. The latest merge keeps the current Taildrop image previews and --app-name Taildrop notification stacking from quattro.

For the failure-first check, I copied only the focused test from this branch onto current quattro (1e2d9f9ba). It fails at the expected save-location assertion: the glob-bearing home path is printed in full instead of as ~/Downloads. On cbfdac2cf, all 10 focused checks pass with bash test/shell.d/tailscale-receive-test.sh. The sibling-path case also confirms that /home/alice-backup/Downloads remains unchanged.

bash -n bin/omarchy-tailscale-receive, scoped git diff --check, the added-line security scan, and a fresh independent Codex review are clean. I did not run the broad local suites; GitHub CI covers those. No file-delivery behavior changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMKCCA2jSkTTwEwdZepjQd
@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issues were found.

Summary

Taildrop now shows ~ only when the save directory equals HOME or starts with the literal HOME/ boundary.

  • Taildrop notices shorten only save paths inside the home directory.

Reviews (6) · Last reviewed commit: "Merge upstream/quattro into claude/fix-t..." · Reviewed by Greptile

Comment thread test/shell.d/tailscale-receive-test.sh Resolved
Put glob characters in the test home path so an unquoted $HOME pattern would fail to shorten it to ~.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMKCCA2jSkTTwEwdZepjQd

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything seems fine, ready to merge.

…cale-receive-tilde

# Conflicts:
#	bin/omarchy-tailscale-receive
@omarchybot

Copy link
Copy Markdown
Collaborator

Read the change at de186c2 against quattro; nothing was run on a worker yet.

The premise holds: in bash 5.3, ${dir/#$HOME/~} tilde-expands the ~ in the replacement back into $HOME, so the notification has always shown the full path. With both sides quoted as this pull request does, /home/x/Downloads comes out as ~/Downloads, and a $HOME containing glob characters is matched literally. I checked that with a standalone expansion, not by running the branch. bin/omarchy-tailscale-receive:62 is the only place in the repository that uses this pattern, so no other copy needs the same fix.

It has not been verified or labelled, because the classification is unsettled. I read it as a bug fix, but the second opinion that confirms the class (Codex Medium) was not asked: the reviewer answers a ping, but today's review budget on this machine is spent, so the classification was refused rather than agreed. Nothing is wrong with the pull request on that account. It goes round again once a second opinion can classify it, and then gets a reproduction on a worker (failing on quattro, passing here) and the suite. Until then it waits on that, not on you.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Thanks @chessing234 — I appreciate the review. The path-formatting change remains clean; the current limitation is that the live Taildrop path has not been independently exercised on a worker.

@manuaudio

Copy link
Copy Markdown
Contributor Author

I resolved the quattro conflicts in 51841625e and kept the new Taildrop notification test structure from upstream. The focused regression still fails on current quattro at the expected save-location assertion, then passes all 10 checks on this head with bash test/shell.d/tailscale-receive-test.sh. bash -n, git diff --check, and an independent Codex review are clean. CI and Greptile are running on the updated head.

Comment thread bin/omarchy-tailscale-receive Resolved
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Verified at f134b00 against quattro (fb45b98), on a worker built from the Omarchy ISO.

The bug is real: on the worker's bash 5.3, ${dir/#$HOME/~} turns /home/x/Downloads back into /home/x/Downloads, so the Taildrop notification never showed ~. The new case in test/shell.d/tailscale-receive-test.sh fails on quattro and fails again with only the change to bin/omarchy-tailscale-receive reverted. At this head it passes all 10 checks. ./test/cli is green (125 ok). The check at bin/omarchy-tailscale-receive:64 stops at the directory boundary, so /home/alice-backup keeps its full path, and the glob characters in the test's home path mean the literal match is tested too. Nothing else in the repository uses the old pattern. The diff is the right size for the bug.

The second opinion (Codex Medium) also found no defect; its independence from this review is not guaranteed. It mentioned an empty, unset or trailing-slash HOME, none of which a desktop session has, so nothing was pushed. One small thing: the description still shows the earlier quoted-substitution approach rather than the prefix check that shipped.

Labelled bug, verified and ready. It now waits on the maintainer.

@manuaudio

Copy link
Copy Markdown
Contributor Author

I updated the description to match f134b004c. It now describes the $HOME directory-boundary check and records that sibling paths such as /home/user-backup/Downloads remain unchanged. No code change was needed.

# Conflicts:
#	bin/omarchy-tailscale-receive
#	test/shell.d/tailscale-receive-test.sh
@manuaudio manuaudio changed the title Show taildrop save directory relative to home as ~ Keep Taildrop home shorthand on literal directory boundaries Oct 22, 2026
@manuaudio

Copy link
Copy Markdown
Contributor Author

I resolved the new quattro conflict in 8f5e013b1. The merge keeps #16301’s Taildrop image previews, but replaces its pattern substitution with the literal $HOME directory-boundary check. On current quattro (331fa3d52), the focused regression fails at the expected save-location assertion; this head passes all 10 checks. bash -n, focused git diff --check, the added-line security scan, and an independent Codex review are clean. CI and Greptile are running on the pushed head.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge and removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Verified again at 8f5e013 against quattro (3c7027d), on a worker built from the Omarchy ISO, since the merge with #16301 changed what this fixes.

quattro now shows ~ through ${dir/#$HOME/"~"}, and the two remaining cases are real there. With HOME=/home/alice, a save directory of /home/alice-backup/Downloads is shown as ~-backup/Downloads. A HOME containing glob characters, such as home[1], is never shortened. Both fail on quattro and again with only bin/omarchy-tailscale-receive reverted, and pass at this head. HOME itself and $HOME/Downloads still read as ~ and ~/Downloads. test/shell.d/tailscale-receive-test.sh passes 10 of 10 here, against 8 of 9 on quattro, and ./test/cli is green (125 ok).

The second opinion (Codex Medium and muse-spark-1.3-contributor at high thinking) found no defect in the code; their independence from this review is not guaranteed. Codex suggested the sibling test might let a fix that only quotes $HOME through. It would not: that fix shows ~-backup/Downloads and fails it, so the two new cases between them cover both the literal match and the directory boundary. Nothing was pushed.

Labelled verified and ready at this head. It waits on the maintainer.

@manuaudio

Copy link
Copy Markdown
Contributor Author

I resolved the new quattro conflict in cbfdac2cf. The merge keeps upstream’s --app-name Taildrop notification stacking while retaining the literal $HOME directory-boundary check. With only this branch’s focused test copied onto current quattro (1e2d9f9ba), it fails at the expected save-location assertion; this head passes all 10 checks. bash -n, scoped git diff --check, the added-line security scan, and a fresh independent Codex review are clean. GitHub checks are running on the pushed head.

@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 26, 2026
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked at cbfdac2, your merge of quattro that brought in #16561. The conflict resolution is right: the notification keeps upstream's --app-name Taildrop and still passes your display_dir, and nothing else in announce() changed.

What ran, on a fresh Omarchy worker (bash 5.3.20), against quattro at 5fa15f2:

  • A reproduction of my own, plus your tailscale-receive-test.sh, run on quattro, on this head, and on this head with bin/omarchy-tailscale-receive reverted to quattro. On quattro and on the revert, a $HOME containing [1] keeps the full path, a $HOME containing * collapses the whole path to ~, and $HOME-backup/Downloads shows as ~-backup/Downloads. Your test fails on the same case (8 of 9 pass). At this head all six of my cases pass and so do all 10 of your checks. $HOME itself still shows as ~, and a path outside home keeps its full path.
  • ./test/cli: green, 125 ok.

Second opinion from Codex Medium and from muse-wonder via pi at high thinking: neither found a defect, both read the conflict resolution as correct and the change as proportionate, and both confirmed the three failures on the old expression. That is agreement with what I had already found, and their independence is not guaranteed. Nothing is left for you to do here. It is waiting on the maintainer.

@manuaudio

Copy link
Copy Markdown
Contributor Author

This still merges cleanly on the current base; happy to adjust anything.

@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants