Skip to content

fix(lan): adding back ends it; received items save under lan > sender - #261

Merged
mindaugaskasp merged 2 commits into
mainfrom
fix/lan-add-back-loop
Nov 17, 2026
Merged

mindaugaskasp merged 2 commits into
mainfrom
fix/lan-add-back-loop

Conversation

@mindaugaskasp

Copy link
Copy Markdown
Owner

Adding each other looped. When you already had someone's key and they added you, you still got "X added you · Add back". Once both sides had added each other, every Add back raised another one, forever. The e2e helper always pressed "Not now", which is how the tests missed it.

  • When a code matches, the holder checks its trust store. If it already has the adder's key, it shows "{name} added you back" as a notice, with no dialog and no Add back.
  • The adder closing straight after sending its result no longer races that lookup.
  • Unit and e2e tests were seen failing first.

Received items are tagged lan > <sender>.

  • A snippet or diff received on the network saves with the nested tag lan/<sender name>, so the sidebar groups everything someone sent under lan.
  • A snippet opens with the tag beside its own tags; a diff's Save dialog offers it.
  • The core needs nothing from the network feature: tabs carry suggestedTags, which the save target reads.
  • A slash in a sender's name can't nest deeper.
  • Unit tests were seen failing first; the e2e checks the sidebar after saving.

Verified:

  • npm run check passes.
  • Full make e2e: 800 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PJaGuL4V5ghYxXSGoyYU8n

Mindaugas and others added 2 commits November 17, 2026 23:31
…d back again

When you already had someone's key and they added you, you still got 'X added
you · Add back'. Once both sides had added each other, every Add back raised
another one, forever. The tests missed it because the helper always dismissed
the prompt with Not now. The holder now checks its trust store when a code
matches: if it already has the adder's key it shows '{name} added you back' as
a notice, with no dialog. The adder's close no longer races the trust lookup.
Unit and e2e tests seen failing first; the e2e helper accepts either outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJaGuL4V5ghYxXSGoyYU8n
A snippet or diff received on the network now saves with a nested tag,
lan/<sender name>, so the sidebar groups everything someone sent under lan.
A snippet opens with the tag beside its own; a diff's Save dialog offers it
(tabs carry suggestedTags, which the save target reads, so the core needs
nothing from the network feature). A slash in a sender's name cannot nest
deeper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJaGuL4V5ghYxXSGoyYU8n
@mindaugaskasp
mindaugaskasp merged commit 2d1878a into main Nov 17, 2026
17 checks passed
@mindaugaskasp
mindaugaskasp deleted the fix/lan-add-back-loop branch November 17, 2026 21:47
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