Commit Graph
100 Commits
Author SHA1 Message Date
William Casarin 5f21d32d96 android: fix android logging 2025-01-04 13:14:05 -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
William Casarin f5afdd04a6 chrome: dont parse args twice
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-04 10:34:46 -08:00
William Casarin eeab1666e7 query: fix since filter on kind queries
Before kind queries with since filters wasn't working. Now it does.

Changelog-Fixed: Fixed since kind filters
2024-12-30 11:41:30 -08:00
William Casarin f569f948af nixos: fix wayland
Suggested-by: @duck1123
Fixes: #609
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-24 21:32:03 -08:00
William Casarin 6d1d28c84b lockfile: update
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-20 15:40:19 -08:00
William Casarin fcac49a0a5 previews: run previews as notedeck apps
This allows ./preview to be a notedeck app runner. I am currently
using it for the ProfilePic app (which will because notedeck_viz)

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-20 15:39:26 -08:00
William Casarin 475314da75 columns: navigate back when switching account
Fixes: https://github.com/damus-io/notedeck/issues/600
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-20 13:54:20 -08:00
William Casarin 40c5dbf418 timeline: only show one tab in hashtag timeline 2024-12-19 09:52:56 -08:00
William Casarin ca988165cc column: show pointer button on hover 2024-12-19 09:08:52 -08:00
William Casarin 8025be823a ui: customizable tabs per column view
This reduces the number of choices the user needs to make. Some of these
filters were redundant anyways. This also saves memory.

Universe: Notes
Notificaitons: Notes & Replies
Everything else: Notes, Notes & Replies

Changelog-Changed: Simplified tab selections on some columns
Fixes: https://github.com/damus-io/notedeck/issues/517
2024-12-19 08:48:07 -08:00
William Casarin cb2330abac refactor: move reply_desc into its own file
it's grown up enough now to deserve that at least
2024-12-19 07:58:43 -08:00
William Casarin 5449d6ceb5 note: options: streamline bit macro
Include has method in the bit note options macro
2024-12-19 07:49:56 -08:00
William Casarin ef8d5b73ee columns: remove dead code 2024-12-19 07:31:40 -08:00
William Casarin 6fa6a5733e timeline: auto-add yourself to your home timeline
This is the most intuitive, and damus iOS does the same thing. You
have to follow yourself, sorry. Otherwise you won't see your posts
when you post which is confusing.

Fixes: https://github.com/damus-io/notedeck/issues/509
2024-12-19 07:21:15 -08:00
William Casarin 09d6568ef9 ui: make reply description mentions clickable
Small oversight from previous changes
2024-12-18 14:55:11 -08:00
William Casarin 11274ac4df nav: make back nav faster
Changed the egui-nav spring function so its now so slow near the
end of the aniation.

Fixes: https://github.com/damus-io/notedeck/issues/595
2024-12-18 13:04:09 -08:00
William Casarin f693bb54c1 fix weird crash with missing timeline
My timeline wen't missing and then I started crashing here..

bizarre
2024-12-18 13:03:51 -08:00
William Casarin f748b8b34a profile: fix avatar alignment in profile previews
Changelog-Fixed: Fix avatar alignment in profile previews
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 14:43:46 -08:00
William Casarin 4967f64bb6 ui: show note previews when hovering reply descriptions
Preview: https://cdn.jb55.com/s/bef26a2caf09e952.png
Demo: https://cdn.jb55.com/s/hover-preview-2.mp4

Changelog-Added: Show note previews when hovering reply descriptions
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 14:43:46 -08:00
William Casarin 5a241d730e mentions: open profile page when clicking a user mention
Fixes: https://github.com/damus-io/notedeck/issues/588
Changelog-Added: Clicking a mention now opens profile page
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 12:33:10 -08:00
William Casarin 80982059fc ui: fix repost button size
triggering ocd

Changelog-Fixed: Fix repost button size
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 12:32:58 -08:00
William Casarin 59dec0c066 ui: show cursor when hovering pfp
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 12:21:40 -08:00
William Casarin ed5b1c4cf4 mention: change ?? to @???
More consistent with the other label

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 12:21:40 -08:00
William Casarin 49fe7ae5c7 ui: add show_pointer
For showing the cursor when hovering over a clickable thing. We need
this in more places.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 11:52:28 -08:00
William Casarin 482a3cb818 columns: move from Cow<'static, str> to ColumnTitle<'a>
This further deliminates our column titles to those that are simple,
and to those that require additional information from the database.

This allows us to avoid creating many transactions pointlessly if we
don't need to.

