Commit Graph

48 Commits

Author SHA1 Message Date
William Casarin
9b7ee8d8c5 clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-04 14:53:10 -08:00
William Casarin
267b854953 net: switch ping/pong messages to trace
they are annoying even on debug

Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-04 14:42:59 -08:00
William Casarin
a8eaea6509 test: fix relay message tests
Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-10 16:56:33 -07:00
William Casarin
02a90eccd1 enostr: show unrecognized message in log
Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-10 15:33:28 -07:00
William Casarin
3aa4d00053 clippy: fix lint errors
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-19 09:45:36 -07:00
William Casarin
0770bab37c battery: disable render every 100ms
our multicast poller was causing this

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 11:29:03 -07:00
William Casarin
8d2da86f1f enostr: remove raw event type
we rely on the event type for multicast logic,
so remove raw since its not really needed anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:20:33 -07:00
William Casarin
8a1398face clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
William Casarin
6bf6af7f9e profile: fix crash with ProfileState defaults
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 14:14:50 -07:00
William Casarin
a714bef690 ui/profile: fix dubious profile editing
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 08:28:37 -07:00
kernelkind
84026824b2 enostr: add equivalence between Pubkey & bytes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:20 -04:00
kernelkind
6da10c4faf add NoteId hashbrown Equivalent impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-06-18 14:38:26 -04:00
kernelkind
64d3a0842e add NoteId::from_bech method
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-25 18:26:44 -04:00
kernelkind
54c0fdb563 don't show zap button if no wallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:29:43 -04:00
William Casarin
ba4198eeec enostr: rename to_bech to npub
a bit more clear as to what this is
2025-04-22 10:46:51 -07:00
William Casarin
a33aad1f62 note: fix from_hex crash on bad note ids 2025-04-19 19:34:12 -07:00
William Casarin
50dec5b5d5 context: implement note broadcasting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:43 -07:00
kernelkind
5917bc16fd propagate current account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
kernelkind
0bd486a8f4 serialize Keypair using tokenator
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-22 00:06:48 -04:00
William Casarin
26b58683b8 feat: integrate nostrdb relay indexing
- Upgrade `nostrdb` to v0.6.1 with relay metadata support
- Switch to `nostr::RelayUrl` for typed relay URLs
- Use `process_event_with()` to pass relay info during ingestion
- Update `Relay`, `RelayPool`, and unknown ID logic accordingly

This enables richer indexing with relay provenance in events.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-21 16:20:37 -07:00
Dimitris Apostolou
cc5941e919 avoid duplicate crates 2025-02-24 22:06:37 +02:00
Ken Sedgwick
dfa4b24b7d check message length before prefix comparisons 2025-02-20 16:04:29 -08:00
Ken Sedgwick
22f9c32121 fix EOSE parsing to handle extra whitespace 2025-02-20 12:57:31 -08:00
Ken Sedgwick
fe7f0a3976 fix OK message parser to include last message component 2025-02-20 12:57:31 -08:00
Ken Sedgwick
80f4360005 fix event error return when decoding fails 2025-02-20 12:57:30 -08:00
Ken Sedgwick
84e0546e69 improve relay message parsing unit tests 2025-02-20 12:57:26 -08:00
Ken Sedgwick
d39b2706e0 add diagnostic string to DecodeFailed 2025-02-20 11:54:04 -08:00
William Casarin
0cc1d8a600 Switch to unified timeline cache via TimelineKinds
This is a fairly large rewrite which unifies our threads, timelines and
profiles. Now all timelines have a MultiSubscriber, and can be added
and removed to columns just like Threads and Profiles.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-05 18:30:45 -08:00
William Casarin
69b7581a53 Notedeck Alpha 2 Release - v0.3
Thanks again to kernel and ken, as well as some new contributors:
kieran, daniel saxton for our alpha 2 release!

Added
=====

- Clicking a mention now opens profile page (William Casarin)
- Note previews when hovering reply descriptions (William Casarin)
- Media uploads (kernelkind)
- Profile editing (kernelkind)
- Add hashtags to posts (Daniel Saxton)
- Enhanced command-line interface for user interactions (Ken Sedgwick)
- Various Android updates and compatibility improvements (Ken Sedgwick, William Casarin)
- Debug features for user relay-list and mute list synchronization (Ken Sedgwick)

Changed
=======

- Add confirmation when deleting columns (kernelkind)
- Enhance Android build and performance (Ken Sedgwick)
- Image cache handling using sha256 hash (kieran)
- Introduction of decks_cache and improvements (kernelkind)
- Migrated to egui v0.29.1 (William Casarin)
- Only show column delete button when not navigating (William Casarin)
- Show profile pictures in column headers (William Casarin)
- Show usernames in user columns (William Casarin)
- Switch to only notes & replies on some tabs (William Casarin)
- Tombstone muted notes (Ken)
- Pointer interactions enhancements in UI (William Casarin)
- Persistent theme setup across sessions (kernelkind)
- Increased ping intervals for network performance (William Casarin)
- Nostrdb update for async support (Ken Sedgwick)

Fixed
=====

