Commit Graph
100 Commits
Author SHA1 Message Date
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
William Casarin a1d8adfff3 deps: switch to windows nostrdb-rs
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 14:34:00 -08:00
William Casarin 38fc39e275 clippy: fix clippy issues
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 14:34:00 -08:00
William Casarin de802cd363 Revert "ui: simply hide post button if buffer is empty"
This reverts commit 4133570c2e.
2024-11-27 09:30:07 -08:00
William Casarin 536f7579a9 Merge: user can upgrade their npub -> nsec #485
William Casarin (2):
      refactor: make LoginAction a bit safer

kernelkind (1):
      user can upgrade their npub -> nsec
2024-11-27 09:29:41 -08:00
William Casarin e69a7f83ae refactor: make LoginAction a bit safer
We make LoginAction a simple wrapper around processing the unknown
action to expose too much internal logic. This allows us to have a
must_use on our LoginAction type, otherwise the SingleUnkIdAction's
must_use will be lost when returned in the login action.

Fixes: a5cdddbb2b ("user can upgrade their npub -> nsec")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 09:28:29 -08:00
William Casarin 12743b4469 Merge Add debian packaging #483
Fixes: https://github.com/damus-io/notedeck/issues/463

Ken Sedgwick (2):
      Add debian packaging
      update to github v4 artifact actions
2024-11-27 09:08:57 -08:00
William Casarin 18eba128f6 set app icon to damus logo
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-26 13:25:30 -08:00
William Casarin cea144b5b7 NoteDeck -> Notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-26 10:48:25 -08:00
William Casarin 9f447e2155 Merge macos build script #479'
kernelkind (2):
      macos packaging
      macos build script
2024-11-26 10:43:01 -08:00
William Casarin 4a9267fed1 Merge disable compose button if selected not nsec #470
kernelkind (2):
      don't try to use other accounts to post
      disable compose button if selected not nsec
2024-11-26 10:12:32 -08:00
William Casarin a147aa0961 fix fmt
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 13:31:43 -08:00
William Casarin 9cfae313aa Merge include commit hash in SupportView #471
kernelkind (1):
      include commit hash in SupportView
2024-11-22 13:03:34 -08:00
William Casarin c9d1b48706 Merge disable post button if draft buffer empty #469
William Casarin (2):
      ui: simply hide post button if buffer is empty

kernelkind (1):
      disable post button if draft buffer empty
2024-11-22 13:01:03 -08:00
William Casarin 4133570c2e ui: simply hide post button if buffer is empty
Fixes: 8464a1d22c ("disable post button if draft buffer empty")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 12:59:38 -08:00
William Casarin e2a2db8ac2 refactor: move save_cols closer
why you so far away little guy?

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 11:28:33 -08:00
William Casarin 679a5afdeb nav: only save columns once
Before we would save columns for each rendered nav. Now we only do it
once.
2024-11-19 18:52:42 -08:00
William Casarin 7f234935cc refactor: unify note, post and nav actions
There was a bunch of redundant responses. Let's unify them under
the RenderNavAction enum. We unify all action processing under this
type.

This also centralizes all of our side effects into a single function
instead of scattering them everywhere
2024-11-19 18:43:09 -08:00
William Casarin d97c957e67 Merge remote-tracking branch 'pr/455' into login-first-open 2024-11-18 18:27:46 -08:00
William Casarin 63d0a622f1 onboarding: show account login route on first open
Instead of only new columns, show login route on first open.

We will also add a demo column.

Changelog-Changed: Show login column on first open
Fixes: https://github.com/damus-io/notedeck/issues/440
2024-11-18 18:22:08 -08:00
William Casarin 22e67c95cc refactor: rename AccountsManager to Accounts
plz stop with the managers
2024-11-18 18:03:57 -08:00
William Casarin 6545e1ddee thread: ensure thread unknowns are handled 2024-11-18 17:28:55 -08:00
William Casarin 19933c84f1 onboarding: lookup profile after accounts are added
To reduce the side effects of this change, we introduce a new UnknownId
action type:

  - SingleUnkIdAction

This can be returned from functions to signal that we need to do some
work to look for things. We add a `must_use` directive to this type
to ensure callers handle it.