Changelog-Changed: Show usernames in user columns
2024-12-17 10:20:59 -08:00
William Casarin 47e0b0ed52 nostrdb: update to fix sub memleak 2024-12-17 09:19:35 -08:00
William Casarin 18226a35ff android: fix build
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-14 01:51:56 -08:00
William Casarin 1e0228e396 Fix notes note updating in profile view
Fixes: https://github.com/damus-io/notedeck/issues/576
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-14 00:06:33 -08:00
William Casarin e5ab8d5b9c nostrdb: update to fix profile queries
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>
2024-12-13 23:35:08 -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
William Casarin 516bbb6bc6 deb: add name so package works again
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 11:01:09 -08:00
William Casarin 5fda025206 android: change apk name to Notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:45:47 -08:00
William Casarin 0302a228f8 rpm: fix rpm build
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:45:47 -08:00
William Casarin 0cb400efe3 osx: update bundle name
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:13:57 -08:00
William Casarin 6da23a1374 windows: amd64 installer
This adds windows amd64 support via a dynamic build step that configures
the inno installer for the correct architecture

Changelog-Added: Add amd64 support for Windows build
Closes: https://github.com/damus-io/notedeck/issues/506
2024-12-13 10:07:47 -08:00
William Casarin c874606af5 tests: add --testrunner flag so that column tests dont fail on startup
We added a startup panic to prevent users from running as debug mode,
our tests are also hitting this. Add a new --testrunner flag which
skips this check. We want this separate from the --debug flag so that
the tests have a more consistent runtime environment.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:53 -08:00
William Casarin 08a5ed1076 lockfile: update
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 10:01:53 -08:00
William Casarin c3bbc6b977 android: fix issues due to rearchitecture 2024-12-13 09:36:10 -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 aa14fb092d note: add copy note json
very handy
2024-12-11 16:12:25 -08:00
William Casarin a429ff689c theme: fallback theme should be dark
this default was deeply cursed
2024-12-11 15:20:47 -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
William Casarin 10cbdf15f0 remove queries
not used anymore
2024-12-11 11:24:29 -08:00
William Casarin d36487e28f caution: don't crash on unknown keyword
Fixes: 34f0c3b0ce ("serialization for DecksCache")
2024-12-11 11:24:29 -08:00
William Casarin 32caaee642 Revert "introduce decks_cache"
This was causing a crash when switching accounts

This reverts commit 69e93b0ebf.
2024-12-09 09:05:05 -08:00
William Casarin 1b31557b03 prevent users from running as debug
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>
2024-12-07 20:56:14 -08:00
William Casarin 720230ca55 fix profiler
I updated puffin to egui v0.29.1 and now it works

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-07 19:53:32 -08:00
William Casarin 323d1bcd2c Migrate to egui v0.29.1
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>
2024-12-07 16:40:43 -08:00
William Casarin 2543978ffe github: unify fmt and clippy step
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-06 10:58:14 -08:00
William Casarin c309894be8 deck: remove experimental feature
compiler was giving me errors

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-06 10:57:49 -08:00
William Casarin a90645d475 simplify prev function
Thanks chatgpt, I thought this was more verbose than it could have been.

Changelog-None:
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-06 10:46:20 -08:00
William Casarin cea433f69a column: reduce bounciness when navigating
Also right align profile pics when navigating

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 14:02:18 -08:00
William Casarin d06e790cd2 column: only show delete button when not navigating
This is pretty confusing otherwise

Changelog-Changed: Only show column delete button when not navigating
Fixes: https://github.com/damus-io/notedeck/issues/548
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 13:30:24 -08:00
William Casarin edd71c1a2a column: improve nav style
Show back label, switch back to chevron design

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 13:24:00 -08:00
William Casarin 8444047aa6 column: switch to profile pictures in header
We also switch away from manual layout to centered cross-alignment.

Changelog-Changed: Show profile pictures in column headers
Fixes: https://github.com/damus-io/notedeck/issues/12
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 12:51:02 -08:00
William Casarin 713d9d7bb5 column: use simplified column string titles for now
even though we will replace this soon, it is still technically
more correct than Timeline(1), etc
2024-12-05 10:59:23 -08:00
William Casarin 093cf8c720 column: switch to simplified strings for column headers
This uses less allocations, and once we switch to profile pictures in
the header the old way won't be needed

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 10:59:00 -08:00
William Casarin be3edc02a4 nav: refactor title rendering for flexibility
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>
2024-12-05 10:58:59 -08:00
William Casarin cf773a90fd anim: smoothly animate delete button from 0 size
This is a much cleaner animation

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 10:57:21 -08:00
William Casarin 900d13ad4d ui: fix duplicate hitbox widget ids
Fixes: 78210e8208 ("ui: fix quote repost hitbox")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-03 20:46:41 -08:00
William Casarin 78210e8208 ui: fix quote repost hitbox
The response from the wide rendered note was incorrect, leading to and
incorrectly sized hitbox. This fixes that.

Additionally, we include note options and note parent into the hitbox
key, as this may influence the size of the note.

Before: https://cdn.jb55.com/s/b2464c22a65adb12.png
After: https://cdn.jb55.com/s/52545564d98d278e.png

