fix: name a session's origin when auto-attaching from another directory - #1127
Merged
norrietaylor merged 1 commit intoJul 31, 2026
Merged
Conversation
When `min session attach` finds no session for the current directory but exactly one session exists, it attaches to that session automatically. The announcement named the session but not where it came from, so the operator had no signal they had landed in another project's box. Append ` — created from <path>` to the announcement on that branch only, reading the origin from the entry's already-available `project_path`. A cwd-matched attach is its own confirmation and is left unchanged; if the record has no `project_path` (older daemon) the line renders as before.
norrietaylor
approved these changes
Jul 31, 2026
norrietaylor
marked this pull request as ready for review
July 31, 2026 07:39
norrietaylor
enabled auto-merge (squash)
July 31, 2026 07:39
📝 WalkthroughWalkthroughThe attach announcement now indicates the session’s creation path when it differs from the current working directory. Matching and missing paths produce no suffix. Tests cover all three cases. ChangesSession attach announcement
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
norrietaylor
deleted the
inbox-patch/inbox-patch-attach-created-from-2dc642c305cddf38
branch
July 31, 2026 07:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABK6MraA
When
min session attachfinds no session for the current directory but exactly one session exists, it auto-attaches to that session. The announcement named the session but not its origin, so the operator got no signal they had landed in another project's box.This appends
— created from <path>to the announcement on that no-cwd-match/single-session branch only, read from the entry's already-availableproject_path. Cwd-matched attaches and picker selections are unchanged; a record withoutproject_path(older daemon) renders exactly as before.Verification
cargo fmt --all --check — clean, no drift
cargo clippy --workspace --locked -- -D warnings — clean, 0 warnings
cargo build --workspace --locked — Finished dev profile, ok
cargo test --workspace --locked — ok, 0 failed (adds 3 attach unit tests)
Note
Add origin path suffix to auto-attach announcements when session is from a different directory
When auto-attaching to a session whose
project_pathdiffers from the current working directory, the announcement now readsAttaching to session <name> — created from <path>instead of justAttaching to session <name>.The suffix is computed by the new
created_from_suffixhelper in attach.rs and appended inresolve_smart_attachin lib.rs. When the paths match or noproject_pathis set, the suffix is empty and behavior is unchanged.Macroscope summarized dd66044.
Summary by CodeRabbit
New Features
Bug Fixes