Changelog-Fixed: Fix missing profiles when new accounts are added
Fixes: https://github.com/damus-io/notedeck/issues/356
2024-11-18 17:11:58 -08:00
William Casarin 3b3b8246c8 startup: remove panic hook
doesn't seem to be working anyways
2024-11-18 17:10:25 -08:00
William Casarin bdea3da5f0 enostr: add Deref trait for Pubkey 2024-11-18 17:10:25 -08:00
William Casarin de8029d60f fix crash when removing non-last columns
Fixes: https://github.com/damus-io/notedeck/issues/445
2024-11-17 17:12:59 -08:00
William Casarin a678e647a4 hide media on universe view
Also fixes textmode

Fixes: https://github.com/damus-io/notedeck/issues/443
2024-11-17 16:45:28 -08:00
William Casarin 33b2fa263e fix issue where columns fail to load on first failure
This fixes an issue where if one of the columns fail to load, all other
columns fail to load. This is because we are too aggressive with the
early exit on failure.

To reproduce:

$ notedeck --dbpath what

With existing columns in an existing data path.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 12:30:45 -08:00
William Casarin 8043d86bf2 arg: fix broken dbpath argument, add test
I broke dbpath, lets fix that and add a test so it doesn't happen again

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 12:30:45 -08:00
William Casarin ebfa9e4450 fix log message for relay states
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 10:11:04 -08:00
William Casarin 4d124c05fa remove unnecessary crash
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 10:11:00 -08:00
William Casarin 01bedac710 Fix filter states when adding columns
This fixes various issues with filter states when adding columns. We now
maintain multiple states per relay so that we don't lose track of
anything.

Fixes: https://github.com/damus-io/notedeck/issues/431
Fixes: https://github.com/damus-io/notedeck/issues/359
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 15:25:08 -08:00
William Casarin acadc4a9d9 enostr: add PoolEventBuf
to simplify lifetimes in some situations

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 11:43:35 -08:00
William Casarin 845f745dca remove NewTimelineSub
New timelines should be handled in the standard timeline codepaths

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 10:36:16 -08:00
William Casarin 3fb78ae01e nav: use id_source instead of show argument
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 16:14:56 -08:00
William Casarin 4c458727a9 fix: save columns on removal
Fixes: https://github.com/damus-io/notedeck/issues/432
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 15:51:46 -08:00
William Casarin 91016facc7 Merge Persist Columns #390
Fixed a few merge conflicts

kernelkind (2):
      initial column storage
      tmp remove DeckAuthor columns
2024-11-13 13:13:55 -08:00
William Casarin 94b97d247d Merge Add External Notifications Column setting #395
kernelkind (2):
      init external notifs column
      use AcquireKeyState for AddColumn
2024-11-13 13:06:18 -08:00
William Casarin 29da910534 android: fix build
Fixes: 2f20e8253e ("app: simplify Damus::new constructor")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 12:10:02 -08:00
William Casarin 804a7f0bf9 test: add args column test
Adding a testcase for a bug I noticed on another branch

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin 19d790fce0 timeline: add TimelineKind equality
we will be using these for tests

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin 9801a20429 storage: simplify imports
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin d1059d9480 bin: extract logging setup into its own function
a little bit less messy

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin 2f20e8253e app: simplify Damus::new constructor
Just take an egui::Context instead of an eframe::CreationContext.
This should make it easier to test the app via egui::Context::default();

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:53:29 -08:00
William Casarin fab1257f6e paths: remove hardcoded basepath
Before we were hardcoding the basepath with dirs, which isn't that
useful for testing, previews, or for android. Let's fix that.

This also moves the db and cache directories into our root DataPaths.
This is a breaking change, we don't have a migration step. sorry.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 09:55:56 -08:00
William Casarin 6c9693dbf0 github: disable --all-features for now
Since some things are broken

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 09:55:56 -08:00
William Casarin 702f8ffca3 Merge a few relay fixes from ken
Pick a few fixes from #380

Link: https://github.com/damus-io/notedeck/pull/380

Ken Sedgwick (5):
      build: Cargo.lock updates to mitigate num_enum_derive problem
      add .rustfmt.toml to specify edition
      Fix parsing of subscription id for RelayMessage::Event
      Skip adding relays that are already in the pool
      canonicalize relay urls to avoid false duplicates