Fixes: https://github.com/damus-io/notedeck/issues/519
Closes: https://github.com/damus-io/notedeck/pull/537
Changelog-Fixed: Fix broken quote repost hitbox
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-03 17:53:29 -08:00
William Casarin 229694466a ui: use proper response in wide-rendered note
This was causing hitbox issues

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-03 17:52:52 -08:00
William Casarin 5dcab460e5 fix linux packages again 2024-12-02 15:43:04 -08:00
William Casarin 575d469aa0 Release v0.2.0 - Notedeck Alpha
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
2024-11-30 11:10:47 -08:00
William Casarin 678c82b388 ci: fix linux packages 2024-11-30 11:05:55 -08:00
William Casarin 9055d07844 build: cross compile binary packages (rpm/deb/dmg)
Windows build still has issues on aarch64 so we postpone that for now
2024-11-30 09:42:50 -08:00
William Casarin 2969db7e30 img: include jpeg when detecting images
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 12:19:47 -08:00
William Casarin 6ab8eb078e ui: add top spacing for sidepanel on macos
also slightly increase width

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 12:08:33 -08:00
William Casarin 65537b28fd ui: remove top panel
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 11:59:36 -08:00
William Casarin 800fb920a2 ui: make notedeck alpha text gray instead of purple
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 11:38:20 -08:00
William Casarin c07276e5d0 support: just use version instead of notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 11:38:20 -08:00
William Casarin 4a1985d728 text: make tiny text smaller
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 11:38:20 -08:00
William Casarin 42c0f02072 onboarding: add introductions hashtag column
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:35:15 -08:00
William Casarin f8d6fbf153 refactor: simplify demo timeline if statement
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:34:56 -08:00
William Casarin c8d95aca2a timeline: add simple hashtag timeline constructor
Useful for adding hashtag timelines manually without the
into_timeline thing

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:34:18 -08:00
William Casarin 37ab6f33fb accounts: remove pink selected frame
Opinionated design call I am making

Fixes: 36b8afd1750d ("Update account management UI to design")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:21:49 -08:00
William Casarin 409e8c2e3a icon: fix app icon
Updated to roberto's fixed icon, I also added some padding so that it
looks right int the app switcher.

Closes: https://github.com/damus-io/notedeck/pull/503
Closes: https://github.com/damus-io/notedeck/pull/496
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:08:00 -08:00
William Casarin 2e9a00ee57 demo: ensure we have a base column
This allows you to set your first column as your own home timeline
without having to re-arrange anything

Fixes: 62a85d921c1f ("use demo config when no accs")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:04:57 -08:00
William Casarin e3ed744a5c posts: add client tag when posting and replying
This should help us a bit with seeing notedeck usage.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 09:55:33 -08:00
William Casarin 236d1684e7 try to fix linux packages yet again
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 18:39:18 -08:00
William Casarin 355151e1d4 Revert "ci: build before test"
to figure out this packaging issue...

This reverts commit 24db85f1d0.
2024-11-28 17:45:31 -08:00
William Casarin 24db85f1d0 ci: build before test
just because
2024-11-28 16:56:31 -08:00
William Casarin 69eaccdd8f windows: cap dbsize to 16GiB for now
because windows is horrible
2024-11-28 16:52:00 -08:00
William Casarin 8d59260935 windows: handle large mapsizes gracefully
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
2024-11-28 16:52:00 -08:00
William Casarin dea2873d9a build: only build packages on merge to master
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 12:01:47 -08:00
William Casarin 0171e6c970 clippy: fix clippy warnings
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 12:01:47 -08:00
William Casarin 708be85709 readme: add ci badge
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 11:51:24 -08:00
William Casarin 05f36c81b3 github: run ci on pushes to master as well
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 11:50:24 -08:00
William Casarin 45c104786b readme: use proper link
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 11:14:32 -08:00
William Casarin 7fcb7b5ab0 readme: update with newer image
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-28 11:13:56 -08:00
William Casarin 762fd263bb github: remove deprecated actions
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 17:15:19 -08:00
William Casarin 7f278fb630 github: update to checkout v4 in actions
may solve deprecation warnings

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 16:46:40 -08:00
William Casarin 5cea7ae5d4 github: split matrix into individual build steps per OS
So we don't have to wait for the whole matrix to start building
individual packages per OS

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 16:27:37 -08:00
William Casarin 79e0228790 github: automatically build and sign macOS dmg
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 16:19:40 -08:00
William Casarin 921c0f1118 macos: remove macos_build_secrets.sh as build requirement
Users can source this themselves, or use something like direnv to
automatically load them when you `cd` into the project.

In the case of github actions, these will be set in the environment.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 16:19:26 -08:00
William Casarin 987e43d0ca envrc: source macos secrets
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 15:45:14 -08:00
William Casarin d57a3ebc62 github: add windows build matrix and installer package
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 15:45:11 -08:00
William Casarin e812be476d win: add installer script
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 14:39:48 -08:00