Skip to content

make a snapshot of the peers so lines calc is exact and we can remember which is which - bind keys 1-9 to connect to peers#18

Merged
ldemailly merged 3 commits intomainfrom
conn7
Oct 22, 2025
Merged

make a snapshot of the peers so lines calc is exact and we can remember which is which - bind keys 1-9 to connect to peers#18
ldemailly merged 3 commits intomainfrom
conn7

Conversation

@ldemailly
Copy link
Copy Markdown
Member

No description provided.

…er which is which - bind keys 1-9 to connect to peers
@ldemailly ldemailly requested a review from Copilot October 22, 2025 00:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a stable peer list snapshot mechanism and adds keyboard bindings to connect to peers. The changes enable users to press keys 1-9 to connect to a specific peer while ensuring the peer list remains consistent during display.

Key changes:

  • Added PeerKVSort function to sort peer key-value pairs using the existing PeerSort logic
  • Implemented peer list snapshot before rendering to maintain stable peer ordering and indexing
  • Added keyboard handler for keys 1-9 to initiate connections to peers by index

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tsnet/tsnet.go Added PeerKVSort function to enable sorting of peer key-value pairs
main.go Created peer snapshot mechanism and implemented keyboard bindings for peer connections

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.75%. Comparing base (72ef012) to head (f67f2c5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
main.go 0.00% 16 Missing ⚠️
tsnet/tsnet.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
- Coverage   33.62%   32.75%   -0.88%     
==========================================
  Files           9        9              
  Lines         675      693      +18     
==========================================
  Hits          227      227              
- Misses        440      458      +18     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ldemailly ldemailly requested a review from Copilot October 22, 2025 00:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ldemailly ldemailly requested a review from Copilot October 22, 2025 00:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ldemailly ldemailly merged commit 12564c1 into main Oct 22, 2025
7 of 9 checks passed
@ldemailly ldemailly deleted the conn7 branch October 22, 2025 00:20
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.

2 participants