Commit Graph
100 Commits
Author SHA1 Message Date
William Casarin e8d240df42 toolbar: process actions
Signed-off-by: William Casarin <jb55@jb55.com>
2025-06-07 10:19:13 -07:00
William Casarin 0ea1a92ea7 chrome: hook up toolbar actions
We will implement execution of these actions in the
upcoming commits!

stay tuned

Signed-off-by: William Casarin <jb55@jb55.com>
2025-06-07 10:19:13 -07:00
William Casarin 0eec6881fc Initial tab bar 2025-06-07 10:19:13 -07:00
William Casarin bcd9c61d46 chrome: extract more non-methods 2025-06-07 10:19:13 -07:00
William Casarin 65928bcdbb chrome: extract method to function
We don't need anything from Chrome in this function, so we can just
extract it to a top-level function
2025-06-07 10:19:13 -07:00
William Casarin 6812a0e6ae dave: add chrome toggle button
We were missing this, which meant we could get stuck in
dave
2025-06-05 15:39:18 -07:00
William Casarin b139af475e dave: small cleanup 2025-06-05 14:37:03 -07:00
William Casarin e87b6f1905 chrome: collapsible side panel
This implements the initial logic that makes the side panel collapsible.

Since we don't have a proper hamburger control, we do the same thing we
do on iOS for now.
2025-06-05 12:01:55 -07:00
William Casarin 5cb0911d7e log: less verbose unknown id logging 2025-06-05 11:59:51 -07:00
William Casarin b186458fec nix: emulator
This expression was incorrect...
2025-06-05 11:59:51 -07:00
William Casarin f380c24649 fix note response regression
Fixes: 7d916805bc ("note: cleanup wide/standard implementation")
2025-06-03 11:26:18 -07:00
William Casarin 771537a4f6 android: hover post button when narrow
Signed-off-by: William Casarin <jb55@jb55.com>
2025-06-03 10:29:38 -07:00
William Casarin 7d916805bc note: cleanup wide/standard implementation
Since this function was getting too big
2025-06-03 10:29:38 -07:00
William Casarin 5ef77efebb scroll: simple fix
Instead of a complicated min scroll distance implementation,
we simply disable drag to scroll on carousel to fix vertical
scrolling on android
2025-06-03 10:29:38 -07:00
William Casarin 81a9ddbebc Merge remote-tracking branches 'github/pr/87{0,1,2}'
Merge a few bug fixes and lint issues

Fernando López Guevara (1):
      fix: skip blurring for user's own images

William Casarin (3):
      clippy: fix large enum.

kernelkind (1):
      bugfix: txn failed
2025-06-02 10:34:45 -07:00
William Casarinandkernelkind 0a675dfff0 clippy: fix large enum.
Signed-off-by: William Casarin <jb55@jb55.com>
2025-06-01 17:56:18 -04:00
William Casarin 1c3b172e21 clippy: fix large enum.
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-31 16:33:18 -07:00
William Casarin d9b1de9d2c Merge remote-tracking branches 'github/pr/869' and 'github/pr/868'
Merge some misc changes from Fernando

Fernando López Guevara (2):
      feat(column): add tooltip on remove column button
      feat(hashtag-column): handle new hashtag on Enter key press
2025-05-31 16:01:02 -07:00
William Casarin fc51ddb438 Merge remote-tracking branches 'github/pr/864' and 'github/pr/866' 2025-05-31 15:53:36 -07:00
William Casarin ee85b754dd Fix text wrapping issues
Mentions were getting wrapped in a horizontal, which breaks the outer
horizontal_wrapped in note contents. When this breaks, it seems to be
breaking subsequent wrapping in notes.

Remove the horizontal to the remaining text wrapping issues!

Changelog-Fixed: Fix text wrapping glitches
Fixes: https://github.com/damus-io/notedeck/issues/33
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-20 18:09:15 -07:00
William Casarin e75eb5ffd5 clippy: quick lint fix 2025-05-19 15:28:58 -07:00
William Casarin 163abe891a Merge remote-tracking branch 'pr/862' 2025-05-19 15:25:56 -07:00
William Casarin 86d2a9e2e7 clippy: fix lint related to iterator
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will
needlessly iterate the entire iterator
   --> crates/notedeck/src/urls.rs:262:43
    |
