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>
before profile queries were not working at the database level,
because there was no note_pubkey or note_pubkey_kind index. Now there
is! So profiles should be much faster to query now, and will actually
return results.
There still appears to be an issue with the profile NotesHolder which
is preventing it from updating, via the logic in poll_notes_into_view.
The original Timeline version of this function works fine, but it looks
like the NotesHolder one is broken.
Going to work on refactoring the notes holder next to fix.
Signed-off-by: William Casarin <jb55@jb55.com>
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>
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>
We give a friendly message now. If you need to run as debug,
use `cargo run -- --debug` or `./target/debug/notedeck --debug`
We also remove the callstack feature because it doesn't seem
like you need it for widget callstacks.
Fixes: aafddf5acb ("debug: add crate features which enable egui DebugOptions")
Signed-off-by: William Casarin <jb55@jb55.com>
Not too many breaking changes. I updated egui-nav and egui-tabs as well.
Fixes: https://github.com/damus-io/notedeck/issues/315
Changelog-Fixed: Fixed crash when navigating in debug mode
Changelog-Changed: Migrated to egui v0.29.1
Signed-off-by: William Casarin <jb55@jb55.com>
Updated navigation to use a custom title renderer for more flexible
rendering of navigation titles. This change decouples the rendering
logic from predefined formats, enabling dynamic title compositions
based on application context and data.
This includes:
- Refactoring `NavResponse` to introduce `NotedeckNavResponse` for
handling unified navigation response data.
- Adding `NavTitle` in `ui/column/header.rs` to handle rendering
of navigation titles and profile images dynamically.
- Updating route and timeline logic to support new rendering pipeline.
- Replacing hardcoded title rendering with data-driven approaches.
Benefits:
- Simplifies navigation handling by consolidating title and action
management.
- Improves scalability for new navigation features without modifying
core logic.
- Enhances visual customization capabilities.
Signed-off-by: William Casarin <jb55@jb55.com>
--features debug-widget-callstack
Show callstack for the current widget on hover if all modifier keys
are pressed down
--features debug-interactive-widgets
Show an overlay on all interactive widgets
Notes:
- debug-widget-callstack asserts `egui:callstack` feature when enabled
- Only works in debug builds, compile error w/ release builds
Thanks to kernel and ken for helping with our first
release of Notedeck!
name added removed commits
-------------------------------------------------------------
William Casarin <jb55@jb55.com> +38170 -20819 552
kernelkind <kernelkind@gmail.com> +14206 -5593 140
Ken Sedgwick <ken@bonsai.com> +473 -206 24
hellodword +30 -23 1
alltheseas +12 -2 4
0xb10c <b10c@b10c.me> +6 -2 1
Update nostrdb to gracefully handle mapsizes that
are too large and fail to create nostrdb files.
We now keep shrinking the mapsize until database creation
succeeds. We still use the default mapsize of 32GiB on
windows, which is a bit annoying until we have nostrdb
resizing like monero.
Fixes: https://github.com/damus-io/notedeck/issues/491