2024-11-11 11:19:56 -08:00
William Casarin 1476be48cc Merge 'Support view, key storage'
kernelkind (5):
      file storage
      write log files to disk daily and on panic
      app window size persists on app close
      support view
      fix cmd line args bug
2024-10-28 13:30:16 -07:00
William Casarin d729823f33 Merge 'Update account_login_view.rs' #366
alltheseas (1):
      Update account_login_view.rs
2024-10-22 10:35:57 -07:00
William Casarin a2a8a9f66d cargo fmt
Signed-off-by: William Casarin <jb55@jb55.com>
2024-10-16 08:52:43 -07:00
William Casarin b803693449 Merge Profile View
Noticing a small delay when clicking on macos with large nostrdb, still
need to investigate

kernelkind (14):
      init profile routing
      add profile preview and implement scrolling
      profile unsub
      click on thread pfp
      consolidate timelineTab ui to TimelineTabView
      generify Threads
      profile struct
      integrate profile view caching
      proper timelineTabs
      revert timeline no_scroll stuff
      fix unnecessary copy every frame
      reword comments and logs thread -> NotesHolder
      rename TimelineResponse -> ColumnNoteResponse
      NoteActionResponse for note preview pfp clicking
2024-10-16 08:42:18 -07:00
William Casarin 1a490eb069 use stable toolchain
this was overriding rustup to use nightly

Signed-off-by: William Casarin <jb55@jb55.com>
2024-10-16 08:41:31 -07:00
William Casarin 54dcbd724b Merge 'column titlebar #345'
William Casarin (2):
      update to use upstream egui-nav branch

kernelkind (13):
      basic add column impl
      remote sub new timeline
      add more add column options
      animate add column options
      push column picker immediately to new column
      move get first router to Columns
      tmp use kernelkind egui-nav
      title bar
      unsubscribe timeline on deletion
      fix deck author bug & rename titles
      tmp: kernelkind/egui-nav
      updated back arrow
      tmp: kernelkind/egui-nav
2024-10-11 12:56:15 +02:00
William Casarin f7c6e2774e update to use upstream egui-nav branch
Signed-off-by: William Casarin <jb55@jb55.com>
2024-10-11 12:54:49 +02:00
William Casarin 6c94987a7a Merge multi-subscriber #287
kernelkind (2):
      multi subscriber impl
      implement multi_subscriber for Thread
2024-09-26 14:04:25 -07:00
William Casarin 5ddeb0e383 remove dead code in side panel
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 13:49:51 -07:00
William Casarin 56af979c21 panel: rasterize damus logo
Image is set to double the pixel size to reduce artifacts.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 13:43:53 -07:00
William Casarin 7fe3d5e99f Merge side panel update #327
A few merge conflicts resolved, and changes the image to svg

kernelkind (7):
      initial compose note view
      change side panel width to 64.0
      Add AnimationHelper
      update sidebar to match new design
      remove app from sidebar
      remove profile_preview_controller
      add logo to side panel

Closes: https://github.com/damus-io/notedeck/pull/327
2024-09-26 13:21:11 -07:00
William Casarin 7e4bddcacb Merge hitbox improvements #319
Ken Sedgwick (6):
      debug: implemented fmt::Debug for Pubkey
      debug: implemented fmt::Debug for NoteId
      hitbox: more naming cleanup
      hitbox: extend the hitbox to the full width of the container
      hitbox: handle hits on quoted notes correctly
      hitbox: cache note size instead of rect

Closes: https://github.com/damus-io/notedeck/pull/319
2024-09-26 12:54:09 -07:00
William Casarin dbb164970c remove PostActionExecutor
Just use PostAction::execute

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 12:41:38 -07:00
William Casarin 13d6873eb1 Merge note context menu #328
This merges kernel's note context menu with a bunch of refactorings on
top, closing #328 and #318

William Casarin (7):
      refactor: remove processs_note_selection
      refactor: make options_button a NoteOptions
      note: switch to muted menu_options_button color
      context: move note context button to its own file
      context: fix hitbox, float on far right
      context: set cursor icon on hover

kernelkind (3):
      Add 'more options' to each note
      can left click note more options button
      process 'more options' for previews