262 |             if let Some(file_name) = path.last() {
    |                                           ^^^^^^ help: try: `next_back()`
    |

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-14 09:56:06 -07:00
William Casarin c469a0ff22 timeline: show media on universe timeline
Now that we have blurred images from people you don't
follow, we can enable this again

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-14 09:53:55 -07:00
William Casarin 54308c807e Merge blurhash support
kernelkind (22):
      add `trust_media_from_pk2` method
      add hashbrown
      introduce & use `JobPool`
      introduce JobsCache
      add blurhash dependency
      introduce blur
      note: remove unnecessary derive macros from `NoteAction`
      propagate `JobsCache`
      `ImagePulseTint` -> `PulseAlpha`
      images: move fetch to fn
      add `TexturesCache`
      images: make `MediaCache` hold `MediaCacheType`
      images: make promise payload optional to take easily
      post: unnest
      notedeck_ui: move carousel to `note/media.rs`
      note media: only show full screen when loaded
      note media: unnest full screen media
      pass `NoteAction` by value instead of reference
      propagate `Images` to actionbar
      add one shot error message
      make `Widget` impl `ProfilePic` mutably
      implement blurring
2025-05-14 09:27:39 -07:00
William Casarin b48b1e4813 release: changelog
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-05 13:54:33 -07:00
William Casarin b072c93964 Release Notedeck Beta v0.4.0
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-03 14:42:32 -07:00
William Casarin bdd0ef4c5c ui: fix a bunch of missing hover pointers
let's try to keep on top of these

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 20:50:56 -07:00
William Casarin 8b7914e395 chrome: fix theme persistence
Fixes: #832
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 20:27:08 -07:00
William Casarin a94cbb2dc0 dave: hide media in dave note previews
it bugs out sometimes

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 20:21:42 -07:00
William Casarin 2539dead1e dave: nudge avatar when you click
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 20:21:30 -07:00
William Casarin 3eb9e30e8f dave: fix sidebar click
Fixes: #837
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 19:54:02 -07:00
William Casarin 514e5748b8 dave: add trial mode
Fixes: #827
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 19:37:45 -07:00
William Casarin 6bbc20471a dave: include anonymous user identifier in api call
- don't include users pubkey

This could be used to associate requests with real users,
rendering the anonymized user_id pointless

TODO: Implement a new tool call that lets dave ask for your pubkey

Fixes: #834
Fixes: #836
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 19:33:33 -07:00
William Casarin 093189b019 ui: make post replies selectable
I wanted to copy a quote from something I was replying to, I couldn't
now I can

Fixes: #835
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 17:28:59 -07:00
William Casarin dbfc2804f1 chrome: switch from ALPHA to BETA
Fixes: #828
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 17:23:14 -07:00
William Casarin 5bae19fe00 mention: show username instead of display_name
Fixes: #833
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 17:23:08 -07:00
William Casarin 10a2459da2 windows: don't show terminal window
Looks like this got accidentally commented out in an android build

Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-01 12:03:36 -07:00
William Casarin a5f4290acf columns: never truncate notes you're replying to
So you can see everything

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-30 11:00:37 -07:00
William Casarin b83c5f7de5 columns: remove spamming info logs about writing to cache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-30 11:00:19 -07:00
William Casarin 1931eb6558 dave: fix image in readme 2025-04-30 08:49:22 -07:00
William Casarin 1668b3701c dave: add screenshot to readme 2025-04-30 08:44:42 -07:00
William Casarin 3dccdf2bad chrome: use actual columns noteaction executor
there is code duplication here and it is causing bugs
2025-04-22 19:07:25 -07:00
William Casarin e8a1233174 dave: bubble note actions to chrome
This allows chrome to pass note actions to other apps
2025-04-22 18:42:12 -07:00
William Casarin 4cedea9fdb dave: more flexible env config
With this I was able to get openrouter working:

DAVE_API_KEY=$OPENROUTER_API_KEY
DAVE_ENDPOINT=https://openrouter.ai/api/v1
DAVE_MODEL="google/gemini-2.0-flash-001"
RUST_LOG=async_openai=debug,notedeck_dave=debug

./target/release/notedeck
2025-04-22 16:46:38 -07:00
William Casarin 5c0874ab85 dave: give present notes a proper tool response
so the ai know we actually did something
2025-04-22 16:20:26 -07:00
William Casarin 56f5151739 dave: return tool errors back to the ai
So that it can correct itself
2025-04-22 16:05:54 -07:00
William Casarin 9692b6b9fe dave: add query rendering, fix author queries 2025-04-22 10:50:58 -07:00
William Casarin 5c8fba220c ui: add ProfilePic::from_profile_or_default
This is yet another helper, I really need to clean this
ui widget up in terms of its possible constructors...
2025-04-22 10:50:58 -07:00
William Casarin c4084a1fb5 ui: add note truncation
Truncate notes by default. We still need a show more button though
2025-04-22 10:50:58 -07:00
William Casarin e4658df847 name: display_name before name in NostrName
This is technically more currect. name is more of a username for
tagging.
2025-04-22 10:47:14 -07: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 88aa78dc03 dave: ensure system prompt is included when reset 2025-04-21 17:27:38 -07:00
William Casarin d4681801e8 dave: add new chat button 2025-04-21 17:10:03 -07:00
William Casarin 9ec5f1efa2 docs: improve top-level docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:36:36 -07:00
William Casarin 405b62c15a docs: add notedeck_chrome docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:31:47 -07:00
William Casarin f7e47dedee docs: add notedeck_columns readme
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:26:02 -07:00
William Casarin 5f6a69b4b3 docs: add notedeck docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:21:45 -07:00
William Casarin 82c0bc0718 docs: add tokenator docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:16:18 -07:00
William Casarin 310a835b27 docs: remove test hallucination
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:12:29 -07:00
William Casarin d617b688f1 docs: add some ui-related guides
generated using code2prompt + claude 3.7 sonnet

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 13:10:20 -07:00
William Casarin 0d51e25ab0 dave: improve docs with ai
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 12:48:33 -07:00
William Casarin 6601747eb4 dave: add readme
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 12:26:50 -07:00
William Casarin 2fdb36475a dave: add a few docs
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 12:11:21 -07:00
William Casarin 04a11fd45d dave: cleanly separate ui from logic
This is a good demo of how easy it is to build a notedeck app,
so let's detangle the ui from logic to showcase this

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-21 12:05:27 -07:00
William Casarin 5811a5f4e6 dave: improve multi-note display 2025-04-20 09:05:02 -07:00
William Casarin a33aad1f62 note: fix from_hex crash on bad note ids 2025-04-19 19:34:12 -07:00
William Casarin f496d4b8c4 dave: initial note rendering
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-18 17:03:59 -07:00
William Casarin 43310b271e ci: bump ubuntu runner
Since our current runner was deprecated

Link: https://github.com/actions/runner-images/issues/11101
2025-04-17 14:13:55 -07:00
William Casarin d04fc892a7 dave: constrain power for now
we will focus on more specific tools instead
2025-04-17 12:53:31 -07:00
William Casarin 8af80d7d10 ui: move note and profile rendering to notedeck_ui
We want to render notes in other apps like dave, so lets move
our note rendering to notedeck_ui. We rework NoteAction so it doesn't
have anything specific to notedeck_columns

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 12:34:43 -07:00
William Casarin e4bae57619 refactor: ocd unnecessary pass by value
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 08:39:47 -07:00
William Casarin 81ef677bf2 refactor: nevernest get_display_name
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 08:37:14 -07:00
William Casarin 8472a9b643 log: silence gif log
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 07:47:11 -07:00
William Casarin 7836bde868 dave: fix input box
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 00:16:55 -07:00
William Casarin fbdc2527ca dave: give up on plaintext formatting
its so heavily trained to use markdown, lets just use that

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 00:16:30 -07:00
William Casarin d30e4c53ee post: fix bug where send shortcut send unfocused inputs
Fixes: https://github.com/damus-io/notedeck/issues/810
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 23:52:34 -07:00
William Casarin b50bc2e988 dave: refactor a bit
pulling tokens isn't really a part of rendering,
so let's pull that out

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 22:41:41 -07:00
William Casarin bf18eb4e69 refactor: extract input_ui into its own function
too many things happening in the ui function

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 22:29:20 -07:00
William Casarin cc03f24920 refactor: move input buttons ui into its own fn
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 22:25:44 -07:00
William Casarin aa0c1012db misc: driveby fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 22:20:00 -07:00
William Casarin 4a0e2fa347 dave: tweak prompt
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-16 20:35:39 -07:00
William Casarin 4260d3e9da nostrdb: fix on windows
had this on an older version for some reason
2025-04-15 08:53:30 -07:00
William Casarin b228411b8d columns: remove thread warning
yes threads suck, but this message is also annoying
2025-04-15 08:24:24 -07:00
William Casarin 66377351b3 ui: add some margin to chrome sidebar
Looks a bit better
2025-04-15 08:24:04 -07:00
William Casarin 4f0d96679d previews: disable for now
we don't use these much and it slows compile time
2025-04-15 08:20:25 -07:00
William Casarin 87794fae33 chrome: fix wallet button
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:37:22 -07:00
William Casarin e5c3bb4fe9 dave: fix bugs
fixed some bugs i introduced during the refactor

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:13:40 -07:00
William Casarin 39e2accbce multicast: broadcast context
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:50 -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
William Casarin 956c557851 dave: only search non-replies
I think this makes the most sense for most queries

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:33 -07:00
William Casarin f1e359a5c3 dave: update to custom filters nostrdb
We will use this for filtering replies from most
requests

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 15:59:11 -07:00
William Casarin 2ed561579f dave: add a few tool docs
So that readers of this code can actually figure out
what these types actually mean.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 12:45:19 -07:00
William Casarin be47a692f6 dave: remove old file
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 12:38:36 -07:00
William Casarin d6c065694a dave: organize
move more things into their own modules

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 12:37:25 -07:00
William Casarin 2a9c5c7848 dave: reorganize ModelConfig
start to clean up the lib.rs a bit

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:53:52 -07:00
William Casarin b8c5423edd dave: don't make dave active yet
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:58 -07:00
William Casarin 4ca7bcec6d lint: fix clippy and fmt issues
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:24 -07:00
William Casarin b4d1265283 dave: tweak prompt
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:24 -07:00
William Casarin e6676a202a log: changed urlcache log to debug
its more of a debug log

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:24 -07:00