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
Conversation
…er which is which - bind keys 1-9 to connect to peers
There was a problem hiding this comment.
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
PeerKVSortfunction to sort peer key-value pairs using the existingPeerSortlogic - 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.