2024-09-26 12:33:56 -07:00
William Casarin d416044f47 context: set cursor icon on hover
So we know its clickable. I mean the animation signals that as well, but
still.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 12:31:23 -07:00
William Casarin 5120686679 context: fix hitbox, float on far right
This updates the context menu to "float" instead of using the layout
engine. This is so that we don't take up an unnecessary amount of space
when we increase the hitbox height.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 12:18:10 -07:00
William Casarin 2dba41186d context: move note context button to its own file
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 10:51:08 -07:00
William Casarin 0c3b2ae817 note: switch to muted menu_options_button color
Otherwise it stands out too much

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 09:40:53 -07:00
William Casarin a9cb734ef6 refactor: make options_button a NoteOptions
No reason why this needs to be a standalone bool

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 09:32:21 -07:00
William Casarin 1a94c21d96 refactor: remove processs_note_selection
Moved this to NoteOptionSelection::process

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 09:22:05 -07:00
William Casarin 2208e68726 Merge 'Initial quote reposts #305'
kernelkind (6):
      post quote reposts impl
      make PostActionExecutor for code reuse
      add repost button
      address PR comments
      make views pure
      minor cleanup
2024-09-18 14:15:43 -07:00
William Casarin 8e32f757f0 Merge 'Repost improvements #314'
This slightly improves the style of reposts. Icon color and size still
needs an update[2]

We also update nostrdb[1] to support instant kind6 ingestion, making
reposts render immediately

William Casarin (3):
      repost: update style
      nostrdb: update to support fast kind6 repost ingest

[1] https://github.com/damus-io/nostrdb/commit/cd9ba0ea7dfd021f2a3e98aefef87990d161aab3
[2] https://github.com/user-attachments/assets/23feba47-9d63-443f-9968-eba93053fc24
2024-09-17 15:37:21 -07:00
William Casarin b3f065fd2e nostrdb: update to support fast kind6 repost ingest
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-17 15:28:01 -07:00
William Casarin 27aa146300 repost: update style
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-17 15:28:01 -07:00
William Casarin b1339c8a24 Merge branch 'thread-hitbox'
This adds a note hitbox for opening threads. It doesn't seem to work on
note previews so we'll need to work on that next.

Ken Sedgwick (1):
      add note underbutton to detect clicks and open thread

William Casarin (3):
      notes: rename "underbutt" to "hitbox"
      remove thread button

Changelog-Added: Added note hitboxes for opening threads
Changelog-Removed: Remove temporary thread open button
2024-09-17 15:18:02 -07:00
William Casarin a8731c0210 remove thread button
now that we have note hitboxes

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-17 15:15:51 -07:00
William Casarin e16eeb4d1b notes: rename "underbutt" to "hitbox"
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-17 15:12:20 -07:00
William Casarin 80c9cbe5b2 Merge 'display kind 6 repost impl #302'
Merge kernel's changes for displaying kind6 reposts. We still need to
update the timeline code to fetch and include these in the queries.

kernelkind (2):
      kind 6 repost impl
      add suggested changes
2024-09-17 09:29:55 -07:00
William Casarin d141bb0ab5 Merge 'Accounts and Relay nav #307'
Now that we've refactored everything, column routing is trivial. This
adds account management and relay nav to the sidebar.

https://cdn.jb55.com/s/notedeck-router.mp4

William Casarin (5):
      accounts: use column nav for account management
      cleanup: remove account switcher widget
      nav: fix accounts nav animations
      ui: hook up relay management view
2024-09-17 09:28:52 -07:00
William Casarin 945ccde818 ui: hook up relay management view
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 17:15:07 -07:00
William Casarin fce82b2b6d nav: fix accounts nav animations
also make nav go backward when clicking the account switch button if we
already are navigating to accounts

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:54:29 -07:00
William Casarin 79a447239a cleanup: remove account switcher widget
we don't need this anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:37:04 -07:00
William Casarin 52a7ed53ec accounts: use column nav for account management
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:36:38 -07:00
William Casarin 3c79724a81 Merge 'Read android args from config file on device' #298
Ken Sedgwick (1):
      Read android args from config file on device
2024-09-16 15:24:24 -07:00
William Casarin 36c0971fd9 Flexible routing
Another massive refactor to change the way routing works. Now any
column can route anywhere.

Also things are generally just much better and more modular via the
new struct split borrowing technique.

I didn't even try to split this into smaller commits for my sanity.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 14:50:20 -07:00
William Casarin b4a8cddc48 fix crash in selected columns
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-11 16:24:50 -07:00