Skip to content

share-session says what to type, folder numbers included - #847

Merged
anirudhkumar-nanonets merged 1 commit into
mainfrom
fix/share-ask-offers-leave-out
Nov 17, 2026
Merged

anirudhkumar-nanonets merged 1 commit into
mainfrom
fix/share-ask-offers-leave-out

Conversation

@anirudhkumar-nanonets

Copy link
Copy Markdown
Collaborator

A teammate ran trail share-session on 0.30.4, saw his folders listed, and asked if there was a way to leave some out: the question after the preview was only → Send it? [y/N]. Typing folder numbers there still worked, but nothing said so; #840 took the hint out of the question so the yes/no wouldn't be buried.

The question is now one line that says what to type and what each answer does, then a bare → prompt:

Read every file first: ~/.trail/share/2026-11-17-1536/SUMMARY.md

Type y to send it all, n to send nothing, or folder numbers to leave out (like 2 3).
→
  • Folder numbers are offered while more than one folder is still in. With one left it reads Type y to send it, or n to send nothing. Enter still sends nothing.
  • Folders can be left out more than once. After numbers, the preview shows again with what's left and the line asks about "the rest" (… or more folder numbers to leave out (like 3)). Before, it allowed one round and then only yes or no.
  • The example numbers never name every folder still in, and a folder already left out can't be picked again (parseLeaveOut).
  • SEND_ASK and SEND_REST_ASK are replaced by sendAsk(manifest, rest).

Moves: none of the current project's metrics. It should raise how many share-session previews end in a send rather than a no (share_bundle with outcome sent or partial). A person who wants to hold a folder back can now do that instead of declining the whole share.

Tests: test/share-bundle.test.ts covers the line for one, two and three folders, the "rest" wording, and that a left-out folder can't be picked again. The share suites pass (52 of 52). Also run end to end in a pseudo-terminal, as trail share-session --once against a local stand-in for Trail with three folders: typing 2 left that folder out and showed the preview again, and y sent the setup and the other two sessions, never the left-out one.

trail check flags the 16 Nov learning that ruled out "or type folder numbers to leave out" in the question, because it buried the yes/no. This PR replaces that learning (l-9cb501d1): the yes/no still reads first, and the line says what to type rather than asking two questions at once.

🤖 Generated with Claude Code

The send question was only '→ Send it? [y/N]', so a teammate didn't know folders could be left out. One line now says what each answer does, then a bare → prompt; folders can be left out more than once.
@anirudhkumar-nanonets
anirudhkumar-nanonets merged commit 00ff67c into main Nov 17, 2026
6 of 7 checks passed
@trailhq-graft

trailhq-graft Bot commented Nov 17, 2026

Copy link
Copy Markdown

🌱 graft blast radius

Nothing outside this diff depends on it. 2 areas changed; no indexed dependents at depth 2.
Tests: no test reaches shareWholeClaude; 1 area updated its tests.

Test signal per changed area — 1 ✓ · 1 ✗

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • ✓ Asset Bundling — 2 of 2 reached · 1 test file changed here: test/share-bundle.test.ts
  • ✗ shareWholeClaude — 0 of 1 reached · no test file reaches it
    • not reached: shareWholeClaude

⚠️ 1 changed file not in the graph (.trail/learnings/2026-11-17-share-session-s-preview-is-four-anirudhkumar.md) — no parser claims the extension, or the index predates the file.

graft blast · refs/graft/base...HEAD · depth 2 · 4 changed files

Open the interactive graph → — click an area to see the code that changed, and the line that reaches it.

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