- Fix GIT_COMMIT_HASH compilation issue (William Casarin)
- Fix avatar alignment in profile previews (William Casarin)
- Fix broken quote repost hitbox (William Casarin)
- Fix crash when navigating in debug mode (William Casarin)
- Fix long delays when reconnecting (William Casarin)
- Fix repost button size (William Casarin)
- Fixed since kind filters (kernelkind)
- Clippy warnings resolved (Dimitris Apostolou)

Refactoring & Improvements
==========================

- Numerous internal structural improvements and modularization (William Casarin, Ken Sedgwick)

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-31 10:31:07 -08:00
William Casarin
8ad9ad20ba Merge clippy fixes from Dimitris
Dimitris Apostolou (1):
      Fix clippy warnings
2025-01-25 16:15:13 -08:00
William Casarin
181be70c0f networking: increase ping interval
some relays are really slow to respond on this for some reason
2025-01-25 16:05:56 -08:00
Dimitris Apostolou
2c8f6298b8 Fix clippy warnings
Signed-off-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
2025-01-24 19:32:24 +02:00
Ken Sedgwick
e436be400e add add relay GUI 2025-01-21 12:21:13 -08:00
Ken Sedgwick
366ca24ac1 drive-by clippy fixes 2025-01-21 10:18:37 -08:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00
William Casarin
9a48b12e36 enostr: introduce PubkeyRef
This will be used for typesafe and copy-free pubkey references

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 12:43:03 -08:00
William Casarin
d97dcb147d fixed reconnect duration
Changelog-Fixes: Fix long delays when reconnecting
2025-01-10 06:08:07 -08:00
William Casarin
4fd8ac377e multicast: remove rejoin debug message
it's spammy
2025-01-04 15:20:01 -08:00
William Casarin
16b20568da Merge relay debug view
Fix a few conflicts
2025-01-04 13:54:29 -08:00
William Casarin
fe6206c546 Note multicasting
This is an initial implementation of note multicast, which sends posted
notes to other notedecks on the same network.

This came about after I nerd sniped myself thinking about p2p nostr on
local networks[1]

You can test this exclusively without joining any other relays by
passing -r multicast on the command line.

[1] https://damus.io/note1j50pseqwma38g3aqrsnhvld0m0ysdgppw6fjnvvcj0haeulgswgq80lpca

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-04 10:37:11 -08:00
kernelkind
54dfa0c945 integrate SubsDebug into RelayPool
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-01 15:57:08 -05:00
kernelkind
612c89118f add subs_debug
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-01 15:57:08 -05:00
kernelkind
3295124915 prepare AcquireKeyState for add column extern UI
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-18 11:04:53 -08:00
William Casarin
ab829b45fc enostr: update ewebsock
This was using an ancient version of rustls, which in turn included
an old version of ring, which was the real reason of the windows
compile issues (i think)

Cc: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 11:01:09 -08:00
kernelkind
13a406b9cd deps: remove reqwest
This was preventing us from building on windows amd

Closes: https://github.com/damus-io/notedeck/pull/567
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:26 -08:00
William Casarin
ec755493d9 Introducing Damus Notedeck: a nostr browser
This splits notedeck into:

- notedeck
- notedeck_chrome
- notedeck_columns

The `notedeck` crate is the library that `notedeck_chrome` and
`notedeck_columns`, use. It contains common functionality related to
notedeck apps such as the NoteCache, ImageCache, etc.

The `notedeck_chrome` crate is the binary and ui chrome. It is
responsible for managing themes, user accounts, signing, data paths,
nostrdb, image caches etc. It will eventually have its own ui which has
yet to be determined.  For now it just manages the browser data, which
is passed to apps via a new struct called `AppContext`.

`notedeck_columns` is our columns app, with less responsibility now that
more things are handled by `notedeck_chrome`

There is still much work left to do before this is a proper browser:

- process isolation
- sandboxing
- etc

This is the beginning of a new era! We're just getting started.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-12 20:08:55 -08:00
William Casarin
97006d4d6f test: patch up some broken enostr tests
didn't fix them all though. apparently this test suite was
not running
2024-12-11 11:24:29 -08:00
William Casarin
74c5f0c748 split notedeck into crates
This splits notedeck into crates, separating the browser chrome and
individual apps:

* notedeck: binary file, browser chrome
* notedeck_columns: our columns app
* enostr: same as before

We still need to do more work to cleanly separate the chrome apis
from the app apis. Soon I will create notedeck-notebook to see what
makes sense to be shared between the apps.

Some obvious ones that come to mind:

1. ImageCache

We will likely want to move this to the notedeck crate, as most apps
will want some kind of image cache. In web browsers, web pages do not
need to worry about this, so we will likely have to do something similar

2. Ndb

Since NdbRef is threadsafe and Ndb is an Arc<NdbRef>, it can be safely
copied to each app. This will simplify things. In the future we might
want to create an abstraction over this? Maybe each app shouldn't have
access to the same database... we assume the data in DBs are all public
anyways, but if we have unwrapped giftwraps that could be a problem.

3. RelayPool / Subscription Manager

The browser should probably maintain these. Then apps can use ken's
high level subscription manager api and not have to worry about
connection pool details

4. Accounts

Accounts and key management should be handled by the chrome. Apps should
only have a simple signer interface.

That's all for now, just something to think about!

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-11 11:24:29 -08:00